|
74 | 74 | <!--Log out of admin and login with newly created user-->
|
75 | 75 | <comment userInput="Log out of admin and login with newly created user" stepKey="commentLoginWithNewUser"/>
|
76 | 76 | <actionGroup ref="logout" stepKey="logoutOfAdmin"/>
|
77 |
| - <actionGroup ref="LoginNewUser" stepKey="loginActionGroup"> |
78 |
| - <argument name="user" value="admin2"/> |
| 77 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsNewUser"> |
| 78 | + <argument name="adminUser" value="admin2"/> |
79 | 79 | </actionGroup>
|
80 | 80 | <!--Go to create product page-->
|
81 | 81 | <comment userInput="Go to create product page" stepKey="commentGoCreateProductPage"/>
|
|
88 | 88 | <argument name="categoryName" value="$$createCategory.name$$"/>
|
89 | 89 | </actionGroup>
|
90 | 90 | <actionGroup ref="saveProductForm" stepKey="saveProduct"/>
|
| 91 | + <!--Assert that category exist in field--> |
| 92 | + <comment userInput="Assert that category exist in field" stepKey="commentAssertion"/> |
| 93 | + <grabTextFrom selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="grabCategoryName"/> |
| 94 | + <assertContains stepKey="assertThatCategory"> |
| 95 | + <expectedResult type="variable">$$createCategory.name$$</expectedResult> |
| 96 | + <actualResult type="variable">$grabCategoryName</actualResult> |
| 97 | + </assertContains> |
| 98 | + <!--Remove the category from the product and assert that it removed--> |
| 99 | + <comment userInput="Remove the category from the product and assert that it removed" stepKey="AssertCategoryRemoved"/> |
| 100 | + <actionGroup ref="removeCategoryFromProduct" stepKey="removeCategoryFromProduct"> |
| 101 | + <argument name="categoryName" value="$$createCategory.name$$"/> |
| 102 | + </actionGroup> |
| 103 | + <actionGroup ref="saveProductForm" stepKey="saveProductAfterRemovingCategory"/> |
| 104 | + <grabTextFrom selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="grabCategoryFieldContent"/> |
| 105 | + <assertNotContains stepKey="assertThatCategoryRemoved"> |
| 106 | + <expectedResult type="variable">$$createCategory.name$$</expectedResult> |
| 107 | + <actualResult type="variable">$grabCategoryFieldContent</actualResult> |
| 108 | + </assertNotContains> |
91 | 109 | </test>
|
92 | 110 | </tests>
|
0 commit comments