Skip to content

Commit 117c093

Browse files
glo74170Manjusha.S
authored andcommitted
MC-27419 : Modal window for Sign In is shown if Guest checkout is disabled.
1 parent cd75811 commit 117c093

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontGuestSignInActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
<waitForElementVisible selector="{{StorefrontGuestSignInSection.ForgotYourPassword}}" stepKey="seeForgotYourPassword"/>
2525
<click selector="{{StorefrontGuestSignInSection.SignIn}}" stepKey="clickOnSignIn"/>
2626
</actionGroup>
27-
</actionGroups>
27+
</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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontGuestSignInSection">
12+
<element name="email" type="input" selector="//input[@name='username']" timeout="30"/>
13+
<element name="password" type="input" selector="//input[@name='password']" timeout="30"/>
14+
<element name="SignIn" type="button" selector="//button[@id='send2']" timeout="30"/>
15+
<element name="ForgotYourPassword" type="button" selector="//a[@class='action']//span[contains(text(),'Forgot Your Password?')]" timeout="30"/>
16+
<element name="CreateAnAccount" type="button" selector="//a[@class='action action-register primary']//span[contains(text(),'Create an Account')]" timeout="30"/>
17+
</section>
18+
</sections>

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontShoppingCartGuestCheckoutDisabledTest.xml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@
1919
<group value="module-checkout"/>
2020
</annotations>
2121
<before>
22-
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
2322
<!-- create category and simple product -->
2423
<createData entity="_defaultCategory" stepKey="createCategory"/>
2524
<createData entity="SimpleProduct" stepKey="createProduct">
2625
<requiredEntity createDataKey="createCategory"/>
2726
</createData>
2827
<!--Goto Admin Configuration page and Allow Guest Checkout is No-->
29-
<actionGroup ref="AdminConfigurationAllowGuestCheckoutNoNavigateActionGroup" stepKey="storeConfigurationAllowGuestCheckoutNo"/>
30-
<actionGroup ref="SaveStoreConfigurationActionGroup" stepKey="clickOnSaveConfig"/>
28+
<createData entity="DisableAllowGuestCheckout" stepKey="storeConfigurationAllowGuestCheckoutNo">
29+
</createData>
3130
<!-- create customer and clean the cache and index-->
3231
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
3332
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
@@ -48,18 +47,14 @@
4847
<argument name="email" value="$$createCustomer.email$$"/>
4948
<argument name="password" value="$$createCustomer.password$$"/>
5049
</actionGroup>
51-
<amOnPage url="{{AdminLoginPage.url}}" stepKey="onLoginPage"/>
52-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingPage"/>
53-
5450
<after>
5551
<!--Goto Admin Configuration page and Allow Guest Checkout is Yes-->
56-
<actionGroup ref="AdminConfigurationAllowGuestCheckoutYesNavigateActionGroup" stepKey="storeConfigurationAllowGuestCheckoutYes"/>
57-
<actionGroup ref="SaveStoreConfigurationActionGroup" stepKey="clickOnSaveConfigAgain"/>
52+
<createData entity="EnableAllowGuestCheckout" stepKey="storeConfigurationAllowGuestCheckoutYes">
53+
</createData>
5854
<!-- Delete created category, product and customer-->
5955
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
6056
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
6157
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
62-
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
6358
</after>
6459
</test>
6560
</tests>

0 commit comments

Comments
 (0)