Skip to content

Commit 84d440d

Browse files
committed
MC-4399: Convert AddToCartCrossSellTest to MFTF
- Adding "clean up" steps in the after block. - Replaced waitForLoadingMaskToDisappear with waitForPageLoad.
1 parent 14a63eb commit 84d440d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AddToCartCrossSellTest.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,18 @@
2929
<createData entity="_defaultProduct" stepKey="simpleProduct3">
3030
<requiredEntity createDataKey="category1"/>
3131
</createData>
32+
33+
<actionGroup ref="LoginAsAdmin" stepKey="logInAsAdmin"/>
3234
</before>
3335
<after>
36+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
37+
3438
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimp1"/>
3539
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimp2"/>
3640
<deleteData createDataKey="simpleProduct3" stepKey="deleteSimp3"/>
3741
<deleteData createDataKey="category1" stepKey="deleteCategory"/>
3842
</after>
3943

40-
<actionGroup ref="LoginAsAdmin" stepKey="logInAsAdmin"/>
41-
4244
<!-- Go to simpleProduct1, add simpleProduct2 and simpleProduct3 as cross-sell-->
4345
<amOnPage url="{{AdminProductEditPage.url($simpleProduct1.id$)}}" stepKey="goToProduct1"/>
4446
<click stepKey="openHeader1" selector="{{AdminProductFormRelatedUpSellCrossSellSection.sectionHeader}}"/>
@@ -50,7 +52,7 @@
5052
<argument name="sku" value="$simpleProduct3.sku$"/>
5153
</actionGroup>
5254
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSave"/>
53-
<waitForLoadingMaskToDisappear stepKey="waitForProductPageSave"/>
55+
<waitForPageLoad stepKey="waitForPageLoad1"/>
5456

5557
<!-- Go to simpleProduct3, add simpleProduct1 and simpleProduct2 as cross-sell-->
5658
<amOnPage url="{{AdminProductEditPage.url($simpleProduct3.id$)}}" stepKey="goToProduct3"/>
@@ -63,7 +65,7 @@
6365
<argument name="sku" value="$simpleProduct2.sku$"/>
6466
</actionGroup>
6567
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSave2"/>
66-
<waitForLoadingMaskToDisappear stepKey="waitForProductPageSave2"/>
68+
<waitForPageLoad stepKey="waitForPageLoad2"/>
6769

6870
<!-- Go to frontend, add simpleProduct1 to cart-->
6971
<actionGroup ref="AddSimpleProductToCart" stepKey="addSimp1ToCart">

0 commit comments

Comments
 (0)