Skip to content

Commit f1d0880

Browse files
ENGCOM-6374: Cover Change Encryption key By MFTF Test. #25867
2 parents f6405d5 + ada7f19 commit f1d0880

8 files changed

+183
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminEncryptionKeyChangeKeyAutoActionGroup">
12+
<annotations>
13+
<description>Change Encryption Key Auto Generate Action Group.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="encryptionKeyData" defaultValue="AdminEncryptionKeyAutoGenerate"/>
17+
</arguments>
18+
19+
<selectOption selector="{{AdminEncryptionKeyChangeFormSection.autoGenerate}}" userInput="{{encryptionKeyData.autoGenerate}}" stepKey="selectGenerateMode"/>
20+
<click selector="{{AdminEncryptionKeyChangeFormSection.changeEncryptionKey}}" stepKey="clickChangeButton"/>
21+
<waitForPageLoad stepKey="waitForPageLoad"/>
22+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
23+
<see selector="{{AdminMessagesSection.success}}" userInput="The encryption key has been changed." stepKey="seeSuccessMessage"/>
24+
</actionGroup>
25+
</actionGroups>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminEncryptionKeyChangeKeyManualActionGroup">
12+
<annotations>
13+
<description>Change Encryption Key - No-Auto Generate Action Group.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="encryptionKeyData" defaultValue="AdminEncryptionKeyManualGenerate"/>
17+
</arguments>
18+
19+
<selectOption selector="{{AdminEncryptionKeyChangeFormSection.autoGenerate}}" userInput="{{encryptionKeyData.autoGenerate}}" stepKey="selectGenerateMode"/>
20+
<fillField selector="{{AdminEncryptionKeyChangeFormSection.cryptKey}}" userInput="{{encryptionKeyData.cryptKey}}" stepKey="fillCryptKey"/>
21+
<click selector="{{AdminEncryptionKeyChangeFormSection.changeEncryptionKey}}" stepKey="clickChangeButton"/>
22+
<waitForPageLoad stepKey="waitForPageLoad"/>
23+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
24+
<see selector="{{AdminMessagesSection.success}}" userInput="The encryption key has been changed." stepKey="seeSuccessMessage"/>
25+
</actionGroup>
26+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminEncryptionKeyNavigateToChangePageActionGroup">
12+
<annotations>
13+
<description>Navigate to change encryption key page.</description>
14+
</annotations>
15+
<amOnPage url="{{AdminEncryptionKeyChangeFormPage.url}}" stepKey="navigateToChangeEncryptionPage" />
16+
<waitForPageLoad stepKey="waitForPageLoad"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="AdminEncryptionKeyAutoGenerate">
12+
<data key="autoGenerate">Yes</data>
13+
</entity>
14+
<entity name="AdminEncryptionKeyManualGenerate">
15+
<data key="autoGenerate">No</data>
16+
<data key="cryptKey">9d469ae32ec27dfec0206cb5d63f135d</data>
17+
</entity>
18+
</entities>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
9+
<page name="AdminEncryptionKeyChangeFormPage" url="admin/crypt_key/index" area="admin" module="Magento_EncryptionKey">
10+
<section name="AdminCustomerConfigSection"/>
11+
</page>
12+
</pages>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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="AdminEncryptionKeyChangeFormSection">
12+
<element name="autoGenerate" type="select" selector="#generate_random"/>
13+
<element name="cryptKey" type="input" selector="#crypt_key"/>
14+
<element name="changeEncryptionKey" type="button" selector=".page-actions-buttons #save" timeout="10"/>
15+
</section>
16+
</sections>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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="AdminEncryptionKeyAutoGenerateKeyTest">
12+
<annotations>
13+
<features value="Encryption Key"/>
14+
<stories value="Change Encryption Key"/>
15+
<title value="Change Encryption Key by Auto Generate Key"/>
16+
<description value="Change Encryption Key by Auto Generate Key"/>
17+
<severity value="CRITICAL"/>
18+
<group value="encryption_key"/>
19+
</annotations>
20+
21+
<before>
22+
<!--Login to Admin Area-->
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/>
24+
</before>
25+
26+
<after>
27+
<!--Logout from Admin Area-->
28+
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
29+
</after>
30+
31+
<actionGroup ref="AdminEncryptionKeyNavigateToChangePageActionGroup" stepKey="navigateToPage"/>
32+
<actionGroup ref="AdminEncryptionKeyChangeKeyAutoActionGroup" stepKey="changeKeyAutoGenerate"/>
33+
</test>
34+
</tests>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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="AdminEncryptionKeyManualGenerateKeyTest">
12+
<annotations>
13+
<features value="Encryption Key"/>
14+
<stories value="Change Encryption Key"/>
15+
<title value="Change Encryption Key by Manual Key"/>
16+
<description value="Change Encryption Key by Manual Key"/>
17+
<severity value="CRITICAL"/>
18+
<group value="encryption_key"/>
19+
</annotations>
20+
21+
<before>
22+
<!--Login to Admin Area-->
23+
<actionGroup ref="LoginAsAdmin" stepKey="loginToAdminArea"/>
24+
</before>
25+
26+
<after>
27+
<!--Logout from Admin Area-->
28+
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
29+
</after>
30+
31+
<actionGroup ref="AdminEncryptionKeyNavigateToChangePageActionGroup" stepKey="navigateToPage"/>
32+
<actionGroup ref="AdminEncryptionKeyChangeKeyManualActionGroup" stepKey="changeKeyManualGenerate"/>
33+
</test>
34+
</tests>

0 commit comments

Comments
 (0)