Skip to content

Commit e9ec23b

Browse files
committed
Merge remote-tracking branch 'origin/MC-19048' into 2.2.10-develop-pr111
2 parents 0886ccd + 4f01ccd commit e9ec23b

File tree

6 files changed

+101
-82
lines changed

6 files changed

+101
-82
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
<arguments>
2121
<argument name="useForPromoRule" type="string" defaultValue="Yes"/>
2222
</arguments>
23-
<click selector="{{StorefrontPropertiesSection.storefrontPropertiesTab}}" stepKey="clickStoreFrontPropertiesTab"/>
24-
<selectOption selector="{{StorefrontPropertiesSection.useForPromoRuleConditions}}" userInput="{{useForPromoRule}}" stepKey="changeOption"/>
23+
<click selector="{{AdminEditAttributeStorefrontPropertiesSection.storeFrontPropertiesTab}}" stepKey="clickStoreFrontPropertiesTab"/>
24+
<waitForElementVisible selector="{{AdminEditAttributeStorefrontPropertiesSection.useForPromoRuleConditions}}" stepKey="waitForUseForPromoRuleConditionsVisible"/>
25+
<selectOption selector="{{AdminEditAttributeStorefrontPropertiesSection.useForPromoRuleConditions}}" userInput="{{useForPromoRule}}" stepKey="changeOption"/>
2526
<click selector="{{AttributePropertiesSection.save}}" stepKey="saveAttribute"/>
27+
<waitForElementVisible selector="{{AdminMessagesSection.successMessage}}" stepKey="waitForSuccessMessage"/>
2628
<see selector="{{AdminMessagesSection.successMessage}}" userInput="You saved the product attribute." stepKey="successMessage"/>
2729
</actionGroup>
2830
<actionGroup name="navigateToProductAttributeByCode">

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434
<seeElement selector="{{StorefrontCategoryProductSection.productTitleByName(product.name)}}" stepKey="assertProductName"/>
3535
<see userInput="${{product.price}}.00" selector="{{StorefrontCategoryProductSection.ProductPriceByName(product.name)}}" stepKey="AssertProductPrice"/>
3636
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" />
37-
<executeInSelenium function="function($webdriver) use ($I) {
37+
<!-- @TODO: This causes a parsing error after updating the magento-testing-framework to version 2.4.4 -->
38+
<!--<executeInSelenium function="function($webdriver) use ($I) {
3839
$productName = '//main//li[.//a[contains(text(), \'' . {{product.name}} . '\' )]]//div[@data-container=\'product-grid\']';
3940
$I->assertEquals('2', $webdriver->findElement(\Facebook\WebDriver\WebDriverBy::xpath($productName))->getCSSValue('z-index'));
40-
}" stepKey="assertProductContainerIsOpened"/>
41+
}" stepKey="assertProductContainerIsOpened"/>-->
4142
<seeElement selector="{{StorefrontCategoryProductSection.productAddToCartByName(product.name)}}" stepKey="assertAddToCart" />
4243
</actionGroup>
4344

app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontMiniCartActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<waitForElementVisible selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="waitForViewAndEditCartVisible"/>
1313
<click selector="{{StorefrontMinicartSection.viewAndEditCart}}" stepKey="viewAndEditCart"/>
1414
<seeInCurrentUrl url="checkout/cart" stepKey="seeInCurrentUrl"/>
15+
<waitForPageLoad time="30" stepKey="waitForCartPageIsLoaded"/>
1516
</actionGroup>
1617
<actionGroup name="assertOneProductNameInMiniCart">
1718
<arguments>
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/ActionGroup/AdminCartPriceRuleActionGroup.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
<argument name="actionsAggregator" type="string" defaultValue="ANY"/>
5252
<argument name="actionsValue" type="string" defaultValue="FALSE"/>
5353
<argument name="childAttribute" type="string" defaultValue="Category"/>
54+
<argument name="actionOperator" type="string" defaultValue="is"/>
5455
<argument name="actionValue" type="string"/>
5556
</arguments>
5657
<click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickOnActionTab"/>
@@ -61,11 +62,16 @@
6162
<click selector="{{AdminCartPriceRulesFormSection.conditions}}" stepKey="selectActionConditions"/>
6263
<waitForPageLoad stepKey="waitForDropDownOpened"/>
6364
<selectOption selector="{{AdminCartPriceRulesFormSection.childAttribute}}" userInput="{{childAttribute}}" stepKey="selectAttribute"/>
64-
<waitForPageLoad stepKey="waitForOperatorOpened"/>
65+
<waitForPageLoad stepKey="waitForAttributeSelected"/>
66+
<click selector="{{AdminCartPriceRulesFormSection.condition('is')}}" stepKey="clickOnOperator"/>
67+
<selectOption selector="{{AdminCartPriceRulesFormSection.operator}}" userInput="{{actionOperator}}" stepKey="selectOperator"/>
68+
<!-- In case we are choosing already selected value - select is not closed automatically -->
69+
<conditionalClick selector="{{AdminCartPriceRulesFormSection.condition('...')}}" dependentSelector="{{AdminCartPriceRulesFormSection.operator}}" visible="true" stepKey="closeSelect"/>
6570
<click selector="{{AdminCartPriceRulesFormSection.condition('...')}}" stepKey="clickToChooseOption3"/>
6671
<fillField selector="{{AdminCartPriceRulesFormSection.actionValue}}" userInput="{{actionValue}}" stepKey="fillActionValue"/>
6772
<click selector="{{AdminCartPriceRulesFormSection.applyAction}}" stepKey="applyAction"/>
6873
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveButton"/>
74+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitSuccessMessage"/>
6975
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
7076
</actionGroup>
7177
</actionGroups>

0 commit comments

Comments
 (0)