Skip to content

Commit 604fab0

Browse files
committed
ACQE-7346:Import table rate shipping prices with specific amount including and excluding virtual products
Testcase Updated as suggested changes
1 parent 9e02dd3 commit 604fab0

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright 2024 Adobe
5-
* All Rights Reserved.
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
66
*/
77
-->
88

app/code/Magento/OfflineShipping/Test/Mftf/Test/AdminImportTableRatesWithSpecificAmountTest.xml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,6 @@
7676
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
7777
<argument name="Customer" value="$$createCustomer$$" />
7878
</actionGroup>
79-
<amOnPage url="customer/address" stepKey="OpenCustomerAddNewAddress"/>
80-
<waitForPageLoad stepKey="waitForShippingAddressPageToLoad"/>
81-
<!--Open change shipping address page-->
82-
<waitForElementClickable selector="{{StorefrontCustomerAddressesSection.changeShippingAddress}}" stepKey="waitForChangeShippingAddress"/>
83-
<click selector="{{StorefrontCustomerAddressesSection.changeShippingAddress}}" stepKey="openChangeShippingAddress"/>
84-
<clearField stepKey="clearZip" selector="{{StorefrontCustomerAddressFormSection.zip}}"/>
85-
<fillField stepKey="fillZip" userInput="20011" selector="{{StorefrontCustomerAddressFormSection.zip}}"/>
86-
<click stepKey="saveCustomerAddress" selector="{{StorefrontCustomerAddressFormSection.saveAddress}}"/>
8779
<waitForPageLoad stepKey="waitForPageLoad"/>
8880
<!-- Add simple product to cart -->
8981
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
@@ -92,8 +84,8 @@
9284
<!-- Assert that table rate value is correct for US -->
9385
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCheckout"/>
9486
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateShippingandTax" />
95-
<scrollTo selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="scrollToShippingForUS"/>
96-
<see selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$6.99" stepKey="seeShippingForUS1"/>
87+
<grabValueFrom selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="grabShippingForUS"/>
88+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$grabShippingForUS" stepKey="seeShippingForUS1"/>
9789
<waitForPageLoad stepKey="waitForSelectCountry"/>
9890
<!-- Add Virtual product to cart -->
9991
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSecondProductToCart1">
@@ -102,7 +94,8 @@
10294
<!-- Assert that table rate value is correct for US -->
10395
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goAgainToCheckout"/>
10496
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandToEstimateShippingandTax1"/>
105-
<see selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$6.99" stepKey="seeShippingForUS"/>
97+
<grabValueFrom selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="grabShippingForUS1"/>
98+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$grabShippingForUS1" stepKey="seeShippingForUS"/>
10699
<!-- Customer Click On Mini Cart -->
107100
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
108101
<!--Remove an item from the cart using minicart-->
@@ -116,8 +109,8 @@
116109
<!-- Assert that table rate value is correct for US -->
117110
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="navigateToToCheckout"/>
118111
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateShippingPrice"/>
119-
<grabTextFrom selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="grabTableratePrice1"/>
120-
<see selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$6.99" stepKey="seeShippingForUS2"/>
112+
<grabValueFrom selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="grabTableratePrice1"/>
113+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$grabTableratePrice1" stepKey="seeShippingForUS2"/>
121114
<!-- Assert product details in Mini Cart -->
122115
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart1"/>
123116
<!--Remove an item from the cart using minicart-->
@@ -131,7 +124,7 @@
131124
<!-- Assert that table rate value is correct for US -->
132125
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="navigateAgainToToCheckout"/>
133126
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateShippingPrice1"/>
134-
<see selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$4.99" stepKey="seeShippingForUS3"/>
127+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$4.99" stepKey="seeShippingForUS3"/>
135128
<!-- Assert product details in Mini Cart -->
136129
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart2"/>
137130
<!--Remove an item from the cart using minicart-->
@@ -159,15 +152,15 @@
159152
</actionGroup>
160153
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goAgainToCheckout3"/>
161154
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateShippingandTax1" />
162-
<scrollTo selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="scrollAgainToShippingForUS"/>
163-
<see selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$6.99" stepKey="seeShippingForUS5"/>
155+
<grabValueFrom selector="{{CheckoutCartSummarySection.shippingPrice}}" stepKey="grabAgainTableratePrice"/>
156+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$grabAgainTableratePrice" stepKey="seeShippingForUS5"/>
164157
<!-- Add Virtual product to cart -->
165158
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addVirtualProductToCart">
166159
<argument name="product" value="$$createVirtualProduct$$"/>
167160
</actionGroup>
168161
<!-- Assert that table rate value is correct for US -->
169162
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goAgainToCheckout2"/>
170163
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.country}}" visible="false" stepKey="expandEstimateTableRatePrice"/>
171-
<see selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$4.99" stepKey="seeShippingForUS4"/>
164+
<waitForText selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$4.99" stepKey="seeShippingForUS4"/>
172165
</test>
173166
</tests>

0 commit comments

Comments
 (0)