Skip to content

Commit f9a487d

Browse files
authored
Merge pull request #5296 from magento-tsg/2.4-develop-pr6
[TSG] TESTs Fixes for 2.4 (pr6) (2.4-develop)
2 parents 1027e02 + 79215d3 commit f9a487d

File tree

45 files changed

+966
-416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+966
-416
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertStorefrontProductDetailPageNameAndUrlActionGroup">
12+
<annotations>
13+
<description>Validates that the Product name and Url are correct.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" defaultValue="{{ApiSimpleProduct.name}}" type="string"/>
17+
<argument name="productUrl" defaultValue="{{ApiSimpleProduct.urlKey}}" type="string"/>
18+
</arguments>
19+
20+
<seeInCurrentUrl url="{{StorefrontProductPage.url(productUrl)}}" stepKey="checkUrl"/>
21+
<seeInTitle userInput="{{productName}}" stepKey="assertProductNameTitle"/>
22+
<see userInput="{{productName}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/>
23+
</actionGroup>
24+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontCheckCategorySimpleProductActionGroup.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
<argument name="product"/>
1717
</arguments>
1818

19+
<waitForElementVisible selector="{{StorefrontCategoryProductSection.ProductTitleByName(product.name)}}" stepKey="waitForProduct"/>
1920
<seeElement selector="{{StorefrontCategoryProductSection.ProductTitleByName(product.name)}}" stepKey="assertProductName"/>
2021
<see userInput="${{product.price}}.00" selector="{{StorefrontCategoryProductSection.ProductPriceByName(product.name)}}" stepKey="AssertProductPrice"/>
21-
<!-- @TODO: MAGETWO-80272 Move to Magento_Checkout -->
2222
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct"/>
23-
<!-- @TODO: MAGETWO-80272 Move to Magento_Checkout -->
2423
<seeElement selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="AssertAddToCart"/>
2524
</actionGroup>
2625
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontOpenProductFromCategoryPageActionGroup">
11+
<annotations>
12+
<description>Click on the provided product on category page.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="productName" type="string" defaultValue="{{ApiSimpleProduct.name}}"/>
16+
</arguments>
17+
18+
<click selector="{{StorefrontCategoryMainSection.specifiedProductItemInfo(productName)}}" stepKey="openProductPage"/>
19+
<waitForPageLoad stepKey="waitForProductPageLoad"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/ConstData.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
<entity name="prodNameWithSpecChars">
1717
<data key="trademark">"Pursuit Lumaflex™ Tone Band"</data>
1818
<data key="skumark">"x™"</data>
19+
<data key="trademark_without_quotes">Pursuit Lumaflex™ Tone Band</data>
20+
<data key="skumark_without_quotes">x™</data>
1921
</entity>
2022
</entities>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryProductsSection.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@
1212
<element name="sectionHeader" type="button" selector="div[data-index='assign_products']" timeout="30"/>
1313
<element name="addProducts" type="button" selector="#catalog_category_add_product_tabs" timeout="30"/>
1414
<element name="addProductsDisabled" type="button" selector="#catalog_category_add_product_tabs[disabled]" timeout="30"/>
15+
<element name="productsInCategorySectionTitle" type="text" selector="div[data-index='assign_products'] .fieldset-wrapper-title" timeout="10"/>
16+
<element name="productsInCategorySectionBody" type="text" selector="div[data-index='assign_products'] .admin__fieldset-wrapper-content"/>
1517
</section>
16-
</sections>
18+
</sections>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDuplicateProductTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@
1515
<testCaseId value="MC-14714"/>
1616
<severity value="CRITICAL"/>
1717
<group value="mtf_migrated"/>
18-
<skip>
19-
<issueId value="MC-30409"/>
20-
</skip>
2118
</annotations>
2219

2320
<before>
2421
<createData entity="SubCategory" stepKey="category"/>
2522
<createData entity="Two_nested_categories" stepKey="subCategory">
2623
<requiredEntity createDataKey="category"/>
2724
</createData>
25+
<magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="enableGenerateUrlRewrite"/>
2826
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
2927
</before>
3028

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCatalogPriceRuleAddSkuConditionActionGroup">
11+
<annotations>
12+
<description>Create new product SKU based condition in Catalog Price Rule form.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="productSku" type="string" defaultValue="{{ApiSimpleTwo.sku}}"/>
16+
</arguments>
17+
18+
<conditionalClick selector="{{AdminNewCatalogPriceRule.conditionsTabTitle}}" dependentSelector="{{AdminNewCatalogPriceRule.conditionsTabBody}}" visible="false" stepKey="openConditionsSectionIfNeeded"/>
19+
<scrollTo selector="{{AdminNewCatalogPriceRule.conditionsTabTitle}}" stepKey="scrollToConditionsFieldset"/>
20+
<waitForElementVisible selector="{{AdminNewCatalogPriceRuleConditions.newCondition}}" stepKey="waitForNewConditionButton"/>
21+
<click selector="{{AdminNewCatalogPriceRuleConditions.newCondition}}" stepKey="clickAddNewConditionButton"/>
22+
<selectOption selector="{{AdminNewCatalogPriceRuleConditions.conditionSelect('1')}}" userInput="Magento\CatalogRule\Model\Rule\Condition\Product|sku" stepKey="selectConditionTypeSku"/>
23+
<waitForPageLoad stepKey="waitConditionFormRefresh"/>
24+
<click selector="{{AdminNewCatalogPriceRuleConditions.targetEllipsis('1')}}" stepKey="clickEllipsis"/>
25+
<fillField selector="{{AdminNewCatalogPriceRuleConditions.targetInput('1', '1')}}" userInput="{{productSku}}" stepKey="fillProductSku"/>
26+
<click selector="{{AdminNewCatalogPriceRuleConditions.applyButton('1', '1')}}" stepKey="clickApply"/>
27+
</actionGroup>
28+
</actionGroups>

app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/CatalogPriceRuleActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<!-- action group to create a new catalog price rule giving a catalogRule entity -->
1212
<actionGroup name="NewCatalogPriceRuleByUIActionGroup">
1313
<annotations>
14-
<description>Goes to the Catalog Price Rule grid. Clicks on Add. Fills in the provided Catalog Rule details.</description>
14+
<description>DEPRECATED. Please use set of AG: AdminOpenNewCatalogPriceRuleFormPageActionGroup, AdminCatalogPriceRuleFillMainInfoActionGroup, AdminCatalogPriceRuleFillActionsActionGroup, AdminCatalogPriceRuleSaveAndApplyActionGroup
15+
Goes to the Catalog Price Rule grid. Clicks on Add. Fills in the provided Catalog Rule details.</description>
1516
</annotations>
1617
<arguments>
1718
<argument name="catalogRule" defaultValue="_defaultCatalogRule"/>

app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/NewCatalogPriceRuleByUIWithConditionIsSKUActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="NewCatalogPriceRuleByUIWithConditionIsSKUActionGroup" extends="NewCatalogPriceRuleByUIActionGroup">
1212
<annotations>
13-
<description>EXTENDS: newCatalogPriceRuleByUI. Add a Catalog Price Rule Condition based on the provided SKU.</description>
13+
<description>DEPRECATED. Please use set of AG: AdminOpenNewCatalogPriceRuleFormPageActionGroup, AdminCatalogPriceRuleFillMainInfoActionGroup, AdminCatalogPriceRuleFillActionsActionGroup, AdminCatalogPriceRuleAddSkuConditionActionGroup, AdminCatalogPriceRuleSaveAndApplyActionGroup
14+
EXTENDS: newCatalogPriceRuleByUI. Add a Catalog Price Rule Condition based on the provided SKU.</description>
1415
</annotations>
1516
<arguments>
1617
<argument name="productSku"/>

app/code/Magento/CatalogRule/Test/Mftf/Section/AdminNewCatalogPriceRuleSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<element name="targetEllipsisSelect" type="select" selector="select#conditions__{{var1}}--{{var2}}__value" parameterized="true" timeout="30"/>
6464
<element name="targetSelect" type="select" selector="//ul[@id='conditions__{{var}}__children']//select" parameterized="true" timeout="30"/>
6565
<element name="targetInput" type="input" selector="input#conditions__{{var1}}--{{var2}}__value" parameterized="true"/>
66-
<element name="applyButton" type="button" selector="#conditions__{{var1}}__children li:nth-of-type({{var2}}) a.rule-param-apply" parameterized="true"/>
66+
<element name="applyButton" type="button" selector="#conditions__{{var1}}__children li:nth-of-type({{var2}}) a.rule-param-apply" parameterized="true" timeout="30"/>
6767
<element name="condition" type="text" selector="//span[@class='rule-param']/a[text()='{{condition}}']" parameterized="true"/>
6868
<element name="activeOperatorSelect" type="select" selector=".rule-param-edit select[name*='[operator]']"/>
6969
<element name="activeValueInput" type="input" selector=".rule-param-edit [name*='[value]']"/>

app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest.xml

Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -603,101 +603,4 @@
603603
<argument name="value" value="$simpleProduct1.name$"/>
604604
</actionGroup>
605605
</test>
606-
607-
<test name="QuickSearchConfigurableChildren">
608-
<annotations>
609-
<stories value="Search Product on Storefront"/>
610-
<title value="User should be able to use Quick Search to a configurable product's child products"/>
611-
<description value="Use Quick Search to find a configurable product with enabled/disable children"/>
612-
<severity value="MAJOR"/>
613-
<testCaseId value="MC-14798"/>
614-
<group value="CatalogSearch"/>
615-
<group value="mtf_migrated"/>
616-
<skip>
617-
<issueId value="MC-15101"/>
618-
</skip>
619-
</annotations>
620-
<before>
621-
<!-- Create the category -->
622-
<createData entity="ApiCategory" stepKey="createCategory"/>
623-
624-
<!-- Create blank AttributeSet-->
625-
<createData entity="CatalogAttributeSet" stepKey="attributeSet"/>
626-
627-
<!-- Create an attribute with two options to be used in the first child product -->
628-
<createData entity="hiddenDropdownAttributeWithOptions" stepKey="createConfigProductAttribute"/>
629-
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1">
630-
<requiredEntity createDataKey="createConfigProductAttribute"/>
631-
</createData>
632-
633-
<!-- Assign attribute to set -->
634-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
635-
<actionGroup ref="goToAttributeGridPage" stepKey="goToPage"/>
636-
<actionGroup ref="GoToAttributeSetByNameActionGroup" stepKey="goToSet">
637-
<argument name="name" value="$attributeSet.attribute_set_name$"/>
638-
</actionGroup>
639-
<actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignToAttributeSetAndGroup">
640-
<argument name="group" value="Product Details"/>
641-
<argument name="attribute" value="$createConfigProductAttribute.attribute_code$"/>
642-
</actionGroup>
643-
<actionGroup ref="SaveAttributeSetActionGroup" stepKey="savePage"/>
644-
645-
<!-- Get the first option of the attribute we created -->
646-
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
647-
<requiredEntity createDataKey="createConfigProductAttribute"/>
648-
</getData>
649-
650-
<!-- Create a simple product,give it the attributeSet and attribute with the first option -->
651-
<createData entity="ApiSimpleOneHidden" stepKey="createConfigChildProduct1">
652-
<field key="attribute_set_id">$attributeSet.attribute_set_id$</field>
653-
<requiredEntity createDataKey="createConfigProductAttribute"/>
654-
<requiredEntity createDataKey="getConfigAttributeOption1"/>
655-
</createData>
656-
<updateData entity="ApiSimpleProductUpdateDescription" stepKey="updateSimpleProduct1" createDataKey="createConfigChildProduct1"/>
657-
658-
<!-- Create the configurable product, give it the attributeSet and add it to the category -->
659-
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
660-
<field key="attribute_set_id">$attributeSet.attribute_set_id$</field>
661-
<requiredEntity createDataKey="createCategory"/>
662-
</createData>
663-
<!-- Create the configurable product -->
664-
<createData entity="ConfigurableProductOneOption" stepKey="createConfigProductOption">
665-
<requiredEntity createDataKey="createConfigProduct"/>
666-
<requiredEntity createDataKey="createConfigProductAttribute"/>
667-
<requiredEntity createDataKey="getConfigAttributeOption1"/>
668-
</createData>
669-
<!-- Add the first simple product to the configurable product -->
670-
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1">
671-
<requiredEntity createDataKey="createConfigProduct"/>
672-
<requiredEntity createDataKey="createConfigChildProduct1"/>
673-
</createData>
674-
675-
<!-- Perform reindex and flush cache -->
676-
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
677-
<magentoCLI command="cache:flush" stepKey="flushCache"/>
678-
</before>
679-
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToFrontPage"/>
680-
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefront">
681-
<argument name="phrase" value="$createConfigProduct.name$"/>
682-
</actionGroup>
683-
<actionGroup ref="StorefrontQuickSearchCheckProductNameInGridActionGroup" stepKey="seeProductInGrid">
684-
<argument name="productName" value="$createConfigProduct.name$"/>
685-
<argument name="index" value="1"/>
686-
</actionGroup>
687-
688-
<!-- Disable Child Product -->
689-
<actionGroup ref="GoToProductPageViaIDActionGroup" stepKey="goToChildProduct">
690-
<argument name="productId" value="$createConfigChildProduct1.id$"/>
691-
</actionGroup>
692-
<actionGroup ref="ToggleProductEnabledActionGroup" stepKey="disableProduct"/>
693-
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
694-
695-
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToFrontPageAgain"/>
696-
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchStorefrontAgain">
697-
<argument name="phrase" value="$createConfigProduct.name$"/>
698-
</actionGroup>
699-
<actionGroup ref="StorefrontQuickSearchCheckProductNameNotInGridActionGroup" stepKey="dontSeeProductAnymore">
700-
<argument name="productName" value="$createConfigProduct.name$"/>
701-
</actionGroup>
702-
</test>
703606
</tests>

0 commit comments

Comments
 (0)