Skip to content

Commit 1fa8f65

Browse files
committed
ACP2E-1631: Not able to send an invitation
1 parent 96ce2ed commit 1fa8f65

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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="AdminCreateInvitationActionGroup">
11+
<annotations>
12+
<description>Adds the invitation.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="email" type="string" defaultValue="{{InvitationData.email}}"/>
16+
<argument name="message" type="string" defaultValue="{{InvitationData.message}}"/>
17+
<argument name="store" type="string" defaultValue="{{InvitationData.store_id}}"/>
18+
<argument name="group" type="string" defaultValue="{{InvitationData.group_id}}"/>
19+
</arguments>
20+
21+
<click selector="{{AdminInvitationSection.addInvitation}}" stepKey="clickAddInvitationButton"/>
22+
<waitForPageLoad stepKey="waitForPageLoad"/>
23+
<fillField selector="{{AdminInvitationSection.email}}" userInput="{{email}}" stepKey="fillInEmailField"/>
24+
<fillField selector="{{AdminInvitationSection.message}}" userInput="{{message}}" stepKey="fillInMessageFields"/>
25+
<selectOption selector="{{AdminInvitationSection.sendFrom}}" userInput="{{store}}" stepKey="selectInvitationSendFrom"/>
26+
<selectOption selector="{{AdminInvitationSection.inviteeGroup}}" userInput="{{group}}" stepKey="selectInviteeGroup"/>
27+
<click selector="{{AdminInvitationSection.saveInvitation}}" stepKey="clickSaveInvitationButton"/>
28+
<waitForText selector="{{AdminInvitationSection.successMessage}}" userInput="We sent 1 invitation(s)." stepKey="seeSuccessMessage"/>
29+
</actionGroup>
30+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="InvitationData" type="data">
12+
<data key="email" unique="prefix">John.Doe@example.com</data>
13+
<data key="message">Invitation Message </data>
14+
<data key="store_id">Default Store View</data>
15+
<data key="group_id">General</data>
16+
</entity>
17+
</entities>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="AdminInvitationSection">
11+
<element name="addInvitation" type="button" selector=".page-actions-buttons #add"/>
12+
<element name="email" type="textarea" selector="//div[@class='admin__field-control']//textarea[@name='email']"/>
13+
<element name="message" type="textarea" selector="//div[@class='admin__field-control']//textarea[@name='message']"/>
14+
<element name="sendFrom" type="select" selector="div[data-index='store_id'] select[name='store_id']"/>
15+
<element name="inviteeGroup" type="select" selector="div[data-index='group_id'] select[name='group_id']"/>
16+
<element name="customerGroup" type="button" selector="//div[@class='admin__action-multiselect action-select']"/>
17+
<element name="defaultGeneral" type="text" selector="//*[contains(text(),'General')]" timeout="15"/>
18+
<element name="groupValue" type="button" selector="//span[text()='Default (General)']"/>
19+
<element name="saveInvitation" type="button" selector="//div[@class='page-actions-inner']//div[@class='page-actions-buttons']//button[@id='save']" timeout="30"/>
20+
<element name="successMessage" type="text" selector="//div[@class='message message-success success']/div[@data-ui-id='messages-message-success']"/>
21+
<element name="filterByEmailInput" type="input" selector="input[name='email']"/>
22+
<element name="searchButton" type="button" selector="//div[@class='admin__filter-actions']/button[@title='Search']" timeout="30"/>
23+
<element name="rowByIndex" type="text" selector="tr[data-role='row']:nth-of-type({{var1}})" parameterized="true" timeout="30"/>
24+
<element name="sendInvitation" type="button" selector="//div[@class='page-actions-buttons']/button[@id='invitation-view-send-invitation-button']" />
25+
<element name="okButton" type="button" selector="aside.confirm .modal-footer button.action-primary" timeout="30"/>
26+
</section>
27+
</sections>

0 commit comments

Comments
 (0)