Skip to content

Commit

Permalink
Merge pull request #1733 from magento-gl/2.4-develop
Browse files Browse the repository at this point in the history
Merge 2.4-develop into AC-9712
  • Loading branch information
djadobe16 authored Sep 10, 2024
2 parents 96cd829 + 0cfe4a3 commit d1c51dc
Show file tree
Hide file tree
Showing 36 changed files with 1,284 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminAddTextSwatchForAdminActionGroup">
<annotations>
<description>Admin add texual swatch for admin.</description>
</annotations>
<arguments>
<argument name="position" type="string"/>
<argument name="swatchName" type="string"/>
<argument name="swatchDescription" type="string"/>
</arguments>
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue(position)}}" stepKey="waitForSwatchTextBoxForAdminToVisible"/>
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue(position)}}" userInput="{{swatchName}}" stepKey="fillSwatchForAdmin"/>
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue(position)}}" stepKey="waitForDescriptionTextBoxForAdminToVisible"/>
<fillField selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue(position)}}" userInput="{{swatchDescription}}" stepKey="fillDescriptionForAdmin"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminAddTextSwatchForStoreViewActionGroup">
<annotations>
<description>Admin add texual swatch for storeview.</description>
</annotations>
<arguments>
<argument name="position" type="string"/>
<argument name="swatchName" type="string"/>
<argument name="swatchDescription" type="string"/>
</arguments>
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue(position)}}" stepKey="waitForSwatchTextBoxForAdminToVisible"/>
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue(position)}}" userInput="{{swatchName}}" stepKey="fillSwatchForStoreView"/>
<waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue(position)}}" stepKey="waitForDescriptionTextBoxForAdminToVisible"/>
<fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue(position)}}" userInput="{{swatchDescription}}" stepKey="fillDescriptionForStoreView"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="FilterProductGridByProductNameActionGroup">
<annotations>
<description>Filters the Admin Products grid by the provided Product (Name).</description>
</annotations>
<arguments>
<argument name="productName" type="string"/>
</arguments>
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
<waitForElementClickable selector="{{AdminProductGridFilterSection.filters}}" stepKey="openForFilterField"/>
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
<waitForElementVisible selector="{{AdminProductGridFilterSection.nameFilter}}" stepKey="waitForFilterFieldToBecomeActive"/>
<fillField selector="{{AdminProductGridFilterSection.nameFilter}}" userInput="{{productName}}" stepKey="fillProductName"/>
<waitForElementClickable selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="waitToClickApplyFilter"/>
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
<waitForElementNotVisible selector="{{AdminProductGridSection.loadingMask}}" stepKey="waitForFilteredGridLoad" time="30"/>
</actionGroup>
</actionGroups>

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontAssertAddToCartButtonNotPresentOnProductPageActionGroup">
<annotations>
<description>Validate "Add to Cart" button is NOT present on product page.</description>
</annotations>
<waitForElementNotVisible selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCartButtonNotPresent"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontAssertProductPriceNotPresentOnProductPageActionGroup">
<annotations>
<description>Validate that the provided Product Price is NOT present on product page.</description>
</annotations>
<waitForElementNotVisible selector="{{StorefrontProductInfoMainSection.price}}" stepKey="verifyProductPriceNotVisible"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,11 @@
<element name="descriptionField1" type="input" selector="(//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Description'])[2]" parameterized="true"/>
<element name="swatchField2" type="input" selector="(//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Swatch'])[3]" parameterized="true"/>
<element name="descriptionField2" type="input" selector="(//th[contains(@class, 'col-swatch')]/span[contains(text(), '{{arg}}')]/ancestor::thead/following-sibling::tbody//input[@placeholder='Description'])[3]" parameterized="true"/>
<element name="textSwatchAdminSwatchValue" type="input" selector="[data-role='swatch-text-options-container'] input[name='swatchtext[value][option_{{row}}][0]']" parameterized="true"/>
<element name="textSwatchAdminDescriptionValue" type="input" selector="[data-role='swatch-text-options-container'] input[name='optiontext[value][option_{{row}}][0]']" parameterized="true"/>
<element name="textSwatchDefaultStoreSwatchValue" type="input" selector="[data-role='swatch-text-options-container'] input[name='swatchtext[value][option_{{row}}][1]']" parameterized="true"/>
<element name="textSwatchDefaultStoreDescriptionValue" type="input" selector="[data-role='swatch-text-options-container'] input[name='optiontext[value][option_{{row}}][1]']" parameterized="true"/>
<element name="textSwatchStoreViewValue" type="input" selector="//*[@data-role='swatch-text-options-container']//td[starts-with(@class,'col-swatch col-swatch')]//input[@value='{{storeViewValue}}']" parameterized="true"/>
<element name="isDefaultTextSwatch" type="radio" selector="[data-role='swatch-text-options-container'] tr:nth-of-type({{row}}) input[name='defaulttext[]']" parameterized="true"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<useCaseId value="MAGETWO-70232"/>
<group value="catalog"/>
<group value="cloud"/>
<!-- Will be fixed in the scope of ACQE-6795 -->
<group value="pr_exclude"/>
</annotations>
<before>
<!--Create category-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@

<!-- Select payment solution -->
<checkOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="selectPaymentSolution" />

<!-- Check order summary in checkout -->
<comment userInput="BIC workaround" stepKey="waitForPaymentSectionLoaded"/>
<comment userInput="BIC workaround" stepKey="waitForPlaceOrderButton"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<testCaseId value="AC-3216"/>
<useCaseId value="ACP2E-862"/>
<group value="checkout"/>
<!--Will be fixed in the scope of -->
<group value="pr_exclude"/>
</annotations>
<before>
<!--Enable flat rate shipping-->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminDisableTermsAndConditionsConfigurationActionGroup">
<annotations>
<description>Disable Terms and Conditions On Configuration page.</description>
</annotations>
<magentoCLI command="config:set {{disableTermsAndConditions.path}} {{disableTermsAndConditions.value}}" stepKey="DisableTermsAndConditions"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminEnableTermsAndConditionsConfigurationActionGroup">
<annotations>
<description>Enable Terms and Conditions On Configuration page.</description>
</annotations>
<magentoCLI command="config:set {{enableTermsAndConditions.path}} {{enableTermsAndConditions.value}}" stepKey="EnableTermsAndConditions"/>
</actionGroup>
</actionGroups>
17 changes: 17 additions & 0 deletions app/code/Magento/CheckoutAgreements/Test/Mftf/Data/TermData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,21 @@
<data key="checkboxText" unique="suffix">Terms and Conditions</data>
<data key="content" unique="suffix">TestMessage</data>
</entity>
<entity name="enableTermsAndConditions" type="term">
<data key="path">checkout/options/enable_agreements</data>
<data key="value">1</data>
</entity>
<entity name="disableTermsAndConditions" type="term">
<data key="path">checkout/options/enable_agreements</data>
<data key="value">0</data>
</entity>
<entity name="newHtmlAutomaticallyTerm" type="term">
<data key="name" unique="suffix">Test name</data>
<data key="isActive">Enabled</data>
<data key="isHtml">HTML</data>
<data key="mode">Automatically</data>
<data key="storeView">Default Store View</data>
<data key="checkboxText" unique="suffix">test_checkbox</data>
<data key="content" unique="suffix">TestMessage</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
<element name="checkoutAgreementCheckboxcheck" type="checkbox" selector="//span[text()='{{agreementname}}']/../../../input[@type='checkbox']" parameterized="true"/>
<element name="checkoutAgreementLink" type="button" selector="//div[@id='checkout-payment-method-load']//label//span[contains(., '{{paymentName}}')]//ancestor::div[contains(@class, 'payment-method _active')]//div[contains(@class, 'checkout-agreements-block')]//span" parameterized="true"/>
<element name="agreementClose" type="button" selector=".agreements-modal._show .action-close"/>
<element name="contentArea" type="text" selector="//div[@class='modals-wrapper']//aside[@class='modal-popup agreements-modal modal-slide _inner-scroll _show']//div[@class='checkout-agreements-item-content' and contains(text(), '{{contentText}}')]" parameterized="true"/>
<element name="manualCheckoutAgreementLink" type="button" selector="//input[starts-with(@id,'{{paymentName}}')]/..//label//span" parameterized="true"/>
<element name="automaticCheckoutAgreementLink" type="button" selector="//input[starts-with(@id,'{{paymentName}}')]/..//following-sibling::div//button//span" parameterized="true"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?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="StorefrontAssertSeveralTermsAndConditionsOnPayPalExpressCheckoutReviewPageTest">
<annotations>
<features value="CheckoutAgreements"/>
<stories value="Checkout agreements and Paypal express checkout"/>
<title value="Assert Several Terms And Conditions On PayPal Express Checkout Review Page"/>
<description value="Several Terms and Conditions with different types are shown on PayPal express checkout review page"/>
<severity value="MAJOR"/>
<testCaseId value="AC-4430"/>
<group value="paypalExpress"/>
<group value="3rd_party_integration" />
<group value="pr_exclude" />
</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/>
<createData entity="SimpleProduct" stepKey="createSimpleProduct"/>
<actionGroup ref="AdminEnableTermsAndConditionsConfigurationActionGroup" stepKey="EnableTermsAndConditions"/>
<createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/>
</before>
<after>
<!--Delete created data-->
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
<actionGroup ref="AdminTermsConditionsOpenGridActionGroup" stepKey="openTermsGridToDelete"/>
<actionGroup ref="AdminDeleteAllTermConditionsActionGroup" stepKey="deleteAllTerms"/>
<actionGroup ref="AdminDisableTermsAndConditionsConfigurationActionGroup" stepKey="disableTermsAndConditions"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
</after>
<!-- create manual term -->
<actionGroup ref="AdminTermsConditionsOpenNewTermPageActionGroup" stepKey="openNewTermForManualTerm"/>
<actionGroup ref="AdminTermsConditionsFillTermEditFormActionGroup" stepKey="createManualTerm">
<argument name="term" value="newHtmlTerm"/>
</actionGroup>
<actionGroup ref="AdminTermsConditionsSaveTermActionGroup" stepKey="saveManualTerm"/>
<!-- create automatic term -->
<actionGroup ref="AdminTermsConditionsOpenNewTermPageActionGroup" stepKey="openNewTermForAutomaticTerm"/>
<actionGroup ref="AdminTermsConditionsFillTermEditFormActionGroup" stepKey="createAutomaticTerm">
<argument name="term" value="newHtmlAutomaticallyTerm"/>
</actionGroup>
<actionGroup ref="AdminTermsConditionsSaveTermActionGroup" stepKey="saveAutomaticTerm"/>
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
<argument name="indices" value=""/>
</actionGroup>
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
<argument name="tags" value="config full_page"/>
</actionGroup>
<!-- Login as customer -->
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin">
<argument name="Customer" value="$$createCustomer$$"/>
</actionGroup>
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
<argument name="product" value="$createSimpleProduct$"/>
</actionGroup>
<!--Navigate to checkout-->
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="openCheckoutPage"/>
<!-- Click next button to open payment section -->
<actionGroup ref="StorefrontCheckoutClickNextButtonActionGroup" stepKey="clickNext"/>
<!-- Click on PayPal payment radio button -->
<waitForElementClickable selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="waitForPayPalRadioButton"/>
<click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="selectPaypalPayment"/>
<!-- Verify both manual and automatic are present -->
<waitForText selector="{{StorefrontCheckoutAgreementsSection.manualCheckoutAgreementLink('agreement_paypal_express')}}" userInput="{{newHtmlTerm.checkboxText}}" stepKey="seeManualTermTextInCheckoutIsPresent"/>
<waitForText selector="{{StorefrontCheckoutAgreementsSection.automaticCheckoutAgreementLink('agreement_paypal_express')}}" userInput="{{newHtmlAutomaticallyTerm.checkboxText}}" stepKey="seeAutomaticTermTextInCheckoutIsPresent"/>
<!-- open manual terms and conditions and verify content messages-->
<waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.manualCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="waitForManualTermTextInCheckoutIsClickable"/>
<click selector="{{StorefrontCheckoutAgreementsSection.manualCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="clickManualTermTextInCheckout"/>
<waitForElement selector="{{StorefrontCheckoutAgreementsSection.contentArea(newHtmlTerm.content)}}" stepKey="verifyManualTermContentTextMessage"/>
<waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.agreementClose}}" stepKey="waitForCloseToBeClickable"/>
<click selector="{{StorefrontCheckoutAgreementsSection.agreementClose}}" stepKey="ClickOnClose"/>
<!-- open automatic terms and conditions and verify content messages-->
<waitForElementClickable selector="{{StorefrontCheckoutAgreementsSection.automaticCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="waitForAutomaticTermTextInCheckoutIsClickable"/>
<click selector="{{StorefrontCheckoutAgreementsSection.automaticCheckoutAgreementLink('agreement_paypal_express')}}" stepKey="clickAutomaticTermTextInCheckoutIsClickable"/>
<waitForElement selector="{{StorefrontCheckoutAgreementsSection.contentArea(newHtmlAutomaticallyTerm.content)}}" stepKey="verifyAutomaticTermContentTextMessage"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<element name="attributeRowByAttributeCode" type="block" selector="//td[count(../../..//th[./*[.='Attribute Code']]/preceding-sibling::th) + 1][./*[.='{{attribute_code}}']]/../td//input[@data-action='select-row']" parameterized="true"/>
<element name="qtyForColorAttribute" type="text" selector="//span[text()='{{var1}}']/../..//input[@type='text']" parameterized="true"/>
<element name="configProductName" type="text" selector="//table[@class='data-grid data-grid-configurable']//tbody//tr[{{row}}]//td[2]//span" parameterized="true"/>
<element name="optionsWithTitle" type="text" selector="//*[@class='attribute-entity-title' and text()='{{attributeTitle}}']//ancestor::div[@class='attribute-entity-top']//following-sibling::button[@class='action-create-new action-tertiary']/span" parameterized="true"/>
<element name="cancel" type="button" selector=".action-cancel"/>
<element name="back" type="button" selector=".action-back-step"/>
</section>
Expand Down
Loading

0 comments on commit d1c51dc

Please sign in to comment.