|
29 | 29 | <waitForElementVisible selector="{{AdminConfirmationModalSection.title}}" stepKey="waitingForWarningModal"/>
|
30 | 30 | <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmStoreDelete"/>
|
31 | 31 | <waitForPageLoad stepKey="waitForSuccessMessage"/>
|
32 |
| - <see userInput="You deleted the store view." stepKey="seeDeleteMessage"/> |
| 32 | + <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitSuccessMessageAppears"/> |
| 33 | + <see selector="{{AdminMessagesSection.success}}" userInput="You deleted the store view." stepKey="seeDeleteMessage"/> |
33 | 34 | </actionGroup>
|
34 | 35 |
|
35 | 36 | <actionGroup name="DeleteCustomStoreViewBackupEnabledYesActionGroup">
|
|
72 | 73 | <waitForPageLoad stepKey="waitForStoreToLoad"/>
|
73 | 74 | <see selector="{{AdminStoresGridSection.emptyText}}" userInput="We couldn't find any records." stepKey="seeAssertStoreViewNotInGridMessage"/>
|
74 | 75 | </actionGroup>
|
| 76 | + |
| 77 | + <actionGroup name="AdminDeleteStoreViewIfExistsActionGroup"> |
| 78 | + <annotations> |
| 79 | + <description>Goes to the Admin Stores grid page. Deletes the provided Store (if exists) without creating a Backup. Validates that the Success Message is present and correct.</description> |
| 80 | + </annotations> |
| 81 | + <arguments> |
| 82 | + <argument name="storeViewName" type="string"/> |
| 83 | + </arguments> |
| 84 | + |
| 85 | + <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/> |
| 86 | + <click selector="{{AdminStoresGridSection.resetButton}}" stepKey="resetSearchFilter"/> |
| 87 | + <fillField selector="{{AdminStoresGridSection.storeFilterTextField}}" userInput="{{storeViewName}}" stepKey="fillSearchStoreViewField"/> |
| 88 | + <click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearchButton"/> |
| 89 | + |
| 90 | + <executeInSelenium function="function($webdriver) use ($I) { |
| 91 | + $items = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::cssSelector('.col-store_title>a')); |
| 92 | + if(!empty($items)) { |
| 93 | + $I->click('.col-store_title>a'); |
| 94 | + $I->waitForPageLoad(10); |
| 95 | + $I->click('#delete'); |
| 96 | + $I->waitForPageLoad(30); |
| 97 | + $I->selectOption('select#store_create_backup', 'No'); |
| 98 | + $I->click('#delete'); |
| 99 | + $I->waitForPageLoad(30); |
| 100 | + $I->waitForElementVisible('aside.confirm .modal-title', 10); |
| 101 | + $I->click('aside.confirm .modal-footer button.action-accept'); |
| 102 | + $I->waitForPageLoad(60); |
| 103 | + $I->waitForElementVisible('#messages div.message-success', 10); |
| 104 | + $I->see('You deleted the store view.', '#messages div.message-success'); |
| 105 | + } |
| 106 | + }" stepKey="deleteStoreViewIfExists"/> |
| 107 | + </actionGroup> |
| 108 | + |
75 | 109 | </actionGroups>
|
0 commit comments