Skip to content

Commit 1e53b57

Browse files
“Pavan-bj” “Pavan-bj” 
authored andcommitted
ACQE-6616:[Cache Management] Validate Layouts Cache Type
Changes made as per latest comments
1 parent 6263baf commit 1e53b57

File tree

4 files changed

+22
-32
lines changed

4 files changed

+22
-32
lines changed

app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,8 @@
2323
<element name="errorMessage" type="text" selector=".message.message-error.error"/>
2424
<element name="warningMessage" type="text" selector=".message-warning"/>
2525
<element name="noticeMessage" type="text" selector=".message-notice"/>
26+
<element name="assertFlushCacheWarningMessage" type="button" selector="//div[@class='message-system-short-wrapper']//div[@class='message message-warning']"/>
27+
<element name="assertCacheManagementConfigurationStatus" type="button" selector="//td[@data-column='tags' and contains(text(),'CONFIG')]/following-sibling::td//span[@class='grid-severity-notice']//span"/>
28+
<element name="assertCacheManagementLayoutsStatus" type="button" selector="//td[@data-column='tags' and contains(text(),'LAYOUT_GENERAL_CACHE_TAG')]/following-sibling::td//span[@class='grid-severity-notice']//span"/>
2629
</section>
2730
</sections>

app/code/Magento/CacheInvalidate/Test/Mftf/Section/InputCurrencySymbolSection.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/code/Magento/CacheInvalidate/Test/Mftf/Test/AdminValidateLayoutsCacheTypeTest.xml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<requiredEntity createDataKey="createPreReqCategory"/>
2424
</createData>
2525
<actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPage"/>
26+
<waitForText selector="{{AdminMessagesSection.assertCacheManagementLayoutsStatus}}" userInput="ENABLED" stepKey="verifyCacheTypeLayoutsIsENABLED"/>
2627
</before>
2728
<after>
2829
<!-- Delete category -->
@@ -31,11 +32,11 @@
3132
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
3233
<!--Restore currency symbols to default-->
3334
<actionGroup ref="AdminNavigateToCurrencySymbolsPageActionGroup" stepKey="navigateToCurrencySymbolsPageToRestore"/>
34-
<checkOption selector="{{InputCurrencySymbolSection.checkValue}}" stepKey="checkConfigSettingsMessage"/>
35-
<waitForElementClickable selector="{{InputCurrencySymbolSection.saveCurrencySymbol}}" stepKey="waitForSaveCurrencySymbolAgain"/>
36-
<click selector="{{InputCurrencySymbolSection.saveCurrencySymbol}}" stepKey="clickSaveCurrencySymbolsToRestore"/>
37-
<!-- Reindex and Flush Cache-->
38-
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCachesAfterModulesDisabled1">
35+
<checkOption selector="{{AdminCurrencySymbolsGridSection.currencyCheckBox}}" stepKey="checkConfigSettingsMessage"/>
36+
<waitForElementClickable selector="{{AdminCurrencySymbolsGridSection.saveCurrencySymbols}}" stepKey="waitForSaveCurrencySymbolAgain"/>
37+
<click selector="{{AdminCurrencySymbolsGridSection.saveCurrencySymbols}}" stepKey="clickSaveCurrencySymbolsToRestore"/>
38+
<!-- Flush Cache-->
39+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCachesAfterRevokingTheChangesToDefault">
3940
<argument name="tags" value="" />
4041
</actionGroup>
4142
<!-- Log out -->
@@ -46,33 +47,33 @@
4647
<argument name="page" value="$$createProduct.name$$.html"/>
4748
</actionGroup>
4849
<!--Assert Currency symbol-->
49-
<waitForText selector="{{InputCurrencySymbolSection.productSymbol}}" userInput="$" stepKey="waitForCurrencySymbolInStoreFront"/>
50+
<waitForText selector="{{AdminCurrencySymbolsGridSection.currencySymbolOfProduct}}" userInput="$" stepKey="waitForCurrencySymbolInStoreFront"/>
5051
<!-- Navigate To Currency Symbol-->
5152
<actionGroup ref="AdminNavigateToCurrencySymbolsPageActionGroup" stepKey="navigateToCurrencySymbolsPage"/>
5253
<!--Replace standard currency symbol by custom currency symbol-->
53-
<uncheckOption selector="{{InputCurrencySymbolSection.checkValue}}" stepKey="uncheckConfigSettingsMessage"/>
54-
<fillField selector="{{InputCurrencySymbolSection.setCurrency}}" userInput="£" stepKey="fillDefaultLabel"/>
54+
<uncheckOption selector="{{AdminCurrencySymbolsGridSection.currencyCheckBox}}" stepKey="uncheckConfigSettingsMessage"/>
55+
<fillField selector="{{AdminCurrencySymbolsGridSection.inputCurrencySymbol}}" userInput="£" stepKey="fillDefaultLabel"/>
5556
<!--Save custom currency symbol-->
56-
<waitForElementClickable selector="{{InputCurrencySymbolSection.saveCurrencySymbol}}" stepKey="waitForSaveCurrencySymbol"/>
57-
<click selector="{{InputCurrencySymbolSection.saveCurrencySymbol}}" stepKey="clickSaveCurrencySymbols"/>
58-
<waitForPageLoad stepKey="waitForSave"/>
57+
<waitForElementClickable selector="{{AdminCurrencySymbolsGridSection.saveCurrencySymbols}}" stepKey="waitForSaveCurrencySymbol"/>
58+
<click selector="{{AdminCurrencySymbolsGridSection.saveCurrencySymbols}}" stepKey="clickSaveCurrencySymbols"/>
5959
<waitForText selector="{{AdminMessagesSection.success}}" userInput="{{AdminSaveCurrencySymbolMessageData.success}}" stepKey="seeSuccessMessage"/>
60+
<waitForText selector="{{AdminMessagesSection.assertFlushCacheWarningMessage}}" userInput="One or more of the Cache Types are invalidated: Configuration, Page Cache, Blocks HTML output, Layouts." stepKey="assertFlushCacheWarningMessageAppearAfterChangingConfig"/>
6061
<!--Navigate To Product Storefront-->
6162
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToProductStorefront1">
6263
<argument name="page" value="$$createProduct.name$$.html"/>
6364
</actionGroup>
6465
<!--Assert Currency symbol is not changed-->
65-
<waitForText selector="{{InputCurrencySymbolSection.productSymbol}}" userInput="$" stepKey="waitForCurrencySymbol"/>
66+
<waitForText selector="{{AdminCurrencySymbolsGridSection.currencySymbolOfProduct}}" userInput="$" stepKey="verifyCurrencySymbolIsNotChangedBeforeFlushingTheChangesInStoreFront"/>
6667
<!--Navigate to Cache Management-->
6768
<actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPage1"/>
68-
<!-- Reindex and Flush Cache-->
69-
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCachesAfterModulesDisabled1">
69+
<!-- Flush Cache-->
70+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCachesAfterChangesMade">
7071
<argument name="tags" value="" />
7172
</actionGroup>
7273
<!--Navigate To Product Storefront-->
7374
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToProductStorefront2">
7475
<argument name="page" value="$$createProduct.name$$.html"/>
7576
</actionGroup>
76-
<waitForText selector="{{InputCurrencySymbolSection.productSymbol}}" userInput="£" stepKey="waitForCurrencySymbol1"/>
77+
<waitForText selector="{{AdminCurrencySymbolsGridSection.currencySymbolOfProduct}}" userInput="£" stepKey="verifyCurrencySymbolIsChangedAfterFlushingTheChangesInStoreFront"/>
7778
</test>
7879
</tests>

app/code/Magento/CurrencySymbol/Test/Mftf/Section/AdminCurrencySymbolsGridSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@
1212
<element name="currencyElement" type="input" selector="#currency-symbols-form #custom_currency_symbol{{currency}}" parameterized="true"/>
1313
<element name="currencyCheckElement" type="checkbox" selector="#currency-symbols-form #custom_currency_symbol_inherit{{currency}}" parameterized="true"/>
1414
<element name="saveCurrencySymbols" type="button" selector="//button[@title='Save Currency Symbols']"/>
15+
<element name="currencyCheckBox" type="button" selector="//input[@id='custom_currency_symbol_inheritUSD']"/>
16+
<element name="inputCurrencySymbol" type="input" selector="//input[@id='custom_currency_symbolUSD']"/>
17+
<element name="currencySymbolOfProduct" type="button" selector="//span[@data-price-type='finalPrice']//span"/>
1518
</section>
1619
</sections>

0 commit comments

Comments
 (0)