Skip to content

Commit 71bfd36

Browse files
author
Dmytro Aponasenko
committed
MTA-1814: Analyse functional test failures - Sprint 9
1 parent 9cabe97 commit 71bfd36

File tree

8 files changed

+82
-88
lines changed

8 files changed

+82
-88
lines changed

dev/tests/functional/tests/app/Magento/Backend/Test/TestCase/NavigateMenuTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class NavigateMenuTest extends Injectable
2222
/* tags */
2323
const MVP = 'no';
2424
const DOMAIN = 'CS, MX, PS';
25-
const TO_MAINTAIN = 'yes';
2625
/* end tags */
2726

2827
/**

dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class CreateTermEntityTest extends Injectable
3131
/* tags */
3232
const MVP = 'yes';
3333
const DOMAIN = 'CS';
34-
const TO_MAINTAIN = 'yes';
3534
/* end tags */
3635

3736
// TODO: Move set up configuration to "__prepare" method after fix bug MAGETWO-29331

dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/DeleteTermEntityTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class DeleteTermEntityTest extends Injectable
3131
/* tags */
3232
const MVP = 'yes';
3333
const DOMAIN = 'CS';
34-
const TO_MAINTAIN = 'yes';
3534
/* end tags */
3635

3736
/**

dev/tests/functional/tests/app/Magento/Review/Test/TestCase/ManageProductReviewFromCustomerPageTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class ManageProductReviewFromCustomerPageTest extends Injectable
5050
/* tags */
5151
const MVP = 'no';
5252
const DOMAIN = 'MX';
53-
const TO_MAINTAIN = 'yes';
5453
/* end tags */
5554

5655
/**

dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items.php

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,26 @@
1212
use Magento\Mtf\Fixture\FixtureInterface;
1313

1414
/**
15-
* Class Items
16-
* Customer wishlist items block on frontend
15+
* Customer wishlist items block on frontend.
1716
*/
1817
class Items extends Block
1918
{
2019
/**
21-
* Item product block
20+
* Item product block.
2221
*
2322
* @var string
2423
*/
2524
protected $itemBlock = '//li[.//a[contains(.,"%s")]]';
2625

2726
/**
28-
* Selector for 'Remove item' button
27+
* Selector for 'Remove item' button.
2928
*
3029
* @var string
3130
*/
3231
protected $remove = '[data-role="remove"]';
3332

3433
/**
35-
* Get item product block
34+
* Get item product block.
3635
*
3736
* @param FixtureInterface $product
3837
* @return Product
@@ -45,16 +44,4 @@ public function getItemProduct(FixtureInterface $product)
4544
['element' => $this->_rootElement->find($productBlock, Locator::SELECTOR_XPATH)]
4645
);
4746
}
48-
49-
/**
50-
* Remove all products from wish list
51-
*
52-
* @return void
53-
*/
54-
public function removeAllProducts()
55-
{
56-
while ($this->_rootElement->find($this->remove)->isVisible()) {
57-
$this->_rootElement->find($this->remove)->click();
58-
}
59-
}
6047
}

dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<constraint name="Magento\Wishlist\Test\Constraint\AssertProductDetailsInWishlist" />
2929
</variation>
3030
<variation name="ConfigureProductInCustomerWishlistOnFrontendTestVariation5">
31+
<data name="issue" xsi:type="string">Bug: MAGETWO-35273</data>
3132
<data name="product" xsi:type="string">groupedProduct::three_simple_products</data>
3233
<constraint name="Magento\Wishlist\Test\Constraint\AssertProductIsPresentInWishlist" />
3334
<constraint name="Magento\Wishlist\Test\Constraint\AssertProductDetailsInWishlist" />

dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,16 @@
99
use Magento\Customer\Test\Fixture\Customer;
1010

1111
/**
12-
* Test Flow:
13-
*
1412
* Preconditions:
15-
* 1. Customer registered
16-
* 2. Products are created
13+
* 1. Customer registered.
14+
* 2. Products are created.
1715
*
1816
* Steps:
19-
* 1. Login as customer
20-
* 2. Add products to Wishlist
21-
* 3. Navigate to My Account -> My Wishlist
22-
* 4. Click "Remove item"
23-
* 5. Perform all assertions
17+
* 1. Login as customer.
18+
* 2. Add products to Wishlist.
19+
* 3. Navigate to My Account > My Wishlist.
20+
* 4. Click "Remove item".
21+
* 5. Perform all assertions.
2422
*
2523
* @group Wishlist_(CS)
2624
* @ZephyrId MAGETWO-28874
@@ -30,18 +28,17 @@ class DeleteProductsFromWishlistOnFrontendTest extends AbstractWishlistTest
3028
/* tags */
3129
const MVP = 'no';
3230
const DOMAIN = 'CS';
33-
const TO_MAINTAIN = 'yes';
3431
/* end tags */
3532

3633
/**
37-
* Delete products form default wish list
34+
* Delete products form default wish list.
3835
*
3936
* @param Customer $customer
4037
* @param string $products
41-
* @param string $removedProductsIndex [optional]
38+
* @param array $removedProductsIndex
4239
* @return array
4340
*/
44-
public function test(Customer $customer, $products, $removedProductsIndex = null)
41+
public function test(Customer $customer, $products, array $removedProductsIndex)
4542
{
4643
// Preconditions
4744
$customer->persist();
@@ -57,27 +54,20 @@ public function test(Customer $customer, $products, $removedProductsIndex = null
5754
}
5855

5956
/**
60-
* Remove products from wish list
57+
* Remove products from wish list.
6158
*
6259
* @param array $products
63-
* @param string $removedProductsIndex
60+
* @param array $removedProductsIndex
6461
* @return array
6562
*/
66-
protected function removeProducts(array $products, $removedProductsIndex)
63+
protected function removeProducts(array $products, array $removedProductsIndex)
6764
{
6865
$productBlock = $this->wishlistIndex->getWishlistBlock()->getProductItemsBlock();
6966
$removeProducts = [];
70-
if ($removedProductsIndex) {
71-
$removedProductsIndex = explode(',', $removedProductsIndex);
72-
foreach ($removedProductsIndex as $index) {
73-
$productBlock->getItemProduct($products[--$index])->remove();
74-
$removeProducts[] = $products[$index];
75-
}
76-
} else {
77-
$productBlock->removeAllProducts();
78-
$removeProducts = $products;
67+
foreach ($removedProductsIndex as $index) {
68+
$productBlock->getItemProduct($products[--$index])->remove();
69+
$removeProducts[] = $products[$index];
7970
}
80-
8171
return $removeProducts;
8272
}
8373
}

dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.xml

Lines changed: 61 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,65 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
9-
<testCase name="Magento\Wishlist\Test\TestCase\DeleteProductsFromWishlistOnFrontendTest">
10-
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation1" firstConstraint="Magento\Wishlist\Test\Constraint\AssertProductsIsAbsentInWishlist" method="test">
11-
<data name="products" xsi:type="string">catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar</data>
12-
<data name="removedProductsIndex" xsi:type="string">1</data>
13-
<constraint name="Magento\Wishlist\Test\Constraint\AssertProductsIsAbsentInWishlist"/>
14-
</variation>
15-
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation2" firstConstraint="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" method="test">
16-
<data name="products" xsi:type="string">catalogProductVirtual::product_50_dollar</data>
17-
<data name="removedProductsIndex" xsi:type="string">1</data>
18-
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty"/>
19-
</variation>
20-
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation3" firstConstraint="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" method="test">
21-
<data name="products" xsi:type="string">catalogProductSimple::default,catalogProductVirtual::product_50_dollar,catalogProductSimple::default,catalogProductVirtual::product_50_dollar</data>
22-
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty"/>
23-
</variation>
24-
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation4" firstConstraint="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" method="test">
25-
<data name="products" xsi:type="string">bundleProduct::bundle_dynamic_product</data>
26-
<data name="removedProductsIndex" xsi:type="string">1</data>
27-
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty"/>
28-
</variation>
29-
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation5" firstConstraint="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" method="test">
30-
<data name="products" xsi:type="string">bundleProduct::bundle_fixed_product</data>
31-
<data name="removedProductsIndex" xsi:type="string">1</data>
32-
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty"/>
33-
</variation>
34-
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation6" firstConstraint="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" method="test">
35-
<data name="products" xsi:type="string">configurableProduct::default</data>
36-
<data name="removedProductsIndex" xsi:type="string">1</data>
37-
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty"/>
38-
</variation>
39-
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation7" firstConstraint="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" method="test">
40-
<data name="products" xsi:type="string">downloadableProduct::with_two_separately_links</data>
41-
<data name="removedProductsIndex" xsi:type="string">1</data>
42-
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty"/>
43-
</variation>
44-
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation8" firstConstraint="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" method="test">
45-
<data name="products" xsi:type="string">groupedProduct::three_simple_products</data>
46-
<data name="removedProductsIndex" xsi:type="string">1</data>
47-
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty"/>
48-
</variation>
49-
</testCase>
9+
<testCase name="Magento\Wishlist\Test\TestCase\DeleteProductsFromWishlistOnFrontendTest">
10+
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation1">
11+
<data name="products" xsi:type="string">catalogProductSimple::product_100_dollar,catalogProductVirtual::product_50_dollar</data>
12+
<data name="removedProductsIndex" xsi:type="array">
13+
<item name="0" xsi:type="string">1</item>
14+
</data>
15+
<constraint name="Magento\Wishlist\Test\Constraint\AssertProductsIsAbsentInWishlist" />
16+
</variation>
17+
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation2">
18+
<data name="products" xsi:type="string">catalogProductVirtual::product_50_dollar</data>
19+
<data name="removedProductsIndex" xsi:type="array">
20+
<item name="0" xsi:type="string">1</item>
21+
</data>
22+
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" />
23+
</variation>
24+
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation3">
25+
<data name="products" xsi:type="string">catalogProductSimple::default,catalogProductVirtual::product_50_dollar,catalogProductSimple::default,catalogProductVirtual::product_50_dollar</data>
26+
<data name="removedProductsIndex" xsi:type="array">
27+
<item name="0" xsi:type="string">1</item>
28+
<item name="1" xsi:type="string">2</item>
29+
<item name="2" xsi:type="string">3</item>
30+
<item name="3" xsi:type="string">4</item>
31+
</data>
32+
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" />
33+
</variation>
34+
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation4">
35+
<data name="products" xsi:type="string">bundleProduct::bundle_dynamic_product</data>
36+
<data name="removedProductsIndex" xsi:type="array">
37+
<item name="0" xsi:type="string">1</item>
38+
</data>
39+
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" />
40+
</variation>
41+
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation5">
42+
<data name="products" xsi:type="string">bundleProduct::bundle_fixed_product</data>
43+
<data name="removedProductsIndex" xsi:type="array">
44+
<item name="0" xsi:type="string">1</item>
45+
</data>
46+
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" />
47+
</variation>
48+
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation6">
49+
<data name="products" xsi:type="string">configurableProduct::default</data>
50+
<data name="removedProductsIndex" xsi:type="array">
51+
<item name="0" xsi:type="string">1</item>
52+
</data>
53+
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" />
54+
</variation>
55+
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation7">
56+
<data name="products" xsi:type="string">downloadableProduct::with_two_separately_links</data>
57+
<data name="removedProductsIndex" xsi:type="array">
58+
<item name="0" xsi:type="string">1</item>
59+
</data>
60+
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" />
61+
</variation>
62+
<variation name="DeleteProductsFromWishlistOnFrontendTestVariation8">
63+
<data name="products" xsi:type="string">groupedProduct::three_simple_products</data>
64+
<data name="removedProductsIndex" xsi:type="array">
65+
<item name="0" xsi:type="string">1</item>
66+
</data>
67+
<constraint name="Magento\Wishlist\Test\Constraint\AssertWishlistIsEmpty" />
68+
</variation>
69+
</testCase>
5070
</config>

0 commit comments

Comments
 (0)