Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
92109c9
Added a method that sets the loader to shipping rates after changing …
rostilos Nov 18, 2022
9edc8c9
Merge branch '2.4-develop' into fix-for-issue-33725
rostilos Nov 18, 2022
2dd97f8
Merge branch '2.4-develop' into fix-for-issue-33725
rostilos Nov 18, 2022
26d20a4
Merge branch '2.4-develop' into fix-for-issue-33725
rostilos Nov 22, 2022
69284d8
Merge branch '2.4-develop' into fix-for-issue-33725
rostilos Nov 24, 2022
783145c
Merge branch '2.4-develop' into fix-for-issue-33725
rostilos Nov 25, 2022
366a4f7
Merge branch '2.4-develop' into fix-for-issue-33725
engcom-Hotel Mar 28, 2023
2527306
Merge remote-tracking branch 'magento/2.4-develop' into fix-for-issue…
engcom-Charlie Apr 19, 2023
365009a
Implemented test coverage
engcom-Charlie Apr 24, 2023
d6da766
Merge remote-tracking branch 'magento/2.4-develop' into fix-for-issue…
engcom-Charlie Apr 25, 2023
b492f47
added waitForShippingMethods step to avoid the error associated with …
rostilos Apr 27, 2023
f182aa1
mftf test rewrite
rostilos Apr 30, 2023
0507801
remove loader on shipping methods section if there are no avalable me…
rostilos Apr 30, 2023
59c908c
functionality fixes, edit jasmine unit test
rostilos May 4, 2023
3ce6425
Merge branch '2.4-develop' into fix-for-issue-33725
engcom-Lima May 8, 2023
e7455f3
Merge remote-tracking branch 'magento/2.4-develop' into fix-for-issue…
engcom-Charlie May 9, 2023
b98668b
Merge branch '2.4-develop' into fix-for-issue-33725
engcom-Echo Jul 12, 2023
3070776
Reverting unwanted changes
engcom-Charlie Jul 14, 2023
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontGuestCheckoutProceedToPaymentStepActionGroup">
<annotations>
<description>Clicks next on Checkout Shipping step. Waits for Payment step</description>
<description>Waits for Shipping Section load. Clicks next on Checkout Shipping step. Waits for Payment step</description>
</annotations>

<waitForElementClickable selector="{{CheckoutShippingGuestInfoSection.next}}" stepKey="waitForNextButtonClickable"/>
<click selector="{{CheckoutShippingGuestInfoSection.next}}" stepKey="clickNext"/>
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSectionLoaded" after="clickNext"/>
<seeCurrentUrlMatches regex="~/checkout/?#payment~" stepKey="assertCheckoutPaymentUrl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontSelectFirstShippingMethodActionGroup">
<annotations>
<description>Select first shipping method.</description>
<description>Waits for Shipping Section load. Select first shipping method.</description>
</annotations>


<waitForElementClickable selector="{{CheckoutShippingMethodsSection.next}}" stepKey="waitForShippingMethod"/>
<click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
<waitForLoadingMaskToDisappear stepKey="waitForMaskDisappear"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?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="StorefrontGuestCheckoutWithSameShippingAndBillingAddressEnabledCheckboxTest">
<annotations>
<features value="Checkout"/>
<stories value="My billing and shipping address are same checkbox should be checked by default"/>
<title value="My billing and shipping address are same checkbox should be checked by default"/>
<description value="Check that My billing and shipping address are same checkbox should be checked by default"/>
<severity value="AVERAGE"/>
<testCaseId value="AC-8596"/>
<group value="checkout"/>
</annotations>

<before>
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
<createData entity="SimpleProduct2" stepKey="createProduct"/>
</before>

<after>
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
</after>

<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage">
<argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/>
</actionGroup>
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
<argument name="productName" value="$createProduct.name$"/>
</actionGroup>
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
<actionGroup ref="GuestCheckoutFillNewShippingAddressActionGroup" stepKey="fillShippingSectionAsGuest">
<argument name="customer" value="CustomerEntityOne"/>
<argument name="address" value="CustomerAddressSimple"/>
</actionGroup>
<waitForElementVisible selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/>
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
<waitForPageLoad stepKey="waitForPaymentLoading"/>
<waitForElementVisible selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/>
<seeCheckboxIsChecked selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="shippingAndBillingAddressIsSameChecked"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<fillField selector="{{CheckoutShippingGuestInfoSection.regionInput}}" userInput="" stepKey="changeStateProvinceField"/>
<fillField selector="{{CheckoutShippingGuestInfoSection.postcode}}" userInput="KW1 7NQ" stepKey="changeZipPostalCodeField"/>
<!-- 8. Change shipping rate, select Free Shipping -->
<waitForElementClickable selector="{{CheckoutShippingMethodsSection.shippingMethodFreeShipping}}" stepKey="waitForFreeShippingShippingMethod"/>
<checkOption selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Free Shipping')}}" stepKey="checkFreeShippingAsShippingMethod"/>
<!-- 9. Fill other fields -->
<actionGroup ref="StorefrontFillGuestShippingInfoActionGroup" stepKey="fillOtherFieldsInCheckoutShippingSection"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ define([
cartCache.set('totals', quote.getTotals());
}
}
// unset loader on shipping rates list
shippingService.isLoading(false);
},

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ define([
'mage/translate',
'uiRegistry',
'Magento_Checkout/js/model/shipping-address/form-popup-state',
'Magento_Checkout/js/model/shipping-service',
'Magento_Checkout/js/model/quote'
], function (
$,
Expand All @@ -28,7 +29,8 @@ define([
defaultValidator,
$t,
uiRegistry,
formPopUpState
formPopUpState,
shippingService
) {
'use strict';

Expand Down Expand Up @@ -146,6 +148,8 @@ define([
}, delay);

if (!formPopUpState.isVisible()) {
// Prevent shipping methods showing none available whilst we resolve
shippingService.isLoading(true);
clearTimeout(self.validateAddressTimeout);
self.validateAddressTimeout = setTimeout(function () {
self.validateFields();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
</actionGroup>
<see selector="{{CheckoutShippingMethodsSection.shippingRatePriceByName('Fixed')}}" userInput="$5.00" stepKey="assertFlatRatedMethodPrice"/>
<see selector="{{CheckoutShippingMethodsSection.shippingRatePriceByName('Table Rate')}}" userInput="$7.99" stepKey="assertTableRatedMethodPrice"/>
<waitForElementClickable selector="{{CheckoutShippingMethodsSection.shippingMethodFlatRate}}" stepKey="waitForFlatRateShippingMethod"/>
<click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Flat Rate')}}" stepKey="selectFlatRateShippingMethod"/>
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="goToPaymentStep"/>
<actionGroup ref="StorefrontApplyDiscountCodeActionGroup" stepKey="applyCoupon">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ define([
},
'Magento_Checkout/js/model/shipping-service': {
setShippingRates: function () {},
isLoading: ko.observable(),
getShippingRates: function () {
return ko.observable(rates);
}
Expand Down