Skip to content

Commit 5ccc5bb

Browse files
author
Dmytro Aponasenko
committed
MTA-2343: Move all test data to repositories
1 parent 0fe4a19 commit 5ccc5bb

File tree

14 files changed

+84
-90
lines changed

14 files changed

+84
-90
lines changed

dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ abstract class Grid extends Block
186186
*
187187
* @var string
188188
*/
189-
protected $rowPattern = '//tr[%s]';
189+
protected $rowPattern = '//tbody/tr[%s]';
190190

191191
/**
192192
* Get backend abstract block

dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class AbstractCartItem extends Block
6363
*
6464
* @var string
6565
*/
66-
protected $optionsBlock = './/dl[@class="item-options"]';
66+
protected $optionsBlock = './/dl[contains(@class, "item-options")]';
6767

6868
/**
6969
* Escape currency in price

dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
use Magento\Mtf\TestCase\Injectable;
1515

1616
/**
17-
* Test Creation for AddProductsToShoppingCartEntity
18-
*
19-
* Test Flow:
20-
*
2117
* Preconditions:
2218
* 1. All type products is created
2319
*

dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/AddProductsToShoppingCartEntityTest.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@
5454
</variation>
5555
<variation name="AddProductsToShoppingCartEntityTestVariation6">
5656
<data name="productsData" xsi:type="string">downloadableProduct::with_two_separately_links</data>
57-
<data name="cart/data/grand_total" xsi:type="string">46</data>
58-
<data name="issue" xsi:type="string">Bug: MAGETWO-24195</data>
57+
<data name="cart/data/grand_total" xsi:type="string">22.43</data>
5958
<constraint name="Magento\Checkout\Test\Constraint\AssertPriceInShoppingCart" />
6059
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInShoppingCart" />
6160
<constraint name="Magento\Checkout\Test\Constraint\AssertSubtotalInShoppingCart" />
@@ -73,8 +72,7 @@
7372
</variation>
7473
<variation name="AddProductsToShoppingCartEntityTestVariation8">
7574
<data name="productsData" xsi:type="string">catalogProductSimple::with_two_custom_option, catalogProductVirtual::product_50_dollar, downloadableProduct::with_two_separately_links, groupedProduct::three_simple_products, configurableProduct::default, bundleProduct::bundle_dynamic_product, bundleProduct::bundle_dynamic_product</data>
76-
<data name="cart/data/grand_total" xsi:type="string">3249</data>
77-
<data name="issue" xsi:type="string">Bug: MAGETWO-24195</data>
75+
<data name="cart/data/grand_total" xsi:type="string">2510</data>
7876
<constraint name="Magento\Checkout\Test\Constraint\AssertPriceInShoppingCart" />
7977
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInShoppingCart" />
8078
<constraint name="Magento\Checkout\Test\Constraint\AssertSubtotalInShoppingCart" />

dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
use Magento\Mtf\TestCase\Injectable;
1515

1616
/**
17-
* Class DeleteProductFromMiniShoppingCartTest
18-
* Test delete products from shopping cart
19-
*
20-
* Preconditions
17+
* Preconditions:
2118
* 1. Create product according to dataset
2219
* 2. Add products to cart
2320
*

dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/DeleteProductFromMiniShoppingCartTest.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
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\Checkout\Test\TestCase\DeleteProductFromMiniShoppingCartTest">
10-
<variation name="DeleteProductFromMiniShoppingCartTestVariation1">
11-
<data name="description" xsi:type="string">delete Simple</data>
12-
<data name="products" xsi:type="string">catalogProductSimple::default, catalogProductVirtual::default</data>
13-
<data name="deletedProductIndex" xsi:type="string">0</data>
14-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductAbsentInMiniShoppingCart"/>
15-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductPresentInMiniShoppingCart"/>
16-
</variation>
17-
<variation name="DeleteProductFromMiniShoppingCartTestVariation2">
18-
<data name="description" xsi:type="string">delete Simple</data>
19-
<data name="products" xsi:type="string">catalogProductSimple::default</data>
20-
<data name="deletedProductIndex" xsi:type="string">0</data>
21-
<constraint name="Magento\Checkout\Test\Constraint\AssertCartIsEmpty"/>
22-
</variation>
23-
</testCase>
9+
<testCase name="Magento\Checkout\Test\TestCase\DeleteProductFromMiniShoppingCartTest">
10+
<variation name="DeleteProductFromMiniShoppingCartTestVariation1">
11+
<data name="description" xsi:type="string">delete Simple</data>
12+
<data name="products" xsi:type="string">catalogProductSimple::default, catalogProductVirtual::default</data>
13+
<data name="deletedProductIndex" xsi:type="string">0</data>
14+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductAbsentInMiniShoppingCart" />
15+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductPresentInMiniShoppingCart" />
16+
</variation>
17+
<variation name="DeleteProductFromMiniShoppingCartTestVariation2">
18+
<data name="description" xsi:type="string">delete Simple</data>
19+
<data name="products" xsi:type="string">catalogProductSimple::default</data>
20+
<data name="deletedProductIndex" xsi:type="string">0</data>
21+
<constraint name="Magento\Checkout\Test\Constraint\AssertCartIsEmpty" />
22+
</variation>
23+
</testCase>
2424
</config>

dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
use Magento\Mtf\TestCase\Injectable;
1414

1515
/**
16-
* Test Flow:
17-
*
1816
* Preconditions:
1917
* 1. Create product according to dataset.
2018
* 2. Go to frontend.

dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/UpdateProductFromMiniShoppingCartEntityTest.xml

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,40 @@
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\Checkout\Test\TestCase\UpdateProductFromMiniShoppingCartEntityTest">
10-
<variation name="UpdateProductFromMiniShoppingCartEntityTestVariation1">
11-
<data name="description" xsi:type="string">Update Simple</data>
12-
<data name="originalProduct" xsi:type="string">catalogProductSimple::with_two_custom_option</data>
13-
<data name="checkoutData/dataset" xsi:type="string">simple_update_mini_shopping_cart</data>
14-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInMiniShoppingCart"/>
15-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInShoppingCart"/>
16-
</variation>
17-
<variation name="UpdateProductFromMiniShoppingCartEntityTestVariation2">
18-
<data name="description" xsi:type="string">Update Configurable and verify previous product was updated to new one in shopping cart and mini shopping cart</data>
19-
<data name="originalProduct" xsi:type="string">configurableProduct::default</data>
20-
<data name="checkoutData/dataset" xsi:type="string">configurable_update_mini_shopping_cart</data>
21-
<constraint name="Magento\Checkout\Test\Constraint\AssertCartItemsOptions"/>
22-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInMiniShoppingCart"/>
23-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInShoppingCart"/>
24-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductOptionsAbsentInShoppingCart"/>
25-
</variation>
26-
<variation name="UpdateProductFromMiniShoppingCartEntityTestVariation3">
27-
<data name="description" xsi:type="string">Update Bundle and verify previous product was updated to new one in shopping cart and mini shopping cart</data>
28-
<data name="originalProduct" xsi:type="string">bundleProduct::bundle_fixed_product</data>
29-
<data name="checkoutData/dataset" xsi:type="string">bundle_update_mini_shopping_cart</data>
30-
<constraint name="Magento\Checkout\Test\Constraint\AssertCartItemsOptions"/>
31-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInMiniShoppingCart"/>
32-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInShoppingCart"/>
33-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductOptionsAbsentInShoppingCart"/>
34-
</variation>
35-
<variation name="UpdateProductFromMiniShoppingCartEntityTestVariation4">
36-
<data name="description" xsi:type="string">Update Downloadable and check previous link was updated to new one in shopping cart and mini shopping cart</data>
37-
<data name="originalProduct" xsi:type="string">downloadableProduct::with_two_separately_links</data>
38-
<data name="checkoutData/dataset" xsi:type="string">downloadable_update_mini_shopping_cart</data>
39-
<data name="issue" xsi:type="string">Bug: MAGETWO-24195</data>
40-
<constraint name="Magento\Checkout\Test\Constraint\AssertCartItemsOptions"/>
41-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInMiniShoppingCart"/>
42-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInShoppingCart"/>
43-
<constraint name="Magento\Checkout\Test\Constraint\AssertProductOptionsAbsentInShoppingCart"/>
44-
</variation>
45-
</testCase>
9+
<testCase name="Magento\Checkout\Test\TestCase\UpdateProductFromMiniShoppingCartEntityTest">
10+
<variation name="UpdateProductFromMiniShoppingCartEntityTestVariation1">
11+
<data name="description" xsi:type="string">Update Simple</data>
12+
<data name="originalProduct" xsi:type="string">catalogProductSimple::with_two_custom_option</data>
13+
<data name="checkoutData/dataset" xsi:type="string">simple_update_mini_shopping_cart</data>
14+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInMiniShoppingCart" />
15+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInShoppingCart" />
16+
</variation>
17+
<variation name="UpdateProductFromMiniShoppingCartEntityTestVariation2">
18+
<data name="description" xsi:type="string">Update Configurable and verify previous product was updated to new one in shopping cart and mini shopping cart</data>
19+
<data name="originalProduct" xsi:type="string">configurableProduct::default</data>
20+
<data name="checkoutData/dataset" xsi:type="string">configurable_update_mini_shopping_cart</data>
21+
<constraint name="Magento\Checkout\Test\Constraint\AssertCartItemsOptions" />
22+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInMiniShoppingCart" />
23+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInShoppingCart" />
24+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductOptionsAbsentInShoppingCart" />
25+
</variation>
26+
<variation name="UpdateProductFromMiniShoppingCartEntityTestVariation3">
27+
<data name="description" xsi:type="string">Update Bundle and verify previous product was updated to new one in shopping cart and mini shopping cart</data>
28+
<data name="originalProduct" xsi:type="string">bundleProduct::bundle_fixed_product</data>
29+
<data name="checkoutData/dataset" xsi:type="string">bundle_update_mini_shopping_cart</data>
30+
<constraint name="Magento\Checkout\Test\Constraint\AssertCartItemsOptions" />
31+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInMiniShoppingCart" />
32+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInShoppingCart" />
33+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductOptionsAbsentInShoppingCart" />
34+
</variation>
35+
<variation name="UpdateProductFromMiniShoppingCartEntityTestVariation4">
36+
<data name="description" xsi:type="string">Update Downloadable and check previous link was updated to new one in shopping cart and mini shopping cart</data>
37+
<data name="originalProduct" xsi:type="string">downloadableProduct::with_two_separately_links</data>
38+
<data name="checkoutData/dataset" xsi:type="string">downloadable_update_mini_shopping_cart</data>
39+
<constraint name="Magento\Checkout\Test\Constraint\AssertCartItemsOptions" />
40+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInMiniShoppingCart" />
41+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductQtyInShoppingCart" />
42+
<constraint name="Magento\Checkout\Test\Constraint\AssertProductOptionsAbsentInShoppingCart" />
43+
</variation>
44+
</testCase>
4645
</config>

dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LogoutCustomerOnFrontendStep.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
namespace Magento\Customer\Test\TestStep;
88

99
use Magento\Cms\Test\Page\CmsIndex;
10-
use Magento\Customer\Test\Page\CustomerAccountLogout;
1110
use Magento\Mtf\TestStep\TestStepInterface;
11+
use Magento\Customer\Test\Page\CustomerAccountIndex;
1212

1313
/**
1414
* Logout customer on frontend.
@@ -28,21 +28,21 @@ class LogoutCustomerOnFrontendStep implements TestStepInterface
2828
protected $cmsIndex;
2929

3030
/**
31-
* Customer logout page.
31+
* Customer account page.
3232
*
33-
* @var CustomerAccountLogout
33+
* @var CustomerAccountIndex
3434
*/
35-
protected $customerAccountLogout;
35+
protected $customerAccount;
3636

3737
/**
3838
* @constructor
3939
* @param CmsIndex $cmsIndex
40-
* @param CustomerAccountLogout $customerAccountLogout
40+
* @param CustomerAccountIndex $customerAccount
4141
*/
42-
public function __construct(CmsIndex $cmsIndex, CustomerAccountLogout $customerAccountLogout)
42+
public function __construct(CmsIndex $cmsIndex, CustomerAccountIndex $customerAccount)
4343
{
4444
$this->cmsIndex = $cmsIndex;
45-
$this->customerAccountLogout = $customerAccountLogout;
45+
$this->customerAccount = $customerAccount;
4646
}
4747

4848
/**
@@ -52,9 +52,8 @@ public function __construct(CmsIndex $cmsIndex, CustomerAccountLogout $customerA
5252
*/
5353
public function run()
5454
{
55-
$this->cmsIndex->open();
55+
$this->customerAccount->open();
5656
$this->cmsIndex->getCmsPageBlock()->waitPageInit();
57-
$this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page');
5857
if ($this->cmsIndex->getLinksBlock()->isLinkVisible('Sign Out')) {
5958
$this->cmsIndex->getLinksBlock()->openLink('Sign Out');
6059
$this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page');

dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(FixtureInterface $product)
3232
foreach ($checkoutData['options']['links'] as $link) {
3333
$keyLink = str_replace('link_', '', $link['label']);
3434
$checkoutDownloadableOptions[] = [
35-
'title' => 'Links',
35+
'title' => $downloadableOptions['title'],
3636
'value' => $downloadableOptions['downloadable']['link'][$keyLink]['title'],
3737
];
3838
}

0 commit comments

Comments
 (0)