Skip to content

Commit

Permalink
MTA-1602: Sync qmt repository with mainline - Sprint 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro Aponasenko committed Feb 19, 2015
1 parent fe4a110 commit 27d5cfa
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Magento\Mtf\Util\Protocol\CurlTransport;

/**
* Class FrontendDecorator
* Curl transport on frontend
*/
class FrontendDecorator implements CurlInterface
Expand Down Expand Up @@ -117,6 +116,8 @@ protected function initCookies()
* @param array $headers
* @param array $params
* @return void
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function write($method, $url, $httpVer = '1.1', $headers = [], $params = [])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@
<constraint name="assertBundlePriceType" prev="assertBundlePriceView"/>
</variation>
<variation name="CreateBundleProductEntityTestVariation6" firstConstraint="assertProductSaveMessage" method="test">
<data name="description" xsi:type="string">Create offline fixed bundle</data>
<data name="issue" xsi:type="string">Bug: MAGETWO-33071</data>
<data name="description" xsi:type="string">Create fixed bundle which is out of stock</data>
<data name="product/data/url_key" xsi:type="string">bundle-product-%isolation%</data>
<data name="product/data/name" xsi:type="string">BundleProduct %isolation%</data>
<data name="product/data/sku_type" xsi:type="string">Fixed</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class Options extends Tab
* @param array $fields
* @param SimpleElement|null $element
* @return $this
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function fillFormTab(array $fields, SimpleElement $element = null)
{
Expand Down Expand Up @@ -139,6 +141,8 @@ protected function getSearchGridBlock()
* @param array|null $fields
* @param SimpleElement|null $element
* @return array
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function getDataFormTab($fields = null, SimpleElement $element = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public function processAssert(
* @param FixtureInterface $product
* @param CheckoutCart $checkoutCart
* @return void
*
* @SuppressWarnings(PHPMD.NPathComplexity)
*/
protected function assertOnShoppingCart(FixtureInterface $product, CheckoutCart $checkoutCart)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class CategoryIds implements FixtureInterface
* @param FixtureFactory $fixtureFactory
* @param array $params
* @param array $data
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
public function __construct(
FixtureFactory $fixtureFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,10 @@ public function getCategoryPriceRuleId(array $data)
$response = $curl->read();
$curl->close();

$pattern = '/class=\" col\-id col\-rule_id\W*>\W+(\d+)\W+<\/td>\W+<td[\w\s\"=\-]*?>\W+?'
. $data['name'] . '/siu';
$pattern = '/col-rule_id\W*(\d+)<.td><[^<>]*?>' . $data['name'] . '/siu';
preg_match($pattern, $response, $matches);
if (empty($matches)) {
throw new \Exception('Cannot find Category Price Rule id');
throw new \Exception('Cannot find Catalog Price Rule id! Response: ' . $response);
}

return $matches[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public function processAssert(CatalogSearchIndex $indexPage, CatalogSearchQuery
'display_in_terms' => strtolower($searchTerm->getDisplayInTerms()),
];

$filters = array_filter($filters);
$grid->search($filters);
unset($filters['store_id']);
\PHPUnit_Framework_Assert::assertTrue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function __construct(CheckoutCart $checkoutCart)
*/
public function run()
{
$this->checkoutCart->open();
$this->checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ public function processAssert(

$browser->open($_ENV['app_frontend_url'] . $product['products'][0]->getUrlKey() . '.html');
$catalogProductView->getViewBlock()->clickAddToCartButton();
$catalogProductView->getMessagesBlock()->waitSuccessMessage();
$checkoutCart->open();
$checkoutCart->getCartBlock()->getOnepageLinkBlock()->proceedToCheckout();
$checkoutOnepage->getLoginBlock()->guestCheckout();
$checkoutOnepage->getLoginBlock()->clickContinue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ class Config extends Tab
* @param array $fields
* @param SimpleElement|null $element
* @return $this
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function fillFormTab(array $fields, SimpleElement $element = null)
{
Expand Down Expand Up @@ -182,6 +184,8 @@ public function getTemplateBlock()
* @param array|null $fields
* @param SimpleElement|null $element
* @return array
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function getDataFormTab($fields = null, SimpleElement $element = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
namespace Magento\Downloadable\Test\Fixture\DownloadableProduct;

/**
* Class CheckoutData
* Data for fill product form on frontend
*
* Data keys:
Expand All @@ -20,6 +19,8 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch
*
* @param $name
* @return array|null
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
protected function getPreset($name)
{
Expand Down

0 comments on commit 27d5cfa

Please sign in to comment.