Skip to content

Commit a1c8245

Browse files
committed
Merge remote-tracking branch 'origin/MC-22132' into 2.3-develop-pr84
2 parents 6e28b7e + c999f9f commit a1c8245

File tree

2 files changed

+62
-17
lines changed

2 files changed

+62
-17
lines changed

app/code/Magento/Store/Test/Mftf/ActionGroup/AdminDeleteStoreViewActionGroup.xml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
<waitForElementVisible selector="{{AdminConfirmationModalSection.title}}" stepKey="waitingForWarningModal"/>
3030
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmStoreDelete"/>
3131
<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"/>
3334
</actionGroup>
3435

3536
<actionGroup name="DeleteCustomStoreViewBackupEnabledYesActionGroup">
@@ -72,4 +73,37 @@
7273
<waitForPageLoad stepKey="waitForStoreToLoad"/>
7374
<see selector="{{AdminStoresGridSection.emptyText}}" userInput="We couldn't find any records." stepKey="seeAssertStoreViewNotInGridMessage"/>
7475
</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+
75109
</actionGroups>

app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest.xml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@
1818
<group value="urlRewrite"/>
1919
</annotations>
2020
<before>
21+
<createData entity="ApiCategory" stepKey="createCategory">
22+
<field key="name">category-admin</field>
23+
</createData>
2124
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
25+
<actionGroup ref="AdminDeleteStoreViewIfExistsActionGroup" stepKey="deleteENStoreViewIfExists">
26+
<argument name="storeViewName" value="{{customStoreENNotUnique.name}}"/>
27+
</actionGroup>
28+
<actionGroup ref="AdminDeleteStoreViewIfExistsActionGroup" stepKey="deleteNLStoreViewIfExists">
29+
<argument name="storeViewName" value="{{customStoreNLNotUnique.name}}"/>
30+
</actionGroup>
2231
<!-- Create Store View EN -->
2332
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewEn">
2433
<argument name="customStore" value="customStoreENNotUnique"/>
@@ -27,9 +36,6 @@
2736
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewNl">
2837
<argument name="customStore" value="customStoreNLNotUnique"/>
2938
</actionGroup>
30-
<createData entity="ApiCategory" stepKey="createCategory">
31-
<field key="name">category-admin</field>
32-
</createData>
3339
</before>
3440
<after>
3541
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
@@ -38,12 +44,13 @@
3844
<argument name="name" value="productformagetwo68980"/>
3945
</actionGroup>
4046
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFiltersIfSet"/>
41-
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
42-
<argument name="customStore" value="customStoreENNotUnique"/>
47+
<actionGroup ref="AdminDeleteStoreViewIfExistsActionGroup" stepKey="deleteStoreViewEn">
48+
<argument name="storeViewName" value="{{customStoreENNotUnique.name}}"/>
4349
</actionGroup>
44-
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewNl">
45-
<argument name="customStore" value="customStoreNLNotUnique"/>
50+
<actionGroup ref="AdminDeleteStoreViewIfExistsActionGroup" stepKey="deleteStoreViewNl">
51+
<argument name="storeViewName" value="{{customStoreNLNotUnique.name}}"/>
4652
</actionGroup>
53+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearStoreFilters"/>
4754
<actionGroup ref="logout" stepKey="logout"/>
4855
</after>
4956
<actionGroup ref="switchCategoryStoreView" stepKey="switchToStoreViewEn">
@@ -130,8 +137,16 @@
130137
<magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="enableGenerateUrlRewrite"/>
131138
<!--Flush cache-->
132139
<magentoCLI command="cache:flush" stepKey="cleanCache1"/>
133-
140+
<createData entity="ApiCategory" stepKey="createCategory">
141+
<field key="name">category-admin</field>
142+
</createData>
134143
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
144+
<actionGroup ref="AdminDeleteStoreViewIfExistsActionGroup" stepKey="deleteENStoreViewIfExists">
145+
<argument name="storeViewName" value="{{customStoreENNotUnique.name}}"/>
146+
</actionGroup>
147+
<actionGroup ref="AdminDeleteStoreViewIfExistsActionGroup" stepKey="deleteNLStoreViewIfExists">
148+
<argument name="storeViewName" value="{{customStoreNLNotUnique.name}}"/>
149+
</actionGroup>
135150
<!-- Create Store View EN -->
136151
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewEn">
137152
<argument name="customStore" value="customStoreENNotUnique"/>
@@ -140,10 +155,6 @@
140155
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreViewNl">
141156
<argument name="customStore" value="customStoreNLNotUnique"/>
142157
</actionGroup>
143-
<createData entity="ApiCategory" stepKey="createCategory">
144-
<field key="name">category-admin</field>
145-
</createData>
146-
147158
<!-- Set the configuration for Generate "category/product" URL Rewrites to No-->
148159
<comment userInput="Disable SEO configuration setting to generate category/product URL Rewrites" stepKey="commentDisableUrlRewriteConfig" />
149160
<magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 0" stepKey="disableGenerateUrlRewrite"/>
@@ -157,11 +168,11 @@
157168
<argument name="name" value="productformagetwo68980"/>
158169
</actionGroup>
159170
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearFiltersIfSet"/>
160-
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
161-
<argument name="customStore" value="customStoreENNotUnique"/>
171+
<actionGroup ref="AdminDeleteStoreViewIfExistsActionGroup" stepKey="deleteStoreViewEn">
172+
<argument name="storeViewName" value="{{customStoreENNotUnique.name}}"/>
162173
</actionGroup>
163-
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewNl">
164-
<argument name="customStore" value="customStoreNLNotUnique"/>
174+
<actionGroup ref="AdminDeleteStoreViewIfExistsActionGroup" stepKey="deleteStoreViewNl">
175+
<argument name="storeViewName" value="{{customStoreNLNotUnique.name}}"/>
165176
</actionGroup>
166177
<actionGroup ref="logout" stepKey="logout"/>
167178
<magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="resetConfigurationSetting"/>

0 commit comments

Comments
 (0)