Skip to content

Commit 8890a49

Browse files
committed
MC-19048: [Test Failed]: Magento\FunctionalTestingFramework.functional.CartPriceRuleForConfigurableProductTest
1 parent 67e667a commit 8890a49

File tree

4 files changed

+37
-36
lines changed

4 files changed

+37
-36
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<argument name="useForPromoRule" type="string" defaultValue="Yes"/>
2222
</arguments>
2323
<click selector="{{AdminEditAttributeStorefrontPropertiesSection.storeFrontPropertiesTab}}" stepKey="clickStoreFrontPropertiesTab"/>
24-
<scrollTo selector="{{AdminEditAttributeStorefrontPropertiesSection.useForPromoRuleConditions}}" stepKey="scrollToUseForPromoRuleConditions"/>
24+
<waitForElementVisible selector="{{AdminEditAttributeStorefrontPropertiesSection.useForPromoRuleConditions}}" stepKey="waitForUseForPromoRuleConditionsVisible"/>
2525
<selectOption selector="{{AdminEditAttributeStorefrontPropertiesSection.useForPromoRuleConditions}}" userInput="{{useForPromoRule}}" stepKey="changeOption"/>
2626
<click selector="{{AttributePropertiesSection.save}}" stepKey="saveAttribute"/>
2727
<waitForElementVisible selector="{{AdminMessagesSection.successMessage}}" stepKey="waitForSuccessMessage"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/StorefrontAddConfigurableProductToCartActionGroup.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontSelectConfigurableAttributeOptionActionGroup">
12+
<arguments>
13+
<argument name="attributeLabel" type="string"/>
14+
<argument name="optionValue" type="string"/>
15+
<argument name="qty" type="string" defaultValue="1"/>
16+
</arguments>
17+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.productOptionSelect(attributeLabel)}}" stepKey="waitForOptionSelectVisible"/>
18+
<selectOption selector="{{StorefrontProductInfoMainSection.productOptionSelect(attributeLabel)}}" userInput="{{optionValue}}" stepKey="selectProductOption"/>
19+
<fillField selector="{{StorefrontProductPageSection.qtyInput}}" userInput="{{qty}}" stepKey="fillProductQuantity"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/SalesRule/Test/Mftf/Test/CartPriceRuleForConfigurableProductTest.xml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,25 @@
117117
<actionGroup ref="logout" stepKey="logout"/>
118118
</after>
119119

120+
<!--Go to product page-->
121+
<amOnPage url="{{StorefrontProductPage.url($$createConfigProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/>
122+
120123
<!--Add the configurable product with first option to the cart -->
121-
<actionGroup ref="StorefrontAddConfigurableProductToCartActionGroup" stepKey="addToCartFirstOptionOfConfigProduct">
122-
<argument name="productUrlKey" value="$$createConfigProduct.custom_attributes[url_key]$$"/>
123-
<argument name="productAttribute" value="$$createConfigProductAttribute.default_value$$"/>
124-
<argument name="productOption" value="$$getConfigAttributeOption1.value$$"/>
124+
<actionGroup ref="StorefrontSelectConfigurableAttributeOptionActionGroup" stepKey="selectFirstOptionOfConfigProduct">
125+
<argument name="attributeLabel" value="$$createConfigProductAttribute.default_label$$"/>
126+
<argument name="optionValue" value="$$getConfigAttributeOption1.value$$"/>
127+
</actionGroup>
128+
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFirstOptionOfConfigProduct">
129+
<argument name="productName" value="$$createConfigProduct.name$$"/>
125130
</actionGroup>
126131

127132
<!--Add the configurable product with second option to the cart -->
128-
<actionGroup ref="StorefrontAddConfigurableProductToCartActionGroup" stepKey="addToCartSecondOptionOfConfigProduct">
129-
<argument name="productUrlKey" value="$$createConfigProduct.custom_attributes[url_key]$$"/>
130-
<argument name="productAttribute" value="$$createConfigProductAttribute.default_value$$"/>
131-
<argument name="productOption" value="$$getConfigAttributeOption2.value$$"/>
133+
<actionGroup ref="StorefrontSelectConfigurableAttributeOptionActionGroup" stepKey="selectSecondOptionOfConfigProduct">
134+
<argument name="attributeLabel" value="$$createConfigProductAttribute.default_label$$"/>
135+
<argument name="optionValue" value="$$getConfigAttributeOption2.value$$"/>
136+
</actionGroup>
137+
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartSecondOptionOfConfigProduct">
138+
<argument name="productName" value="$$createConfigProduct.name$$"/>
132139
</actionGroup>
133140

134141
<!--View and edit cart-->

0 commit comments

Comments
 (0)