-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from magento-tsg-csl3/MC-40303
MC-40303: Store address overrides customer information when in-store delivery is enabled
- Loading branch information
Showing
2 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
108 changes: 108 additions & 0 deletions
108
...kupFrontend/Test/Mftf/Test/StorefrontBillingAddressClearFieldsAfterRefreshingPageTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="StorefrontBillingAddressClearFieldsAfterRefreshingPageTest"> | ||
<annotations> | ||
<stories value="Simple Product Custom Stock."/> | ||
<title value="Billing address fields should be cleared after refreshing checkout page with store pickup delivery method"/> | ||
<description value="Verify billing address checkout fields will be cleared after refreshing page with store pickup and simple product on custom source"/> | ||
<testCaseId value="MC-40489"/> | ||
<useCaseId value="MC-40303"/> | ||
<severity value="CRITICAL"/> | ||
<group value="msi"/> | ||
<group value="store_pickup"/> | ||
</annotations> | ||
<before> | ||
<!--Set Distance Provider for Distance Based SSA to offline--> | ||
<magentoCLI command="config:set {{OfflineDistanceProviderForDistanceBasedSSA.path}} {{OfflineDistanceProviderForDistanceBasedSSA.value}}" stepKey="setDistanceProviderToOffline"/> | ||
<!--Enable 'In Store Pickup' shipping method--> | ||
<magentoCLI command="config:set {{EnableInStorePickup.path}} {{EnableInStorePickup.value}}" stepKey="enableInStorePickupMethod"/> | ||
<!--Download tables for 'US'--> | ||
<magentoCLI command="{{ImportTables.path}} {{USTable.value}}" stepKey="downloadTables"/> | ||
<magentoCLI command="indexer:reindex" stepKey="performReindex"/> | ||
<magentoCLI command="cache:flush" stepKey="cleanCache"/> | ||
<!--Create test data--> | ||
<createData entity="CulverStorePickupEnabledSource" stepKey="culverSource"/> | ||
<createData entity="AustinStorePickupEnabledSource" stepKey="austinSource"/> | ||
<createData entity="BasicMsiStockWithMainWebsite1" stepKey="stock"/> | ||
<createData entity="SourceStockLinked1" stepKey="sourceStockLink1"> | ||
<requiredEntity createDataKey="stock"/> | ||
<requiredEntity createDataKey="culverSource"/> | ||
</createData> | ||
<createData entity="SourceStockLinked1" stepKey="sourceStockLink2"> | ||
<requiredEntity createDataKey="stock"/> | ||
<requiredEntity createDataKey="austinSource"/> | ||
</createData> | ||
<createData entity="_defaultCategory" stepKey="category"/> | ||
<createData entity="SimpleProduct" stepKey="product"> | ||
<requiredEntity createDataKey="category"/> | ||
</createData> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
<!--Assign product to sources--> | ||
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPage"> | ||
<argument name="productId" value="$$product.id$$"/> | ||
</actionGroup> | ||
<actionGroup ref="UnassignSourceFromProductActionGroup" stepKey="unassignDefaultSourceFromProduct"> | ||
<argument name="sourceCode" value="{{_defaultSource.name}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminAssignSourceToProductAndSetSourceQuantityActionGroup" stepKey="assignCulverSourceAndSetQty"> | ||
<argument name="sourceCode" value="$culverSource.source[source_code]$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminAssignSourceToProductAndSetSourceQuantityActionGroup" stepKey="assignAustinSourceAndSetQty"> | ||
<argument name="sourceCode" value="$austinSource.source[source_code]$"/> | ||
</actionGroup> | ||
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/> | ||
</before> | ||
<after> | ||
<!--Revert Distance Provider for Distance Based SSA to online--> | ||
<magentoCLI command="config:set {{OnlineDistanceProviderForDistanceBasedSSA.path}} {{OnlineDistanceProviderForDistanceBasedSSA.value}}" stepKey="setDistanceProviderToOffline"/> | ||
<!--Disable 'In Store Pickup' shipping method--> | ||
<magentoCLI command="config:set {{DisableInStorePickup.path}} {{DisableInStorePickup.value}}" stepKey="enableInStorePickupMethod"/> | ||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||
<deleteData createDataKey="product" stepKey="deleteProduct"/> | ||
<!--Assign Default Stock to Default Website--> | ||
<actionGroup ref="AssignWebsiteToStockActionGroup" stepKey="assignMainWebsiteToDefaultStock"> | ||
<argument name="stockName" value="{{_defaultStock.name}}"/> | ||
<argument name="websiteName" value="{{_defaultWebsite.name}}"/> | ||
</actionGroup> | ||
<deleteData createDataKey="stock" stepKey="deleteStock"/> | ||
<actionGroup ref="DisableAllSourcesActionGroup" stepKey="disableAllSources"/> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/> | ||
</after> | ||
<!--Add product to cart--> | ||
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart"> | ||
<argument name="product" value="$product$"/> | ||
</actionGroup> | ||
<!--Navigate to checkout from minicart--> | ||
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> | ||
<!--Filling shipping information and click next--> | ||
<actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping"> | ||
<argument name="shippingMethod" value="Flat Rate"/> | ||
</actionGroup> | ||
<!--Go back to shipping step and choose Pick In Store and fill all info about pick in store and click next--> | ||
<click selector="{{CheckoutHeaderSection.shippingMethodStep}}" stepKey="goToShipping"/> | ||
<actionGroup ref="StorefrontPickInStoreActionGroup" stepKey="pickInStore"/> | ||
<actionGroup ref="StorefrontPickInStoreNavigateToSelectStoreActionGroup" stepKey="navigateToSelectStores"/> | ||
<actionGroup ref="StorefrontPickInStoreSelectSourceActionGroup" stepKey="selectSource"> | ||
<argument name="searchString" value="{{CulverStorePickupEnabledSource.city}}"/> | ||
<argument name="sourceName" value="$culverSource.source[name]$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontPickInStoreNavigateToPaymentActionGroup" stepKey="navigateToPaymentStep"/> | ||
<!--Refresh Page--> | ||
<reloadPage stepKey="reloadCheckoutPage"/> | ||
<waitForPageLoad stepKey="waitForCheckoutPage"/> | ||
<!--Grab value from first name field and assert this field is empty--> | ||
<dontSeeElement selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="shippingAndBillingAddressAreTheSameIsNotVisible"/> | ||
<grabValueFrom selector="{{CheckoutPaymentSection.guestFirstName}}" stepKey="grabGuestFirstName"/> | ||
<assertEmpty after="grabGuestFirstName" stepKey="verifyEmptyGuestFirstName"> | ||
<actualResult type="const">$grabGuestFirstName</actualResult> | ||
</assertEmpty> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters