Skip to content

Commit f06ccb1

Browse files
committed
MC-4764: Convert MoveProductsInComparedOnOrderPageTest to MFTF
1 parent 4ab0d28 commit f06ccb1

File tree

4 files changed

+23
-31
lines changed

4 files changed

+23
-31
lines changed

app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerActivitiesComparisonListSection.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,5 @@
1111
<section name="AdminCustomerActivitiesComparisonListSection">
1212
<element name="addProductToOrder" type="text" selector="//div[@id='order-sidebar_compared']//tr[td[.='{{productName}}']]//input[contains(@name,'add')]" parameterized="true" timeout="30"/>
1313
<element name="addToOrderConfigure" type="button" selector="//div[@id='order-sidebar_compared']//tr[td[contains(.,'{{productName}}')]]//a[contains(@class, 'icon-configure')]" parameterized="true" timeout="30"/>
14-
<element name="addAttribute" type="select" selector="[id*='attribute']" timeout="30"/>
15-
<element name="okButton" type="button" selector="//button[contains(concat(' ',normalize-space(@class),' '),' action-primary ')]" timeout="30"/>
1614
</section>
1715
</sections>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminCustomerActivitiesConfigureSection">
12+
<element name="addAttribute" type="select" selector="[id*='attribute']" timeout="30"/>
13+
<element name="okButton" type="button" selector="//button[contains(concat(' ',normalize-space(@class),' '),' action-primary ')]" timeout="30"/>
14+
</section>
15+
</sections>

app/code/Magento/Sales/Test/Mftf/ActionGroup/AddConfigureToProductActionGroup.xml

Lines changed: 0 additions & 21 deletions
This file was deleted.

app/code/Magento/Sales/Test/Mftf/Test/MoveCongigurableProductsInComparedOnOrderPageTest.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,16 @@
140140
<click selector="{{AdminCustomerMainActionsSection.createOrderBtn}}" stepKey="clickCreateOrder"/>
141141

142142
<!-- Add configure to first product -->
143-
<actionGroup ref="AddConfigureToProductActionGroup" stepKey="addConfigureToFirstProduct">
144-
<argument name="productName" value="$$createFirstConfigProduct.name$$"/>
145-
<argument name="option" value="$$getFirstConfigAttributeOption.value$$"/>
146-
</actionGroup>
143+
<click selector="{{AdminCustomerActivitiesComparisonListSection.addToOrderConfigure($$createFirstConfigProduct.name$$)}}" stepKey="configureFirstProduct"/>
144+
<selectOption selector="{{AdminCustomerActivitiesConfigureSection.addAttribute}}" userInput="$$getFirstConfigAttributeOption.value$$" stepKey="selectOptionForFirstProduct"/>
145+
<click selector="{{AdminCustomerActivitiesConfigureSection.okButton}}" stepKey="clickOkBtnForFirstProduct"/>
146+
<waitForPageLoad stepKey="waitForConfigureForFirstProductLoad"/>
147147

148148
<!-- Add configure to second product -->
149-
<actionGroup ref="AddConfigureToProductActionGroup" stepKey="addConfigureToSecondProduct">
150-
<argument name="productName" value="$$createSecondConfigProduct.name$$"/>
151-
<argument name="option" value="$$getSecondConfigAttributeOption.value$$"/>
152-
</actionGroup>
149+
<click selector="{{AdminCustomerActivitiesComparisonListSection.addToOrderConfigure($$createSecondConfigProduct.name$$)}}" stepKey="configureSecondProduct"/>
150+
<selectOption selector="{{AdminCustomerActivitiesConfigureSection.addAttribute}}" userInput="$$getSecondConfigAttributeOption.value$$" stepKey="selectOptionForSecond"/>
151+
<click selector="{{AdminCustomerActivitiesConfigureSection.okButton}}" stepKey="clickOkBtnForSecondProduct"/>
152+
<waitForPageLoad stepKey="waitForConfigureForSecondProductLoad"/>
153153

154154
<!-- Click 'Update Changes' -->
155155
<click selector="{{AdminCustomerCreateNewOrderSection.updateChangesBtn}}" stepKey="clickUpdateChangesBtn"/>

0 commit comments

Comments
 (0)