Skip to content

Commit

Permalink
Merge branch '2.4-develop' of https://github.com/mage-os/mirror-magento2
Browse files Browse the repository at this point in the history
 into 2.4-develop
  • Loading branch information
mage-os-ci committed Mar 5, 2024
2 parents 9cf7fbe + 2ad9f14 commit 73c7bfd
Show file tree
Hide file tree
Showing 40 changed files with 879 additions and 63 deletions.
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="AddCostPriceToProductActionGroup">
<annotations>
<description>Sets the provided Cost Price on the Admin Product creation/edit page.</description>
</annotations>
<arguments>
<argument name="price" type="string" defaultValue="10"/>
</arguments>

<waitForPageLoad stepKey="waitForPageLoad"/>
<click selector="{{AdminProductFormSection.advancedPricingLink}}" stepKey="clickAdvancedPricingLink"/>
<waitForPageLoad stepKey="waitForAdvancedPricingModal"/>
<waitForElementVisible selector="{{AdminProductFormCostPricingSection.costPrice}}" stepKey="waitCostPrice"/>
<fillField userInput="{{price}}" selector="{{AdminProductFormCostPricingSection.costPrice}}" stepKey="fillCostPrice"/>
<click selector="{{AdminProductFormAdvancedPricingSection.doneButton}}" stepKey="clickDone"/>
<waitForPageLoad stepKey="waitForAdvancedPricingModalGone"/>
<dontSeeElement selector="{{AdminProductFormAdvancedPricingSection.advancedPricingCloseButton}}" stepKey="clickAdvancedPricingCloseButton"/>
</actionGroup>
</actionGroups>
31 changes: 31 additions & 0 deletions app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1488,4 +1488,35 @@
<data key="name">Simple Product with special characters in SKU</data>
<data key="sku">s000&amp;01</data>
</entity>
<entity name="simpleProductwithTaxNone" type="product">
<data key="name" unique="suffix">Product1</data>
<data key="sku" unique="suffix">product-1</data>
<data key="urlKey" unique="suffix">product1</data>
<data key="price">200.00</data>
<data key="quantity">100</data>
<data key="status">1</data>
<data key="cost">150.00</data>
<data key="productTaxClass">None</data>
<data key="type_id">simple</data>
<data key="attribute_set_id">4</data>
<data key="weight">1</data>
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
</entity>
<entity name="simpleProductwithTaxGoods" type="product">
<data key="urlKey" unique="suffix">product2</data>
<data key="name" unique="suffix">Product2</data>
<data key="sku" unique="suffix">product-2</data>
<data key="price">300.00</data>
<data key="quantity">300</data>
<data key="status">1</data>
<data key="storefrontStatus">IN STOCK</data>
<data key="cost">250.00</data>
<data key="productTaxClass">Taxable Goods</data>
<data key="type_id">simple</data>
<data key="attribute_set_id">4</data>
<data key="weight">1</data>
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
</entity>
</entities>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminProductFormCostPricingSection">
<element name="costPrice" type="input" selector="input[name='product[cost]']"/>
<element name="doneButton" type="button" selector=".product_form_product_form_advanced_pricing_modal button.action-primary" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<element name="priceForGiftsWrapping" type="input" selector="//input[@name='product[gift_wrapping_price]']"/>
<element name="productCollapsibleColumnsScheduleUpdate" type="button" selector="//div[@class='modal-component']//div[@class='entry-edit form-inline']//div[@data-state-collapsible='{{state}}']//strong[@class='admin__collapsible-title']//span[text()='{{expandTitle}}']" parameterized="true"/>
<element name="allowGiftMessageToggleVerify" type="button" selector="//input[@type='checkbox' and @name='product[gift_message_available]' and @value='{{var1}}']" parameterized="true"/>
<element name="headerNameAndValueOtherCurrency" type="text" selector="//span[@class='data-grid-cell-content' and contains(text(), '{{gridName}}')]/ancestor::thead/following-sibling::tbody//div[@class = 'data-grid-cell-content' and contains(text(),'{{currencyNumber}}')]" parameterized="true"/>
</section>
</sections>

Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
<element name="productAttributeOptionValue" type="button" selector="//div[@id='narrow-by-list']//a[contains(text(), '{{var1}}')]" parameterized="true"/>
<element name="outOfStockProductCategoryPage" type="text" selector="//div[@class='stock unavailable']//span[text()='Out of stock']"/>
<element name="ListedProductAttributes" type="block" selector="//div[@aria-label='{{vs_attribute}}']//div[@aria-label='{{attribute_name}}']" parameterized="true"/>
<element name="quickOrderLink" type="text" selector="//div[@class='panel header']//a[text()='Quick Order']" />
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<element name="billingAddressSameAsShippingCashOnDeliveryCheckbox" type="checkbox" selector="#billing-address-same-as-shipping-cashondelivery"/>
<element name="errormessage" type="text" selector="//div[@data-ui-id='checkout-cart-validationmessages-message-error']"/>
<element name="productQuantityInCartBlock" type="text" selector="//div[@class='details-qty']/span[@class='value']" />
<element name="productChargedFor" type="text" selector="tr.totals.charge span.price"/>
<element name="customerAddressAttribute" type="input" selector="//div[@name='billingAddresscheckmo.custom_attributes.{{attribute}}']//input[@name='custom_attributes[{{attribute}}]']" parameterized="true" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<!-- Click and open order summary tab-->
<conditionalClick selector="{{CheckoutOrderSummarySection.miniCartTab}}" dependentSelector="{{CheckoutOrderSummarySection.miniCartTabClosed}}" visible="true" stepKey="clickOnOrderSummaryTab"/>
<waitForPageLoad stepKey="waitForPageToLoad5"/>

<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectPaymentMethod"/>
<!-- Assert Product displayed in Order Summary -->
<actionGroup ref="StorefrontAssertProductDetailsInOrderSummaryActionGroup" stepKey="assertProduct3InOrderSummary">
<argument name="productName" value="$$virtualProduct.name$$"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?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="ResetCalculationClassForShippingActionGroup">
<annotations>
<description>Goes to the 'Configuration' page for 'Tax Calculation Method Based On'. Sets 'Unit Price' to 'Total'. Clicks on the Save button. PLEASE NOTE: The value is Hardcoded.</description>
</annotations>
<arguments>
<argument name="taxCalculationMethod" type="string" defaultValue="Total"/>
</arguments>

<amOnPage url="{{AdminSalesTaxClassPage.url}}" stepKey="navigateToSalesTaxConfigPagetoReset"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<click selector="{{AdminConfigureTaxSection.taxCalculationSettings}}" stepKey="openTaxCalculationSettingsSection"/>
<waitForElementVisible selector="{{AdminConfigureTaxSection.taxCalculationAlgorithmInherit}}" stepKey="seeShippingTaxClass"/>
<checkOption selector="{{AdminConfigureTaxSection.taxCalculationAlgorithmInherit}}" stepKey="uncheckUseSystemValue"/>
<selectOption selector="{{AdminConfigureTaxSection.taxCalculationAlgorithm}}" userInput="{{taxCalculationMethod}}" stepKey="setShippingTaxClass"/>
<click selector="{{AdminConfigureTaxSection.save}}" stepKey="saveConfig"/>
<waitForPageLoad stepKey="waitForConfigSaved"/>
<click selector="{{AdminConfigureTaxSection.taxCalculationSettingsOpened}}" stepKey="closeTaxCalcSettingsSection"/>
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?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="ResetIncludeTaxInTotalForShippingActionGroup">
<annotations>
<description>Goes to the 'Configuration' page for 'Orders, Invoices, Credit Memos Display Settings'. Sets 'Yes' to 'No'. Clicks on the Save button. PLEASE NOTE: The value is Hardcoded.</description>
</annotations>
<arguments>
<argument name="showOrderTotalWithoutTax" type="string" defaultValue="No"/>
<argument name="displayFullTax" type="string" defaultValue="No"/>
<argument name="displayZeroTax" type="string" defaultValue="No"/>
</arguments>
<amOnPage url="{{AdminSalesTaxClassPage.url}}" stepKey="navigateToSalesTaxPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<click selector="{{AdminConfigureTaxSection.ordersInvoicesCreditSales}}" stepKey="openOrdersInvoicesCreditSales"/>
<waitForElementVisible selector="{{AdminConfigureTaxSection.taxSalesDisplaySubtotal}}" stepKey="taxSalesDisplaySubtotal"/>
<checkOption selector="{{AdminConfigureTaxSection.taxSalesDisplaySubtotal}}" stepKey="displaySubtotalUncheckUseSystemValue"/>
<selectOption selector="{{AdminConfigureTaxSection.taxSalesDisplayGrandTotal}}" userInput="{{showOrderTotalWithoutTax}}" stepKey="setTaxSalesDisplayGrandTotal"/>
<checkOption selector="{{AdminConfigureTaxSection.taxSalesDisplayFullSummaryInherit}}" stepKey="displayFullSummaryuncheckUseSystemValue"/>
<selectOption selector="{{AdminConfigureTaxSection.taxSalesDisplayFullSummary}}" userInput="{{displayFullTax}}" stepKey="setTaxSalesDisplayFullSummary"/>
<checkOption selector="{{AdminConfigureTaxSection.taxSalesDisplayZeroTaxInherit}}" stepKey="zeroTaxUncheckUseSystemValue"/>
<selectOption selector="{{AdminConfigureTaxSection.taxSalesDisplayZeroTax}}" userInput="{{displayZeroTax}}" stepKey="settaxSalesDisplayZeroTax"/>
<click selector="{{AdminConfigureTaxSection.save}}" stepKey="saveConfig"/>
<waitForPageLoad stepKey="waitForConfigSaved"/>
<click selector="{{AdminConfigureTaxSection.taxSalesDisplayHeadOpen}}" stepKey="taxSalesDisplayHeadClosed"/>
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?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="ResetOrderInvoiceSettingsForShippingActionGroup">
<annotations>
<description>Goes to the 'Configuration' page for 'Orders, Invoices, Credit Memos Display Settings'. Sets 'Display Subtotal' to 'Excluding Tax'. Clicks on the Save button. PLEASE NOTE: The value is Hardcoded.</description>
</annotations>
<arguments>
<argument name="taxCalculationMethod" type="string" defaultValue="Including and Excluding Tax"/>
</arguments>
<amOnPage url="{{AdminSalesTaxClassPage.url}}" stepKey="navigateToSalesTaxPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<click selector="{{AdminConfigureTaxSection.ordersInvoicesCreditSales}}" stepKey="openOrdersInvoicesCreditSales"/>
<waitForElementVisible selector="{{AdminConfigureTaxSection.orderInvoiceSubtotalInherit}}" stepKey="seeShippingTaxClass"/>
<checkOption selector="{{AdminConfigureTaxSection.orderInvoiceSubtotalInherit}}" stepKey="uncheckUseSystemValue"/>
<selectOption selector="{{AdminConfigureTaxSection.orderInvoiceDisplaySubtotal}}" userInput="{{taxCalculationMethod}}" stepKey="setShippingTaxClass"/>
<click selector="{{AdminConfigureTaxSection.save}}" stepKey="saveConfig"/>
<waitForPageLoad stepKey="waitForConfigSaved"/>
<click selector="{{AdminConfigureTaxSection.taxSalesDisplayHeadOpen}}" stepKey="taxSalesDisplayHeadClosed"/>
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?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="SetCalculationClassForShippingActionGroup">
<annotations>
<description>Goes to the 'Configuration' page for 'Tax'. Sets 'Tax Calculation Method Based On' to 'Unit Price'. Clicks on the Save button. PLEASE NOTE: The value is Hardcoded.</description>
</annotations>
<arguments>
<argument name="taxCalculationMethod" type="string" defaultValue="Unit Price"/>
</arguments>
<amOnPage url="{{AdminSalesTaxClassPage.url}}" stepKey="navigateToSalesTaxPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<click selector="{{AdminConfigureTaxSection.taxCalculationSettings}}" stepKey="openTaxCalculationSettingsSection"/>
<scrollTo selector="{{AdminConfigureTaxSection.taxCalculationAlgorithmInherit}}" x="0" y="-80" stepKey="goToCheckbox"/>
<waitForElementVisible selector="{{AdminConfigureTaxSection.taxCalculationAlgorithmInherit}}" stepKey="seeShippingTaxClass"/>
<uncheckOption selector="{{AdminConfigureTaxSection.taxCalculationAlgorithmInherit}}" stepKey="uncheckUseSystemValue"/>
<selectOption selector="{{AdminConfigureTaxSection.taxCalculationAlgorithm}}" userInput="{{taxCalculationMethod}}" stepKey="setShippingTaxClass"/>
<click selector="{{AdminConfigureTaxSection.save}}" stepKey="saveConfig"/>
<waitForPageLoad stepKey="waitForConfigSaved"/>
<click selector="{{AdminConfigureTaxSection.taxCalculationSettingsOpened}}" stepKey="closeTaxCalcSettingsSection"/>
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?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="SetIncludeTaxInTotalForShippingActionGroup">
<annotations>
<description>Goes to the 'Configuration' page for 'Orders, Invoices, Credit Memos Display Settings'. Sets 'No' to 'Yes'. Clicks on the Save button. PLEASE NOTE: The value is Hardcoded.</description>
</annotations>
<arguments>
<argument name="showOrderTotalWithoutTax" type="string" defaultValue="Yes"/>
<argument name="displayFullTax" type="string" defaultValue="Yes"/>
<argument name="displayZeroTax" type="string" defaultValue="Yes"/>
</arguments>
<amOnPage url="{{AdminSalesTaxClassPage.url}}" stepKey="navigateToSalesTaxPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<click selector="{{AdminConfigureTaxSection.ordersInvoicesCreditSales}}" stepKey="openOrdersInvoicesCreditSales"/>
<waitForElementVisible selector="{{AdminConfigureTaxSection.taxSalesDisplaySubtotal}}" stepKey="taxSalesDisplaySubtotal"/>
<uncheckOption selector="{{AdminConfigureTaxSection.taxSalesDisplaySubtotal}}" stepKey="displaySubtotalUncheckUseSystemValue"/>
<selectOption selector="{{AdminConfigureTaxSection.taxSalesDisplayGrandTotal}}" userInput="{{showOrderTotalWithoutTax}}" stepKey="setTaxSalesDisplayGrandTotal"/>

<uncheckOption selector="{{AdminConfigureTaxSection.taxSalesDisplayFullSummaryInherit}}" stepKey="displayFullSummaryuncheckUseSystemValue"/>
<selectOption selector="{{AdminConfigureTaxSection.taxSalesDisplayFullSummary}}" userInput="{{displayFullTax}}" stepKey="setTaxSalesDisplayFullSummary"/>

<uncheckOption selector="{{AdminConfigureTaxSection.taxSalesDisplayZeroTaxInherit}}" stepKey="zeroTaxUncheckUseSystemValue"/>
<selectOption selector="{{AdminConfigureTaxSection.taxSalesDisplayZeroTax}}" userInput="{{displayZeroTax}}" stepKey="settaxSalesDisplayZeroTax"/>

<click selector="{{AdminConfigureTaxSection.save}}" stepKey="saveConfig"/>
<waitForPageLoad stepKey="waitForConfigSaved"/>
<click selector="{{AdminConfigureTaxSection.taxSalesDisplayHeadOpen}}" stepKey="taxSalesDisplayHeadClosed"/>
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?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="SetOrderInvoiceSettingsForShippingActionGroup">
<annotations>
<description>Goes to the 'Configuration' page for 'Orders, Invoices, Credit Memos Display Settings'. Sets 'Display Subtotal' to 'Include and Excluded tax'. Clicks on the Save button. PLEASE NOTE: The value is Hardcoded.</description>
</annotations>
<arguments>
<argument name="taxCalculationMethod" type="string" defaultValue="Including and Excluding Tax"/>
</arguments>
<amOnPage url="{{AdminSalesTaxClassPage.url}}" stepKey="navigateToSalesTaxPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<click selector="{{AdminConfigureTaxSection.ordersInvoicesCreditSales}}" stepKey="openOrdersInvoicesCreditSales"/>
<waitForElementVisible selector="{{AdminConfigureTaxSection.orderInvoiceSubtotalInherit}}" stepKey="seeShippingTaxClass"/>
<uncheckOption selector="{{AdminConfigureTaxSection.orderInvoiceSubtotalInherit}}" stepKey="uncheckUseSystemValue"/>
<selectOption selector="{{AdminConfigureTaxSection.orderInvoiceDisplaySubtotal}}" userInput="{{taxCalculationMethod}}" stepKey="setShippingTaxClass"/>
<click selector="{{AdminConfigureTaxSection.save}}" stepKey="saveConfig"/>
<waitForPageLoad stepKey="waitForConfigSaved"/>
<click selector="{{AdminConfigureTaxSection.taxSalesDisplayHeadOpen}}" stepKey="taxSalesDisplayHeadClosed"/>
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/>
</actionGroup>
</actionGroups>
Loading

0 comments on commit 73c7bfd

Please sign in to comment.