Skip to content

Commit

Permalink
Merge pull request #5933 from magento-tsg/2.4-develop-pr59
Browse files Browse the repository at this point in the history
[TSG] TESTs Fixes for 2.4 (pr59) (2.4-develop)
  • Loading branch information
zakdma committed Jul 28, 2020
2 parents de9332c + 83b5361 commit 89d3cda
Show file tree
Hide file tree
Showing 14 changed files with 705 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?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="AdminProductAttributeSaveActionGroup">
<annotations>
<description>Clicks on Save button to save the attribute and check success message.</description>
</annotations>

<scrollToTopOfPage stepKey="scrollToTopOfThePage"/>
<waitForElementVisible selector="{{AdminMainActionsSection.save}}" stepKey="waitForSaveButton"/>
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveButton"/>
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the product attribute." stepKey="seeSuccessMessage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminSaveProductAttributeActionGroup">
<annotations>
<description>Clicks on Save button to save the attribute.</description>
<description>DEPRECATED. Use AdminProductAttributeSaveActionGroup instead. Clicks on Save button to save the attribute.</description>
</annotations>

<waitForElementVisible selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?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="AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup">
<arguments>
<argument name="useInLayeredNavigationValue" type="string" defaultValue="Filterable (with results)"/>
</arguments>
<conditionalClick selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" dependentSelector="{{AttributePropertiesSection.useInLayeredNavigation}}" visible="false" stepKey="clickStoreFrontTab"/>
<waitForElementVisible selector="{{AttributePropertiesSection.useInLayeredNavigation}}" stepKey="waitForStorefrontTabLoad"/>
<selectOption selector="{{AttributePropertiesSection.useInLayeredNavigation}}" userInput="{{useInLayeredNavigationValue}}" stepKey="selectUseInLayeredNavigationOption"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="SaveProductAttributeActionGroup">
<annotations>
<description>Clicks on Save. Validates that the Success Message is present.</description>
<description>DEPRECATED. Use AdminProductAttributeSaveActionGroup instead. Clicks on Save. Validates that the Success Message is present.</description>
</annotations>

<waitForElementVisible selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="SaveProductAttributeInUseActionGroup">
<annotations>
<description>Clicks on Save. Validates that the Success Message is present.</description>
<description>DEPRECATED. Use AdminProductAttributeSaveActionGroup instead. Clicks on Save. Validates that the Success Message is present.</description>
</annotations>

<waitForElementVisible selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton"/>
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
<requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
</entity>
<entity name="ApiSimpleProductWithCategory" type="product2" extends="ApiSimpleOne">
<requiredEntity type="custom_attribute">CustomAttributeCategoryIds</requiredEntity>
</entity>
<entity name="ApiSimpleProductWithShortSKU" type="product2" extends="ApiSimpleOne">
<data key="sku" unique="suffix">pr</data>
</entity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@
<element name="removeFilter" type="button" selector="div.filter-current .remove"/>
<element name="activeFilterOptions" type="text" selector=".filter-options-item.active .items"/>
<element name="activeFilterOptionItemByPosition" type="text" selector=".filter-options-item.active .items li:nth-child({{itemPosition}}) a" parameterized="true"/>
<element name="enabledFilterOptionItemByLabel" type="text" selector="//div[@class='filter-options']//li[@class='item']//a[contains(text(), '{{optionLabel}}')]" parameterized="true"/>
<element name="disabledFilterOptionItemByLabel" type="text" selector="//div[@class='filter-options']//li[@class='item' and contains(text(), '{{optionLabel}}')]" parameterized="true"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
<annotations>
<features value="Checkout"/>
<stories value="Check customer information created by guest"/>
<title value="Check Customer Information Created By Guest"/>
<title value="Deprecated. Check Customer Information Created By Guest"/>
<description value="Check customer information after placing the order as the guest who created an account"/>
<severity value="MAJOR"/>
<testCaseId value="MAGETWO-95932"/>
<useCaseId value="MAGETWO-95820"/>
<group value="checkout"/>
<skip>
<issueId value="DEPRECATED">Use StorefrontCheckCustomerInfoOnOrderPageCreatedByGuestTest instead.</issueId>
</skip>
</annotations>

<before>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?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="StorefrontCheckCustomerInfoOnOrderPageCreatedByGuestTest">
<annotations>
<features value="Checkout"/>
<stories value="Check customer information created by guest"/>
<title value="Check Customer Information Created By Guest"/>
<description value="Check customer information after placing the order as the guest who created an account"/>
<severity value="MAJOR"/>
<testCaseId value="MC-28550"/>
<useCaseId value="MAGETWO-95820"/>
<group value="checkout"/>
</annotations>

<before>
<createData entity="_defaultCategory" stepKey="createCategory"/>
<createData entity="_defaultProduct" stepKey="createProduct">
<requiredEntity createDataKey="createCategory"/>
</createData>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>

<after>
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrdersGridFilter"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
</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="GuestCheckoutFillingShippingSectionActionGroup" stepKey="fillShippingSectionAsGuest">
<argument name="customerVar" value="CustomerEntityOne"/>
<argument name="customerAddressVar" value="CustomerAddressSimple"/>
</actionGroup>
<actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
<actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="placeOrder">
<argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage"/>
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/>
</actionGroup>
<grabTextFrom selector="{{CheckoutSuccessRegisterSection.orderNumber}}" stepKey="grabOrderNumber"/>
<actionGroup ref="StorefrontRegisterCustomerFromOrderSuccessPage" stepKey="createCustomerAfterPlaceOrder">
<argument name="customer" value="CustomerEntityOne"/>
</actionGroup>
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrdersGridById">
<argument name="orderId" value="{$grabOrderNumber}"/>
</actionGroup>
<see userInput="{{CustomerEntityOne.firstname}}" selector="{{AdminShipmentOrderInformationSection.customerName}}" stepKey="seeCustomerName"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,23 @@
<requiredEntity type="ValueIndex">ValueIndex2</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex3</requiredEntity>
</entity>
<entity name="ConfigurableProduct15Options" type="ConfigurableProductOption">
<var key="attribute_id" entityKey="attribute_id" entityType="ProductAttribute" />
<data key="label">option</data>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
<requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
</entity>
</entities>
19 changes: 19 additions & 0 deletions app/code/Magento/LayeredNavigation/Test/Mftf/Data/ConfigData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
<entity name="DisplayProductCountDefaultValue">
<data key="path">catalog/layered_navigation/display_product_count</data>
<data key="value">1</data>
</entity>
<entity name="PriceNavigationStepCalculationDefaultValue">
<data key="path">catalog/layered_navigation/price_range_calculation</data>
<data key="value">auto</data>
</entity>
</entities>
Loading

0 comments on commit 89d3cda

Please sign in to comment.