Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MFTF] Adding AdminFillAccountInformationOnCreateOrderPageActionGroup #30986

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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="AdminFillAccountInformationOnCreateOrderPageActionGroup">
<arguments>
<argument name="group" defaultValue="{{GeneralCustomerGroup.code}}" type="string"/>
<argument name="email" type="string"/>
</arguments>
<selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{group}}" stepKey="selectCustomerGroup"/>
<fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{email}}" stepKey="fillCustomerEmail"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@
<click selector="{{AdminOrderFormItemsSection.updateItemsAndQuantities}}" stepKey="clickUpdateItemsAndQuantitiesButton"/>

<!--Fill customer group and customer email-->
<selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{GeneralCustomerGroup.code}}" stepKey="selectCustomerGroup"/>
<fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillCustomerEmail"/>
<comment userInput="Fill Account Information" stepKey="selectCustomerGroup"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @AnnaAPak. Good job, but I would ask you to highlight that he comment was added for preserving backward compatibility. Something like the following one

Suggested change
<comment userInput="Fill Account Information" stepKey="selectCustomerGroup"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectCustomerGroup"/>

Otherwise this comment might be removed as "unnecessary" in the future and BC will be broken.

Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the comments as per the recommendation. Thank you.

<actionGroup ref="AdminFillAccountInformationOnCreateOrderPageActionGroup" stepKey="fillCustomerEmail">
<argument name="email" value="{{Simple_US_Customer.email}}"/>
</actionGroup>

<!--Fill customer address information-->
<actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerAddress">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@
</actionGroup>

<!--Fill customer group information-->
<selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{GeneralCustomerGroup.code}}" stepKey="selectGroup"/>
<fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillEmail"/>

<comment userInput="Fill Account Information" stepKey="selectGroup"/>
<actionGroup ref="AdminFillAccountInformationOnCreateOrderPageActionGroup" stepKey="fillEmail">
<argument name="email" value="{{Simple_US_Customer.email}}"/>
</actionGroup>

<!--Fill customer address information-->
<actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerAddress">
<argument name="customer" value="Simple_US_Customer"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@
<scrollToTopOfPage stepKey="scrollToTopOfOrderFormPage" after="seePaymentMethodRequired"/>

<!--Fill customer group and customer email-->
<selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{GeneralCustomerGroup.code}}" stepKey="selectCustomerGroup" after="scrollToTopOfOrderFormPage"/>
<fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillCustomerEmail" after="selectCustomerGroup"/>

<comment userInput="Fill Account Information" stepKey="selectCustomerGroup" after="scrollToTopOfOrderFormPage"/>
<actionGroup ref="AdminFillAccountInformationOnCreateOrderPageActionGroup" stepKey="fillCustomerEmail" after="selectCustomerGroup">
<argument name="email" value="{{Simple_US_Customer.email}}"/>
</actionGroup>

<!--Fill customer address information-->
<actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerAddress" after="fillCustomerEmail">
<argument name="customer" value="Simple_US_Customer"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
</actionGroup>

<!--Fill customer group and customer email-->
<selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{GeneralCustomerGroup.code}}" stepKey="selectCustomerGroup" after="addSimpleProductToOrder"/>
<fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillCustomerEmail" after="selectCustomerGroup"/>
<comment userInput="Fill Account Information" stepKey="selectCustomerGroup" after="addSimpleProductToOrder"/>
<actionGroup ref="AdminFillAccountInformationOnCreateOrderPageActionGroup" stepKey="fillCustomerEmail" after="selectCustomerGroup">
<argument name="email" value="{{Simple_US_Customer.email}}"/>
</actionGroup>

<!--Fill customer address information-->
<actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerAddress" after="fillCustomerEmail">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
</actionGroup>

<!--Fill customer group and customer email-->
<selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{GeneralCustomerGroup.code}}" stepKey="selectCustomerGroup" after="addSimpleProductToOrder"/>
<fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillCustomerEmail" after="selectCustomerGroup"/>
<comment userInput="Fill Account Information" stepKey="selectCustomerGroup" after="addSimpleProductToOrder"/>
<actionGroup ref="AdminFillAccountInformationOnCreateOrderPageActionGroup" stepKey="fillCustomerEmail" after="selectCustomerGroup">
<argument name="email" value="{{Simple_US_Customer.email}}"/>
</actionGroup>

<!--Fill wrong customer address information-->
<actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillWrongCustomerAddress" after="fillCustomerEmail">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@
</actionGroup>

<!--Fill customer group and customer email-->
<selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{GeneralCustomerGroup.code}}" stepKey="selectCustomerGroup"/>
<fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillCustomerEmail"/>
<comment userInput="Fill Account Information" stepKey="selectCustomerGroup"/>
<actionGroup ref="AdminFillAccountInformationOnCreateOrderPageActionGroup" stepKey="fillCustomerEmail">
<argument name="email" value="{{Simple_US_Customer.email}}"/>
</actionGroup>

<!--Fill customer address information-->
<actionGroup ref="FillOrderCustomerInformationActionGroup" stepKey="fillCustomerAddress">
Expand Down