Skip to content

Commit

Permalink
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gabrieldagama authored Jan 24, 2021
2 parents af3e2e4 + 47bf287 commit 5fa09cc
Show file tree
Hide file tree
Showing 25 changed files with 168 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<click selector="{{WidgetSection.Chooser}}" stepKey="clickChooser" />
<waitForElementVisible selector="{{WidgetSection.PreCreateCategory('$simplecategory.name$')}}" stepKey="waitForCategoryVisible" />
<click selector="{{WidgetSection.PreCreateCategory('$simplecategory.name$')}}" stepKey="selectCategory" />
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
<!--Save cms page and go to Storefront-->
<actionGroup ref="SaveCmsPageActionGroup" stepKey="saveCmsPage"/>
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToTheStoreFront1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@
<waitForElementVisible selector="{{WidgetSection.BlockPage(_defaultBlock.identifier)}}" stepKey="waitForBlockTitle" />
<click selector="{{WidgetSection.BlockPage(_defaultBlock.identifier)}}" stepKey="selectPreCreateBlock" />
<wait time="3" stepKey="wait1" />
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidgetBtn" />
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
<waitForPageLoad stepKey="waitForPageLoad10" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidgetBtn"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad10"/>
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForSaveButtonVisible"/>
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandButtonMenu"/>
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.splitButtonMenu}}" stepKey="waitForSplitButtonMenuVisible"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
<waitForElementVisible selector="{{WidgetSection.CMSPage}}" stepKey="waitForPageVisible" />
<click selector="{{WidgetSection.CMSPage}}" stepKey="selectPreCreateCMS" />
<waitForElementNotVisible selector="{{WidgetSection.SelectPageTitle}}" stepKey="waitForSlideOutCloses" />
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
<waitForElementNotVisible selector="{{WidgetSection.InsertWidgetTitle}}" stepKey="waitForSlideOutCloses1" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSlideOutCloses1"/>
<click selector="{{BlockNewPagePageActionsSection.expandSplitButton}}" stepKey="expandSplitButton"/>
<click selector="{{BlockNewPagePageActionsSection.saveAndClose}}" stepKey="clickSaveBlock"/>
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage">
Expand All @@ -62,9 +62,9 @@
</actionGroup>
<click selector="{{WidgetSection.BlockPage(_defaultBlock.identifier)}}" stepKey="selectPreCreateBlock" />
<wait time="3" stepKey="wait1" />
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidgetBtn" />
<waitForLoadingMaskToDisappear stepKey="waitForLoading2" />
<waitForPageLoad stepKey="waitForPageLoad6" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidgetBtn"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading2"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad6"/>
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandButtonMenu"/>
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.splitButtonMenu}}" stepKey="waitForSplitButtonMenuVisible"/>
<click selector="{{CmsNewPagePageActionsSection.savePage}}" stepKey="clickSavePage"/>
Expand All @@ -85,4 +85,3 @@
</after>
</test>
</tests>

Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
<click selector="{{WidgetSection.CMSPage}}" stepKey="selectPreCreateCMS" />
<waitForElementNotVisible selector="{{WidgetSection.SelectPageTitle}}" stepKey="waitForSlideOutCloses" />
<wait time="3" stepKey="waitForInsertWidgetClickable"/>
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
<waitForElementNotVisible selector="{{WidgetSection.InsertWidgetTitle}}" stepKey="waitForSlideoutCloses" />
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
Expand All @@ -70,4 +70,3 @@
</after>
</test>
</tests>

Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
<scrollTo selector="{{WidgetSection.BlockPage($$createPreReqBlock.identifier$$)}}" stepKey="scrollToBlockIdentifier" />
<click selector="{{WidgetSection.BlockPage($$createPreReqBlock.identifier$$)}}" stepKey="selectPreCreateBlock" />
<waitForElementNotVisible selector="{{WidgetSection.SelectBlockTitle}}" stepKey="waitForSlideoutCloses" />
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
<waitForLoadingMaskToDisappear stepKey="waitingForLoading" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitingForLoading"/>
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
<waitForElementVisible selector="{{WidgetSection.PreCreateCategory('$$createPreReqCategory.name$$')}}" stepKey="expandWait" />
<click selector="{{WidgetSection.PreCreateCategory('$$createPreReqCategory.name$$')}}" stepKey="selectPreCreateCategory" />
<waitForElementNotVisible selector="{{WidgetSection.SelectCategoryTitle}}" stepKey="waitForSlideoutCloses1" />
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
<waitForElementNotVisible selector="{{WidgetSection.InsertWidgetTitle}}" stepKey="waitForSlideOutCloses2" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSlideOutCloses2"/>
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
<waitForLoadingMaskToDisappear stepKey="waitLoadingMask" />
<click selector="{{WidgetSection.PreCreateProduct('$$createPreReqProduct.name$$')}}" stepKey="selectPreProduct" />
<waitForElementNotVisible selector="{{WidgetSection.SelectProductTitle}}" stepKey="waitForSlideOutCloses" />
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
<waitForLoadingMaskToDisappear stepKey="waitLoadingMask1" />
<waitForPageLoad stepKey="wait6" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitLoadingMask1"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait6"/>
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
<click selector="{{WidgetSection.RuleParam}}" stepKey="clickRuleParam3"/>
<fillField selector="{{WidgetSection.RuleParamInput('3','2')}}" userInput="1" stepKey="fillMinPrice"/>

<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
<waitForPageLoad stepKey="wait6" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait6"/>
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
<selectOption selector="{{WidgetSection.ProductAttribute}}" userInput="Name" stepKey="selectProductAttributes" />
<selectOption selector="{{WidgetSection.ButtonToShow}}" userInput="Add to Cart" stepKey="selectBtnToShow" />
<selectOption selector="{{WidgetSection.WidgetTemplate}}" userInput="Compared Products Grid Template" stepKey="selectTemplate" />
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<selectOption selector="{{WidgetSection.ProductAttribute}}" userInput="Name" stepKey="selectProductAttributes" />
<selectOption selector="{{WidgetSection.ButtonToShow}}" userInput="Add to Cart" stepKey="selectBtnToShow" />
<selectOption selector="{{WidgetSection.WidgetTemplate}}" userInput="Viewed Products Grid Template" stepKey="selectTemplate" />
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
<scrollTo selector="{{CmsNewPagePageSeoSection.header}}" stepKey="scrollToSearchEngineTab" />
<click selector="{{CmsNewPagePageSeoSection.header}}" stepKey="clickExpandSearchEngineOptimisation"/>
<fillField selector="{{CmsNewPagePageSeoSection.urlKey}}" userInput="{{_defaultCmsPage.identifier}}" stepKey="fillFieldUrlKey"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
<waitForPageLoad stepKey="waitForPageToLoadBeforeSelectingProduct2"/>
<click selector="{{WidgetSection.PreCreateProduct('$$product2.name$$')}}" stepKey="selectProduct2"/>
<click selector="{{AdminNewWidgetSection.applyParameter}}" stepKey="applyProducts"/>
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickOnInsertWidgetButton"/>
<waitForPageLoad stepKey="waitForPageToLoadBeforeClickingOnSaveWidget1"/>
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickOnInsertWidgetButton"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoadBeforeClickingOnSaveWidget1"/>
<click selector="{{InsertWidgetSection.save}}" stepKey="saveWidget"/>
<waitForPageLoad stepKey="waitForSaveComplete"/>
<actionGroup ref="CompareTwoProductsOrder" stepKey="compareProductOrders1">
Expand Down Expand Up @@ -125,8 +125,8 @@
<click selector="{{WidgetSection.PreCreateProduct('$$product1.name$$')}}" stepKey="selectProduct1_1"/>
<click selector="{{WidgetSection.PreCreateProduct('$$product1.name$$')}}" stepKey="selectProduct2_2"/>
<click selector="{{AdminNewWidgetSection.applyParameter}}" stepKey="applyProducts1"/>
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickOnInsertWidgetButton1"/>
<waitForPageLoad stepKey="waitForPageToLoadBeforeClickingOnSaveWidget2"/>
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickOnInsertWidgetButton1"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoadBeforeClickingOnSaveWidget2"/>
<click selector="{{InsertWidgetSection.save}}" stepKey="saveWidget1"/>
<waitForPageLoad stepKey="waitForSaveComplete1"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
<scrollTo selector="{{WidgetSection.BlockPage(_defaultBlock.identifier)}}" stepKey="scrollToBlockIdentifier" />
<click selector="{{WidgetSection.BlockPage(_defaultBlock.identifier)}}" stepKey="selectPreCreateBlock" />
<wait time="3" stepKey="wait1" />
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
<waitForPageLoad stepKey="waitForPageLoad5" />
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="clickInsertWidget"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLoading"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad5"/>
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForSaveButtonVisible"/>
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandButtonMenu"/>
<click selector="{{CmsNewPagePageActionsSection.savePage}}" stepKey="clickSavePage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<element name="stateProvinceFill" type="input" selector="#region"/>
<element name="zip" type="input" selector="#zip"/>
<element name="country" type="select" selector="#country"/>
<element name="vatId" type="input" selector="#vat_id"/>
<element name="saveAddress" type="button" selector="[data-action='save-address']" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,23 @@ $formData = $block->getFormData();
</div>
</div>

<?php if ($addressHelper->isVatAttributeVisible()): ?>
<?php $_vatidValidationClass = $addressHelper->getAttributeValidationClass('vat_id'); ?>
<div class="field taxvat">
<label class="label" for="vat_id">
<span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('vat_id') ?></span>
</label>
<div class="control">
<input type="text"
name="vat_id"
value="<?= $escaper->escapeHtmlAttr($formData->getVatId()) ?>"
title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('vat_id') ?>"
class="input-text <?= $escaper->escapeHtmlAttr($_vatidValidationClass) ?>"
id="vat_id">
</div>
</div>
<?php endif; ?>

<div class="field country required">
<label for="country" class="label">
<span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('country_id') ?></span>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?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="StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest">
<annotations>
<features value="Multishipment"/>
<stories value="Checking vat id field at account create page with 'Check Out with Multiple Addresses'"/>
<title value="Checking vat id field at account create page with 'Check Out with Multiple Addresses'"/>
<description value="'VAT Number' field should be available at create account page if 'Show VAT Number on Storefront' is Yes"/>
<severity value="MAJOR"/>
<testCaseId value="MC-40397"/>
<group value="Multishipment"/>
</annotations>
<before>
<magentoCLI command="config:set customer/create_account/vat_frontend_visibility 1" stepKey="showVatNumberOnStorefrontYes"/>
<createData entity="SimpleSubCategory" stepKey="category"/>
<createData entity="SimpleProduct" stepKey="product">
<requiredEntity createDataKey="category"/>
</createData>
</before>
<after>
<magentoCLI command="config:set customer/create_account/vat_frontend_visibility 0" stepKey="showVatNumberOnStorefrontNo"/>
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfter">
<argument name="tags" value="config"/>
</actionGroup>
<deleteData createDataKey="category" stepKey="deleteCategory"/>
<deleteData createDataKey="product" stepKey="deleteproduct"/>
</after>
<!-- Add product to the cart -->
<amOnPage url="$$product.name$$.html" stepKey="goToProductPage"/>
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addProductToCart">
<argument name="productName" value="$$product.name$$"/>
</actionGroup>
<!-- Check Out with Multiple Addresses -->
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/>
<waitForElementVisible selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="waitMultipleAddressShippingButton"/>
<click selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="clickToMultipleAddressShippingButton"/>
<!--Create an account-->
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="waitCreateAnAccountButton"/>
<click selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="clickOnCreateAnAccountButton"/>
<waitForPageLoad stepKey="waitForCreateAccountPageToLoad"/>
<!--Check the VAT Number field-->
<seeElement selector="{{StorefrontCustomerAddressSection.vatId}}" stepKey="assertVatIdField"/>
</test>
</tests>
Loading

0 comments on commit 5fa09cc

Please sign in to comment.