|
15 | 15 | </arguments>
|
16 | 16 | <!-- Go to the admin Catalog rule grid and add a new one -->
|
17 | 17 | <amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToAdminCatalogPriceRuleGridPage"/>
|
18 |
| - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> |
| 18 | + <waitForPageLoad time="30" stepKey="waitForPageFullyLoaded"/> |
19 | 19 | <click selector="{{AdminMainActionsSection.add}}" stepKey="addNewRule"/>
|
20 |
| - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear1"/> |
21 | 20 |
|
22 | 21 | <!-- Fill the form according the attributes of the entity -->
|
| 22 | + <waitForElementVisible selector="{{AdminCatalogPriceRuleSection.ruleName}}" stepKey="waitRuleNameFieldAppears"/> |
23 | 23 | <fillField selector="{{AdminCatalogPriceRuleSection.ruleName}}" userInput="{{catalogRule.name}}" stepKey="fillName"/>
|
24 | 24 | <fillField selector="{{AdminCatalogPriceRuleSection.description}}" userInput="{{catalogRule.description}}" stepKey="fillDescription"/>
|
25 | 25 | <selectOption selector="{{AdminCatalogPriceRuleSection.websites}}" parameterArray="{{catalogRule.websites}}" stepKey="selectWebsites"/>
|
26 | 26 | <selectOption selector="{{AdminCatalogPriceRuleSection.customerGroups}}" parameterArray="{{catalogRule.groups}}" stepKey="selectCustomerGroups"/>
|
27 | 27 |
|
28 |
| - <click selector="{{AdminCatalogPriceRuleSection.actionsTab}}" stepKey="openActionDropdown"/> |
| 28 | + <scrollTo selector="{{AdminCatalogPriceRuleSection.actionsTabTitle}}" stepKey="scrollToActionsSection"/> |
| 29 | + <conditionalClick selector="{{AdminCatalogPriceRuleSection.actionsTabTitle}}" dependentSelector="{{AdminCatalogPriceRuleSection.actionsTabBody}}" visible="false" stepKey="openActionsTabIfCollapsed"/> |
29 | 30 | <selectOption selector="{{AdminCatalogPriceRuleActionsSection.apply}}" userInput="{{catalogRule.simple_action}}" stepKey="discountType"/>
|
30 | 31 | <fillField selector="{{AdminCatalogPriceRuleActionsSection.discountAmount}}" userInput="{{catalogRule.discount_amount}}" stepKey="fillDiscountValue"/>
|
31 | 32 | <selectOption selector="{{AdminCatalogPriceRuleActionsSection.disregardRules}}" userInput="Yes" stepKey="discardSubsequentRules"/>
|
32 | 33 |
|
33 | 34 | <!-- Scroll to top and either save or save and apply after the action group -->
|
34 | 35 | <scrollToTopOfPage stepKey="scrollToTop"/>
|
35 | 36 | <click selector="{{AdminMainActionsSection.save}}" stepKey="clickSave"/>
|
36 |
| - <waitForPageLoad stepKey="waitForRuleSaved"/> |
37 |
| - <see userInput="You saved the rule." stepKey="verifyRuleSaved"/> |
| 37 | + <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/> |
| 38 | + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the rule." stepKey="checkSuccessMessage"/> |
38 | 39 | </actionGroup>
|
39 | 40 |
|
40 | 41 | <actionGroup name="RemoveCatalogPriceRule">
|
|
48 | 49 | <fillField selector="{{AdminCatalogPriceRuleGridSection.filterByRuleName}}" userInput="{{ruleName}}" stepKey="filterByRuleName"/>
|
49 | 50 | <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickSearch"/>
|
50 | 51 | <click selector="{{AdminGridTableSection.row('1')}}" stepKey="clickEdit"/>
|
51 |
| - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear1"/> |
52 |
| - |
| 52 | + <waitForPageLoad stepKey="waitForEditRuleFormLoad"/> |
| 53 | + <waitForElementVisible selector="{{AdminMainActionsSection.delete}}" stepKey="waitDeleteButtonAppears"/> |
53 | 54 | <click selector="{{AdminMainActionsSection.delete}}" stepKey="clickToDelete"/>
|
54 | 55 | <waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForElementVisible"/>
|
55 | 56 | <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="clickToConfirm"/>
|
56 | 57 | <waitForPageLoad stepKey="waitForPageLoad"/>
|
57 |
| - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/> |
58 | 58 | <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitSuccessMessageAppears"/>
|
59 | 59 | <see selector="{{AdminMessagesSection.success}}" userInput="You deleted the rule." stepKey="checkSuccessMessage"/>
|
60 | 60 | </actionGroup>
|
|
0 commit comments