Skip to content

Commit 27d5cfa

Browse files
author
Dmytro Aponasenko
committed
MTA-1602: Sync qmt repository with mainline - Sprint 6
1 parent fe4a110 commit 27d5cfa

File tree

11 files changed

+24
-6
lines changed

11 files changed

+24
-6
lines changed

dev/tests/functional/lib/Magento/Mtf/Util/Protocol/CurlTransport/FrontendDecorator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Magento\Mtf\Util\Protocol\CurlTransport;
1212

1313
/**
14-
* Class FrontendDecorator
1514
* Curl transport on frontend
1615
*/
1716
class FrontendDecorator implements CurlInterface
@@ -117,6 +116,8 @@ protected function initCookies()
117116
* @param array $headers
118117
* @param array $params
119118
* @return void
119+
*
120+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
120121
*/
121122
public function write($method, $url, $httpVer = '1.1', $headers = [], $params = [])
122123
{

dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@
209209
<constraint name="assertBundlePriceType" prev="assertBundlePriceView"/>
210210
</variation>
211211
<variation name="CreateBundleProductEntityTestVariation6" firstConstraint="assertProductSaveMessage" method="test">
212-
<data name="description" xsi:type="string">Create offline fixed bundle</data>
212+
<data name="issue" xsi:type="string">Bug: MAGETWO-33071</data>
213+
<data name="description" xsi:type="string">Create fixed bundle which is out of stock</data>
213214
<data name="product/data/url_key" xsi:type="string">bundle-product-%isolation%</data>
214215
<data name="product/data/name" xsi:type="string">BundleProduct %isolation%</data>
215216
<data name="product/data/sku_type" xsi:type="string">Fixed</data>

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/Options.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class Options extends Tab
5959
* @param array $fields
6060
* @param SimpleElement|null $element
6161
* @return $this
62+
*
63+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
6264
*/
6365
public function fillFormTab(array $fields, SimpleElement $element = null)
6466
{
@@ -139,6 +141,8 @@ protected function getSearchGridBlock()
139141
* @param array|null $fields
140142
* @param SimpleElement|null $element
141143
* @return array
144+
*
145+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
142146
*/
143147
public function getDataFormTab($fields = null, SimpleElement $element = null)
144148
{

dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductInCart.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public function processAssert(
5454
* @param FixtureInterface $product
5555
* @param CheckoutCart $checkoutCart
5656
* @return void
57+
*
58+
* @SuppressWarnings(PHPMD.NPathComplexity)
5759
*/
5860
protected function assertOnShoppingCart(FixtureInterface $product, CheckoutCart $checkoutCart)
5961
{

dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CategoryIds.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class CategoryIds implements FixtureInterface
3535
* @param FixtureFactory $fixtureFactory
3636
* @param array $params
3737
* @param array $data
38+
*
39+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
3840
*/
3941
public function __construct(
4042
FixtureFactory $fixtureFactory,

dev/tests/functional/tests/app/Magento/CatalogRule/Test/Handler/CatalogRule/Curl.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,10 @@ public function getCategoryPriceRuleId(array $data)
159159
$response = $curl->read();
160160
$curl->close();
161161

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

169168
return $matches[1];

dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Constraint/AssertSearchTermInGrid.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function processAssert(CatalogSearchIndex $indexPage, CatalogSearchQuery
4747
'display_in_terms' => strtolower($searchTerm->getDisplayInTerms()),
4848
];
4949

50+
$filters = array_filter($filters);
5051
$grid->search($filters);
5152
unset($filters['store_id']);
5253
\PHPUnit_Framework_Assert::assertTrue(

dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/ProceedToCheckoutStep.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function __construct(CheckoutCart $checkoutCart)
3838
*/
3939
public function run()
4040
{
41+
$this->checkoutCart->open();
4142
$this->checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout();
4243
}
4344
}

dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermOnCheckout.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ public function processAssert(
7575

7676
$browser->open($_ENV['app_frontend_url'] . $product['products'][0]->getUrlKey() . '.html');
7777
$catalogProductView->getViewBlock()->clickAddToCartButton();
78+
$catalogProductView->getMessagesBlock()->waitSuccessMessage();
79+
$checkoutCart->open();
7880
$checkoutCart->getCartBlock()->getOnepageLinkBlock()->proceedToCheckout();
7981
$checkoutOnepage->getLoginBlock()->guestCheckout();
8082
$checkoutOnepage->getLoginBlock()->clickContinue();

dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ class Config extends Tab
8888
* @param array $fields
8989
* @param SimpleElement|null $element
9090
* @return $this
91+
*
92+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
9193
*/
9294
public function fillFormTab(array $fields, SimpleElement $element = null)
9395
{
@@ -182,6 +184,8 @@ public function getTemplateBlock()
182184
* @param array|null $fields
183185
* @param SimpleElement|null $element
184186
* @return array
187+
*
188+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
185189
*/
186190
public function getDataFormTab($fields = null, SimpleElement $element = null)
187191
{

0 commit comments

Comments
 (0)