Skip to content

Commit 904a4a8

Browse files
Convert FlushStaticFilesCacheButtonVisibilityTest to MFTF
1 parent 7b1cd79 commit 904a4a8

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

app/code/Magento/PageCache/Test/Mftf/Section/AdminCacheManagementSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@
3030
<element name="pageCacheCheckbox" type="checkbox" selector="input[value='full_page']"/>
3131
<element name="webServicesConfigCheckbox" type="checkbox" selector="input[value='config_webservice']"/>
3232
<element name="translationsCheckbox" type="checkbox" selector="input[value='translate']"/>
33+
<element name="FlushStaticFilesCache" type="button" selector="//*[@id='container']//button[contains(., 'Flush Static Files Cache')]"/>
3334
</section>
3435
</sections>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="FlushStaticFilesCacheButtonVisibilityTest">
12+
<annotations>
13+
<features value="PageCache"/>
14+
<title value="Check visibility of flush static files cache button"/>
15+
<description value="Flush Static Files Cache button visibility"/>
16+
<severity value="MAJOR"/>
17+
<stories value="Check flush static files cache button"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
<before>
21+
<!-- Log in to Admin Panel -->
22+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
</before>
24+
25+
<!-- Open Cache Management page -->
26+
<amOnPage url="{{AdminCacheManagementPage.url}}" stepKey="amOnPageCacheManagement"/>
27+
<waitForPageLoad stepKey="waitForPageCacheManagementLoad"/>
28+
29+
<!-- Check 'Flush Static Files Cache' not visible in production mode. -->
30+
<dontSee selector="{{AdminCacheManagementSection.FlushStaticFilesCache}}" stepKey="seeFlushStaticFilesButton" />
31+
</test>
32+
</tests>

0 commit comments

Comments
 (0)