|
42 | 42 | <argument name="ruleName" defaultValue="CustomCatalogRule.name"/>
|
43 | 43 | </arguments>
|
44 | 44 | <amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToAdminCatalogPriceRuleGridPage"/>
|
45 |
| - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> |
46 |
| - |
| 45 | + <!-- It sometimes is loading too long for default 10s --> |
| 46 | + <waitForPageLoad time="60" stepKey="waitForPageFullyLoaded"/> |
| 47 | + <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/> |
47 | 48 | <fillField selector="{{AdminCatalogPriceRuleGridSection.filterByRuleName}}" userInput="{{ruleName}}" stepKey="filterByRuleName"/>
|
48 | 49 | <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickSearch"/>
|
49 | 50 | <click selector="{{AdminGridTableSection.row('1')}}" stepKey="clickEdit"/>
|
|
54 | 55 | <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="clickToConfirm"/>
|
55 | 56 | <waitForPageLoad stepKey="waitForPageLoad"/>
|
56 | 57 | <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear2"/>
|
57 |
| - <see userInput="You deleted the rule." stepKey="verifyRuleIsDeleted"/> |
| 58 | + <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitSuccessMessageAppears"/> |
| 59 | + <see selector="{{AdminMessagesSection.success}}" userInput="You deleted the rule." stepKey="checkSuccessMessage"/> |
58 | 60 | </actionGroup>
|
59 | 61 | <!--Add Catalog Rule Condition With product SKU-->
|
60 | 62 | <actionGroup name="newCatalogPriceRuleByUIWithConditionIsSKU" extends="CreateCatalogPriceRule">
|
|
88 | 90 | </arguments>
|
89 | 91 |
|
90 | 92 | <amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToAdminCatalogPriceRuleGridPage"/>
|
| 93 | + <!-- It sometimes is loading too long for default 10s --> |
| 94 | + <waitForPageLoad time="60" stepKey="waitForPageFullyLoaded"/> |
91 | 95 | <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/>
|
92 | 96 | <fillField selector="{{AdminCatalogPriceRuleGridSection.filterByRuleName}}" userInput="{{ruleName}}" stepKey="filterByRuleName"/>
|
93 | 97 | <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickSearch"/>
|
94 | 98 | <click selector="{{AdminGridTableSection.row('1')}}" stepKey="clickEdit"/>
|
95 |
| - <waitForPageLoad stepKey="waitForPageLoad"/> |
| 99 | + <waitForPageLoad time="30" stepKey="waitForPageLoad"/> |
| 100 | + </actionGroup> |
| 101 | + |
| 102 | + <actionGroup name="deleteAllCatalogPriceRule"> |
| 103 | + <amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToAdminCatalogPriceRuleGridPage"/> |
| 104 | + <!-- It sometimes is loading too long for default 10s --> |
| 105 | + <waitForPageLoad time="60" stepKey="waitForPageFullyLoaded"/> |
| 106 | + <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/> |
| 107 | + <executeInSelenium |
| 108 | + function=" |
| 109 | + function ($webdriver) use ($I) { |
| 110 | + $rows = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::cssSelector('table.data-grid tbody tr._clickable[data-role=row]:nth-of-type(1)')); |
| 111 | + while(!empty($rows)) { |
| 112 | + $rows[0]->click(); |
| 113 | + $I->waitForPageLoad(30); |
| 114 | + $I->click('#delete'); |
| 115 | + $I->waitForPageLoad(30); |
| 116 | + $I->waitForElementVisible('aside.confirm .modal-footer button.action-accept', 10); |
| 117 | + $I->waitForPageLoad(60); |
| 118 | + $I->click('aside.confirm .modal-footer button.action-accept'); |
| 119 | + $I->waitForPageLoad(60); |
| 120 | + $I->waitForLoadingMaskToDisappear(); |
| 121 | + $I->waitForElementVisible('#messages div.message-success', 10); |
| 122 | + $I->see('You deleted the rule.', '#messages div.message-success'); |
| 123 | + $rows = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::cssSelector('table.data-grid tbody tr._clickable[data-role=row]:nth-of-type(1)')); |
| 124 | + } |
| 125 | + }" |
| 126 | + stepKey="deleteAllCartPriceRulesOneByOne"/> |
| 127 | + <waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitDataGridEmptyMessageAppears"/> |
| 128 | + <see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/> |
96 | 129 | </actionGroup>
|
97 | 130 | </actionGroups>
|
0 commit comments