Skip to content

Commit 9665d6b

Browse files
Refactoring
1 parent bb03bcf commit 9665d6b

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertAdminNotSuccessLoginActionGroup.xml renamed to app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertAdminLoginErrorMessageActionGroup.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="AssertAdminNotSuccessLoginActionGroup">
11+
<actionGroup name="AssertAdminLoginErrorMessageActionGroup">
1212
<arguments>
1313
<argument name="message" type="string" defaultValue="The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later"/>
14+
<argument name="messageType" type="string" defaultValue="error" />
1415
</arguments>
1516
<waitForPageLoad stepKey="waitForPageReload"/>
16-
<see selector="{{AdminLoginFormSection.error}}" userInput="{{message}}"
17+
<see selector="{{AdminLoginMessagesSection.messageByType(messageType)}}" userInput="{{message}}"
1718
stepKey="seeLoginAdminError"/>
1819
</actionGroup>
1920
</actionGroups>

app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertMessageOnBackendActionGroup.xml renamed to app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertMessageOnAdminActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="AssertMessageOnBackendActionGroup">
11+
<actionGroup name="AssertMessageOnAdminActionGroup">
1212
<arguments>
1313
<argument name="message" type="string" defaultValue="The password entered for the current user is invalid. Verify the password and try again." />
1414
<argument name="messageType" type="string" defaultValue="error" />

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@
1212
<element name="username" type="input" selector="#username"/>
1313
<element name="password" type="input" selector="#login"/>
1414
<element name="signIn" type="button" selector=".actions .action-primary" timeout="30"/>
15-
<element name="error" type="text" selector=".message.message-error.error"/>
1615
</section>
1716
</sections>

app/code/Magento/Integration/Test/Mftf/ActionGroup/AssertSaveIntegrationActionGroup.xml renamed to app/code/Magento/Integration/Test/Mftf/ActionGroup/AdminSaveIntegrationActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
<actionGroup name="AssertSaveIntegrationActionGroup">
10+
<actionGroup name="AdminSaveIntegrationActionGroup">
1111
<click selector="{{AdminNewIntegrationSection.save}}" stepKey="saveIntegration"/>
1212
<waitForPageLoad stepKey="waitForSaveResultLoad"/>
1313
</actionGroup>

app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,44 +33,44 @@
3333
<actionGroup ref="AdminFillIntegrationRequiredFieldsActionGroup" stepKey="fillFieldFirstAttempt">
3434
<argument name="currentAdminPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}INVALID" />
3535
</actionGroup>
36-
<actionGroup ref="AssertSaveIntegrationActionGroup" stepKey="saveIntegrationFirstAttempt"/>
37-
<actionGroup ref="AssertMessageOnBackendActionGroup" stepKey="checkFirstSaveIntegrationError"/>
36+
<actionGroup ref="AdminSaveIntegrationActionGroup" stepKey="saveIntegrationFirstAttempt"/>
37+
<actionGroup ref="AssertMessageOnAdminActionGroup" stepKey="checkFirstSaveIntegrationError"/>
3838

3939
<actionGroup ref="AdminFillIntegrationRequiredFieldsActionGroup" stepKey="fillFieldSecondAttempt">
4040
<argument name="currentAdminPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}INVALID" />
4141
</actionGroup>
42-
<actionGroup ref="AssertSaveIntegrationActionGroup" stepKey="saveIntegrationSecondAttempt"/>
43-
<actionGroup ref="AssertMessageOnBackendActionGroup" stepKey="checkSecondSaveIntegrationError"/>
42+
<actionGroup ref="AdminSaveIntegrationActionGroup" stepKey="saveIntegrationSecondAttempt"/>
43+
<actionGroup ref="AssertMessageOnAdminActionGroup" stepKey="checkSecondSaveIntegrationError"/>
4444

4545
<actionGroup ref="AdminFillIntegrationRequiredFieldsActionGroup" stepKey="fillFieldThirdAttempt">
4646
<argument name="currentAdminPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}INVALID" />
4747
</actionGroup>
48-
<actionGroup ref="AssertSaveIntegrationActionGroup" stepKey="saveIntegrationThirdAttempt"/>
49-
<actionGroup ref="AssertMessageOnBackendActionGroup" stepKey="checkThirdSaveIntegrationError"/>
48+
<actionGroup ref="AdminSaveIntegrationActionGroup" stepKey="saveIntegrationThirdAttempt"/>
49+
<actionGroup ref="AssertMessageOnAdminActionGroup" stepKey="checkThirdSaveIntegrationError"/>
5050

5151
<actionGroup ref="AdminFillIntegrationRequiredFieldsActionGroup" stepKey="fillFieldFourthAttempt">
5252
<argument name="currentAdminPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}INVALID" />
5353
</actionGroup>
54-
<actionGroup ref="AssertSaveIntegrationActionGroup" stepKey="saveIntegrationFourthAttempt"/>
55-
<actionGroup ref="AssertMessageOnBackendActionGroup" stepKey="checkFourthSaveIntegrationError"/>
54+
<actionGroup ref="AdminSaveIntegrationActionGroup" stepKey="saveIntegrationFourthAttempt"/>
55+
<actionGroup ref="AssertMessageOnAdminActionGroup" stepKey="checkFourthSaveIntegrationError"/>
5656

5757
<actionGroup ref="AdminFillIntegrationRequiredFieldsActionGroup" stepKey="fillFieldFifthAttempt">
5858
<argument name="currentAdminPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}INVALID" />
5959
</actionGroup>
60-
<actionGroup ref="AssertSaveIntegrationActionGroup" stepKey="saveIntegrationFifthAttempt"/>
61-
<actionGroup ref="AssertMessageOnBackendActionGroup" stepKey="checkFifthSaveIntegrationError"/>
60+
<actionGroup ref="AdminSaveIntegrationActionGroup" stepKey="saveIntegrationFifthAttempt"/>
61+
<actionGroup ref="AssertMessageOnAdminActionGroup" stepKey="checkFifthSaveIntegrationError"/>
6262

6363
<!-- Last invalid current password save integration attempt and check logout error -->
6464
<actionGroup ref="AdminFillIntegrationRequiredFieldsActionGroup" stepKey="fillFieldLastAttempt">
6565
<argument name="currentAdminPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}INVALID" />
6666
</actionGroup>
67-
<actionGroup ref="AssertSaveIntegrationActionGroup" stepKey="saveIntegrationLastAttempt"/>
68-
<actionGroup ref="AssertAdminNotSuccessLoginActionGroup" stepKey="checkFifthError">
67+
<actionGroup ref="AdminSaveIntegrationActionGroup" stepKey="saveIntegrationLastAttempt"/>
68+
<actionGroup ref="AssertAdminLoginErrorMessageActionGroup" stepKey="checkFifthError">
6969
<argument name="message" value="Your account is temporarily disabled. Please try again later."/>
7070
</actionGroup>
7171

7272
<!-- Try to login as admin and check error -->
7373
<actionGroup ref="LoginAsAdmin" stepKey="loginAsLockedAdmin"/>
74-
<actionGroup ref="AssertAdminNotSuccessLoginActionGroup" stepKey="checkLoginError"/>
74+
<actionGroup ref="AssertAdminLoginErrorMessageActionGroup" stepKey="checkLoginError"/>
7575
</test>
7676
</tests>

0 commit comments

Comments
 (0)