Skip to content

Commit 5fa09cc

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop
Accepted Community Pull Requests: - #31321: Add missing "VAT Number" field to customer registration page (by @vovayatsyuk) - #31603: [MFTF] Adding AdminGoToOrderStatusPageActionGroup (by @AnnaAPak) - #31601: [MFTF] Updating with AdminClickInsertWidgetActionGroup (by @AnnaAPak) - #31394: [MFTF] Refactoring AdminCheckingCreditMemoTotalsTest (by @AnnaAPak) Fixed GitHub Issues: - #31326: [Issue] Add missing "VAT Number" field to customer registration page (reported by @m2-assistant[bot]) has been fixed in #31321 by @vovayatsyuk in 2.4-develop branch Related commits: 1. e5444ad 2. 01f3185 3. d01133d 4. 13b966a 5. ecc30d5 6. 837a48a 7. 8b4e8b5 8. 93a0469 9. 1f9802d 10. 6bd52c9 11. a24dce4 12. c9bcf3d 13. 71428b5 - #31624: [Issue] [MFTF] Adding AdminGoToOrderStatusPageActionGroup (reported by @m2-assistant[bot]) has been fixed in #31603 by @AnnaAPak in 2.4-develop branch Related commits: 1. 5d84e2a 2. d766016 3. b628917 - #31626: [Issue] [MFTF] Updating with AdminClickInsertWidgetActionGroup (reported by @m2-assistant[bot]) has been fixed in #31601 by @AnnaAPak in 2.4-develop branch Related commits: 1. 0693f46 - #31403: [Issue] [MFTF] Refactoring AdminCheckingCreditMemoTotalsTest (reported by @m2-assistant[bot]) has been fixed in #31394 by @AnnaAPak in 2.4-develop branch Related commits: 1. cfa15e1
2 parents af3e2e4 + 47bf287 commit 5fa09cc

25 files changed

+168
-65
lines changed

app/code/Magento/CatalogWidget/Test/Mftf/Test/CatalogProductListCheckWidgetOrderTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<click selector="{{WidgetSection.Chooser}}" stepKey="clickChooser" />
7171
<waitForElementVisible selector="{{WidgetSection.PreCreateCategory('$simplecategory.name$')}}" stepKey="waitForCategoryVisible" />
7272
<click selector="{{WidgetSection.PreCreateCategory('$simplecategory.name$')}}" stepKey="selectCategory" />
73-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
73+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
7474
<!--Save cms page and go to Storefront-->
7575
<actionGroup ref="SaveCmsPageActionGroup" stepKey="saveCmsPage"/>
7676
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToTheStoreFront1">

app/code/Magento/Cms/Test/Mftf/Test/AdminAddVariableToWYSIWYGBlockTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@
110110
<waitForElementVisible selector="{{WidgetSection.BlockPage(_defaultBlock.identifier)}}" stepKey="waitForBlockTitle" />
111111
<click selector="{{WidgetSection.BlockPage(_defaultBlock.identifier)}}" stepKey="selectPreCreateBlock" />
112112
<wait time="3" stepKey="wait1" />
113-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidgetBtn" />
114-
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
115-
<waitForPageLoad stepKey="waitForPageLoad10" />
113+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidgetBtn"/>
114+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
115+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad10"/>
116116
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForSaveButtonVisible"/>
117117
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandButtonMenu"/>
118118
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.splitButtonMenu}}" stepKey="waitForSplitButtonMenuVisible"/>

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGBlockTest.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
<waitForElementVisible selector="{{WidgetSection.CMSPage}}" stepKey="waitForPageVisible" />
4141
<click selector="{{WidgetSection.CMSPage}}" stepKey="selectPreCreateCMS" />
4242
<waitForElementNotVisible selector="{{WidgetSection.SelectPageTitle}}" stepKey="waitForSlideOutCloses" />
43-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
44-
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
45-
<waitForElementNotVisible selector="{{WidgetSection.InsertWidgetTitle}}" stepKey="waitForSlideOutCloses1" />
43+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
44+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
45+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSlideOutCloses1"/>
4646
<click selector="{{BlockNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitButton"/>
4747
<click selector="{{BlockNewPagePageActionsSection.saveAndClose}}" stepKey="clickSaveBlock"/>
4848
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage">
@@ -62,9 +62,9 @@
6262
</actionGroup>
6363
<click selector="{{WidgetSection.BlockPage(_defaultBlock.identifier)}}" stepKey="selectPreCreateBlock" />
6464
<wait time="3" stepKey="wait1" />
65-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidgetBtn" />
66-
<waitForLoadingMaskToDisappear stepKey="waitForLoading2" />
67-
<waitForPageLoad stepKey="waitForPageLoad6" />
65+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidgetBtn"/>
66+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading2"/>
67+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad6"/>
6868
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandButtonMenu"/>
6969
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.splitButtonMenu}}" stepKey="waitForSplitButtonMenuVisible"/>
7070
<click selector="{{CmsNewPagePageActionsSection.savePage}}" stepKey="clickSavePage"/>
@@ -85,4 +85,3 @@
8585
</after>
8686
</test>
8787
</tests>
88-

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSPageLinkTypeTest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
<click selector="{{WidgetSection.CMSPage}}" stepKey="selectPreCreateCMS" />
4949
<waitForElementNotVisible selector="{{WidgetSection.SelectPageTitle}}" stepKey="waitForSlideOutCloses" />
5050
<wait time="3" stepKey="waitForInsertWidgetClickable"/>
51-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
52-
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
51+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
52+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
5353
<waitForElementNotVisible selector="{{WidgetSection.InsertWidgetTitle}}" stepKey="waitForSlideoutCloses" />
5454
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
5555
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
@@ -70,4 +70,3 @@
7070
</after>
7171
</test>
7272
</tests>
73-

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCMSStaticBlockTypeTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
<scrollTo selector="{{WidgetSection.BlockPage($$createPreReqBlock.identifier$$)}}" stepKey="scrollToBlockIdentifier" />
5252
<click selector="{{WidgetSection.BlockPage($$createPreReqBlock.identifier$$)}}" stepKey="selectPreCreateBlock" />
5353
<waitForElementNotVisible selector="{{WidgetSection.SelectBlockTitle}}" stepKey="waitForSlideoutCloses" />
54-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
55-
<waitForLoadingMaskToDisappear stepKey="waitingForLoading" />
54+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
55+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitingForLoading"/>
5656
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
5757
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
5858
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
<waitForElementVisible selector="{{WidgetSection.PreCreateCategory('$$createPreReqCategory.name$$')}}" stepKey="expandWait" />
5050
<click selector="{{WidgetSection.PreCreateCategory('$$createPreReqCategory.name$$')}}" stepKey="selectPreCreateCategory" />
5151
<waitForElementNotVisible selector="{{WidgetSection.SelectCategoryTitle}}" stepKey="waitForSlideoutCloses1" />
52-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
53-
<waitForElementNotVisible selector="{{WidgetSection.InsertWidgetTitle}}" stepKey="waitForSlideOutCloses2" />
52+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
53+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSlideOutCloses2"/>
5454
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
5555
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
5656
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
<waitForLoadingMaskToDisappear stepKey="waitLoadingMask" />
5656
<click selector="{{WidgetSection.PreCreateProduct('$$createPreReqProduct.name$$')}}" stepKey="selectPreProduct" />
5757
<waitForElementNotVisible selector="{{WidgetSection.SelectProductTitle}}" stepKey="waitForSlideOutCloses" />
58-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
59-
<waitForLoadingMaskToDisappear stepKey="waitLoadingMask1" />
60-
<waitForPageLoad stepKey="wait6" />
58+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
59+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitLoadingMask1"/>
60+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait6"/>
6161
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
6262
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
6363
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductListTypeTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
<click selector="{{WidgetSection.RuleParam}}" stepKey="clickRuleParam3"/>
8080
<fillField selector="{{WidgetSection.RuleParamInput('3','2')}}" userInput="1" stepKey="fillMinPrice"/>
8181

82-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
83-
<waitForPageLoad stepKey="wait6" />
82+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
83+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait6"/>
8484
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
8585
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
8686
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyComparedProductsTypeTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
<selectOption selector="{{WidgetSection.ProductAttribute}}" userInput="Name" stepKey="selectProductAttributes" />
5252
<selectOption selector="{{WidgetSection.ButtonToShow}}" userInput="Add to Cart" stepKey="selectBtnToShow" />
5353
<selectOption selector="{{WidgetSection.WidgetTemplate}}" userInput="Compared Products Grid Template" stepKey="selectTemplate" />
54-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
55-
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
54+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
55+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
5656
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
5757
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
5858
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithRecentlyViewedProductsTypeTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
<selectOption selector="{{WidgetSection.ProductAttribute}}" userInput="Name" stepKey="selectProductAttributes" />
5151
<selectOption selector="{{WidgetSection.ButtonToShow}}" userInput="Add to Cart" stepKey="selectBtnToShow" />
5252
<selectOption selector="{{WidgetSection.WidgetTemplate}}" userInput="Viewed Products Grid Template" stepKey="selectTemplate" />
53-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
54-
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
53+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
54+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
5555
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
5656
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
5757
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>

app/code/Magento/Cms/Test/Mftf/Test/CheckOrderOfProdsInWidgetOnCMSPageTest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@
9090
<waitForPageLoad stepKey="waitForPageToLoadBeforeSelectingProduct2"/>
9191
<click selector="{{WidgetSection.PreCreateProduct('$$product2.name$$')}}" stepKey="selectProduct2"/>
9292
<click selector="{{AdminNewWidgetSection.applyParameter}}" stepKey="applyProducts"/>
93-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickOnInsertWidgetButton"/>
94-
<waitForPageLoad stepKey="waitForPageToLoadBeforeClickingOnSaveWidget1"/>
93+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickOnInsertWidgetButton"/>
94+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoadBeforeClickingOnSaveWidget1"/>
9595
<click selector="{{InsertWidgetSection.save}}" stepKey="saveWidget"/>
9696
<waitForPageLoad stepKey="waitForSaveComplete"/>
9797
<actionGroup ref="CompareTwoProductsOrder" stepKey="compareProductOrders1">
@@ -125,8 +125,8 @@
125125
<click selector="{{WidgetSection.PreCreateProduct('$$product1.name$$')}}" stepKey="selectProduct1_1"/>
126126
<click selector="{{WidgetSection.PreCreateProduct('$$product1.name$$')}}" stepKey="selectProduct2_2"/>
127127
<click selector="{{AdminNewWidgetSection.applyParameter}}" stepKey="applyProducts1"/>
128-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickOnInsertWidgetButton1"/>
129-
<waitForPageLoad stepKey="waitForPageToLoadBeforeClickingOnSaveWidget2"/>
128+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickOnInsertWidgetButton1"/>
129+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoadBeforeClickingOnSaveWidget2"/>
130130
<click selector="{{InsertWidgetSection.save}}" stepKey="saveWidget1"/>
131131
<waitForPageLoad stepKey="waitForSaveComplete1"/>
132132

app/code/Magento/Cms/Test/Mftf/Test/VerifyTinyMCEv4IsNativeWYSIWYGOnBlockTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@
7373
<scrollTo selector="{{WidgetSection.BlockPage(_defaultBlock.identifier)}}" stepKey="scrollToBlockIdentifier" />
7474
<click selector="{{WidgetSection.BlockPage(_defaultBlock.identifier)}}" stepKey="selectPreCreateBlock" />
7575
<wait time="3" stepKey="wait1" />
76-
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
77-
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
78-
<waitForPageLoad stepKey="waitForPageLoad5" />
76+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
77+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
78+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad5"/>
7979
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForSaveButtonVisible"/>
8080
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandButtonMenu"/>
8181
<click selector="{{CmsNewPagePageActionsSection.savePage}}" stepKey="clickSavePage"/>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerDashboardAccountInformationSection/StorefrontCustomerAddressSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<element name="stateProvinceFill" type="input" selector="#region"/>
2020
<element name="zip" type="input" selector="#zip"/>
2121
<element name="country" type="select" selector="#country"/>
22+
<element name="vatId" type="input" selector="#vat_id"/>
2223
<element name="saveAddress" type="button" selector="[data-action='save-address']" timeout="30"/>
2324
</section>
2425
</sections>

app/code/Magento/Customer/view/frontend/templates/form/register.phtml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,23 @@ $formData = $block->getFormData();
131131
</div>
132132
</div>
133133

134+
<?php if ($addressHelper->isVatAttributeVisible()): ?>
135+
<?php $_vatidValidationClass = $addressHelper->getAttributeValidationClass('vat_id'); ?>
136+
<div class="field taxvat">
137+
<label class="label" for="vat_id">
138+
<span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('vat_id') ?></span>
139+
</label>
140+
<div class="control">
141+
<input type="text"
142+
name="vat_id"
143+
value="<?= $escaper->escapeHtmlAttr($formData->getVatId()) ?>"
144+
title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('vat_id') ?>"
145+
class="input-text <?= $escaper->escapeHtmlAttr($_vatidValidationClass) ?>"
146+
id="vat_id">
147+
</div>
148+
</div>
149+
<?php endif; ?>
150+
134151
<div class="field country required">
135152
<label for="country" class="label">
136153
<span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('country_id') ?></span>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest">
12+
<annotations>
13+
<features value="Multishipment"/>
14+
<stories value="Checking vat id field at account create page with 'Check Out with Multiple Addresses'"/>
15+
<title value="Checking vat id field at account create page with 'Check Out with Multiple Addresses'"/>
16+
<description value="'VAT Number' field should be available at create account page if 'Show VAT Number on Storefront' is Yes"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-40397"/>
19+
<group value="Multishipment"/>
20+
</annotations>
21+
<before>
22+
<magentoCLI command="config:set customer/create_account/vat_frontend_visibility 1" stepKey="showVatNumberOnStorefrontYes"/>
23+
<createData entity="SimpleSubCategory" stepKey="category"/>
24+
<createData entity="SimpleProduct" stepKey="product">
25+
<requiredEntity createDataKey="category"/>
26+
</createData>
27+
</before>
28+
<after>
29+
<magentoCLI command="config:set customer/create_account/vat_frontend_visibility 0" stepKey="showVatNumberOnStorefrontNo"/>
30+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfter">
31+
<argument name="tags" value="config"/>
32+
</actionGroup>
33+
<deleteData createDataKey="category" stepKey="deleteCategory"/>
34+
<deleteData createDataKey="product" stepKey="deleteproduct"/>
35+
</after>
36+
<!-- Add product to the cart -->
37+
<amOnPage url="$$product.name$$.html" stepKey="goToProductPage"/>
38+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addProductToCart">
39+
<argument name="productName" value="$$product.name$$"/>
40+
</actionGroup>
41+
<!-- Check Out with Multiple Addresses -->
42+
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/>
43+
<waitForElementVisible selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="waitMultipleAddressShippingButton"/>
44+
<click selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="clickToMultipleAddressShippingButton"/>
45+
<!--Create an account-->
46+
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="waitCreateAnAccountButton"/>
47+
<click selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="clickOnCreateAnAccountButton"/>
48+
<waitForPageLoad stepKey="waitForCreateAccountPageToLoad"/>
49+
<!--Check the VAT Number field-->
50+
<seeElement selector="{{StorefrontCustomerAddressSection.vatId}}" stepKey="assertVatIdField"/>
51+
</test>
52+
</tests>

0 commit comments

Comments
 (0)