Skip to content

Commit 12824cb

Browse files
DeepthiPulluru“Pavan-bj” 
authored andcommitted
ACQE-6616:[Cache Management] Validate Layouts Cache Type
Delete app/code/Magento/CacheInvalidate/Test/Mftf/Test/AdminValidateLayoutsCacheTypeTest.xml
1 parent 7e0e558 commit 12824cb

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="InputCurrencySymbolSection">
12+
<element name="checkValue" type="button" selector="//input[@id='custom_currency_symbol_inheritUSD']"/>
13+
<element name="setCurrency" type="input" selector="//input[@id='custom_currency_symbolUSD']"/>
14+
<element name="saveCurrencySymbol" type="button" selector="//span[text()='Save Currency Symbols']"/>
15+
<element name="productSymbol" type="button" selector="//span[@data-price-type='finalPrice']//span"/>
16+
</section>
17+
</sections>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminValidateLayoutConfigurationTest">
11+
<annotations>
12+
<features value="Cache"/>
13+
<stories value="Cache Management"/>
14+
<title value="Validate Configuration Cache Type"/>
15+
<description value="Validate Configuration Cache Type After Cache Management"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-4231"/>
18+
</annotations>
19+
<before>
20+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
21+
<createData entity="_defaultCategory" stepKey="createPreReqCategory"/>
22+
<createData entity="_defaultProduct" stepKey="createProduct">
23+
<requiredEntity createDataKey="createPreReqCategory"/>
24+
</createData>
25+
<actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPage"/>
26+
</before>
27+
<after>
28+
<!-- Delete category -->
29+
<deleteData createDataKey="createPreReqCategory" stepKey="deleteCategory"/>
30+
<!-- Delete product -->
31+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
32+
<!--Restore currency symbols to default-->
33+
<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">
39+
<argument name="tags" value="" />
40+
</actionGroup>
41+
<!-- Log out -->
42+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
43+
</after>
44+
<!-- Validate Storefront -->
45+
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToProductStorefront">
46+
<argument name="page" value="$$createProduct.name$$.html"/>
47+
</actionGroup>
48+
<!--Assert Currency symbol-->
49+
<waitForText selector="{{InputCurrencySymbolSection.productSymbol}}" userInput="$" stepKey="waitForCurrencySymbolInStoreFront"/>
50+
<!-- Navigate To Currency Symbol-->
51+
<actionGroup ref="AdminNavigateToCurrencySymbolsPageActionGroup" stepKey="navigateToCurrencySymbolsPage"/>
52+
<!--Replace standard currency symbol by custom currency symbol-->
53+
<uncheckOption selector="{{InputCurrencySymbolSection.checkValue}}" stepKey="uncheckConfigSettingsMessage"/>
54+
<fillField selector="{{InputCurrencySymbolSection.setCurrency}}" userInput="£" stepKey="fillDefaultLabel"/>
55+
<!--Save custom currency symbol-->
56+
<waitForElementClickable selector="{{InputCurrencySymbolSection.saveCurrencySymbol}}" stepKey="waitForSaveCurrencySymbol"/>
57+
<click selector="{{InputCurrencySymbolSection.saveCurrencySymbol}}" stepKey="clickSaveCurrencySymbols"/>
58+
<waitForPageLoad stepKey="waitForSave"/>
59+
<waitForText selector="{{AdminMessagesSection.success}}" userInput="{{AdminSaveCurrencySymbolMessageData.success}}" stepKey="seeSuccessMessage"/>
60+
<!--Navigate To Product Storefront-->
61+
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToProductStorefront1">
62+
<argument name="page" value="$$createProduct.name$$.html"/>
63+
</actionGroup>
64+
<!--Assert Currency symbol is not changed-->
65+
<waitForText selector="{{InputCurrencySymbolSection.productSymbol}}" userInput="$" stepKey="waitForCurrencySymbol"/>
66+
<!--Navigate to Cache Management-->
67+
<actionGroup ref="AdminGoToCacheManagementPageActionGroup" stepKey="goToCacheManagementPage1"/>
68+
<!-- Reindex and Flush Cache-->
69+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCachesAfterModulesDisabled1">
70+
<argument name="tags" value="" />
71+
</actionGroup>
72+
<!--Navigate To Product Storefront-->
73+
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToProductStorefront2">
74+
<argument name="page" value="$$createProduct.name$$.html"/>
75+
</actionGroup>
76+
<waitForText selector="{{InputCurrencySymbolSection.productSymbol}}" userInput="£" stepKey="waitForCurrencySymbol1"/>
77+
</test>
78+
</tests>

0 commit comments

Comments
 (0)