Skip to content

Commit a76b023

Browse files
committed
ACQE-7030:Admin should be able to Save product with 2 or more pages of custom options
New Testcase Added
1 parent a8ed626 commit a76b023

File tree

2 files changed

+178
-0
lines changed

2 files changed

+178
-0
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
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="AdminAddCustomOptionsActionGroup">
11+
<annotations>
12+
<description>Clicks on 'Add Option'. Adds the 22 provided Options under the provided Custom Option Name to a Product on the Admin Product creation/edit page under the 'Customizable Options' section.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="firstOption" type="entity"/>
16+
<argument name="secondOption" type="entity"/>
17+
<argument name="thirdOption" type="entity"/>
18+
<argument name="fourthOption" type="entity"/>
19+
<argument name="fifthOption" type="entity"/>
20+
<argument name="sixthOption" type="entity"/>
21+
<argument name="seventhOption" type="entity"/>
22+
<argument name="eighthOption" type="entity"/>
23+
<argument name="ninthOption" type="entity"/>
24+
<argument name="tenthOption" type="entity"/>
25+
<argument name="eleventhOption" type="entity"/>
26+
<argument name="twelfthOption" type="entity"/>
27+
<argument name="thirteenthOption" type="entity"/>
28+
<argument name="fourteenthOption" type="entity"/>
29+
<argument name="fifteenthOption" type="entity"/>
30+
<argument name="sixteenthOption" type="entity"/>
31+
<argument name="seventeenthOption" type="entity"/>
32+
<argument name="eighteenthOption" type="entity"/>
33+
<argument name="nineteenthOption" type="entity"/>
34+
<argument name="twentiethOption" type="entity"/>
35+
<argument name="twentyfirstOption" type="entity"/>
36+
<argument name="twentytwoOption" type="entity"/>
37+
</arguments>
38+
<click stepKey="clickAddOptions" selector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}"/>
39+
<waitForPageLoad stepKey="waitForAddProductPageLoad"/>
40+
<!-- Fill in the option and select the type of drop down -->
41+
<fillField stepKey="fillInOptionTitle" selector="{{AdminProductCustomizableOptionsSection.lastOptionTitle}}" userInput="{{customOptionName}}"/>
42+
<click stepKey="clickOptionTypeParent" selector="{{AdminProductCustomizableOptionsSection.lastOptionTypeParent}}"/>
43+
<waitForPageLoad stepKey="waitForDropdownOpen"/>
44+
<click stepKey="clickOptionType" selector="{{AdminProductCustomizableOptionsSection.optionType('Drop-down')}}"/>
45+
<!-- Add option based on the parameter -->
46+
<click stepKey="clickAddFirstValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
47+
<fillField stepKey="fillInFirstOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{firstOption.title}}"/>
48+
<fillField stepKey="fillInFirstOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{firstOption.price}}"/>
49+
<click stepKey="clickAddSecondValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
50+
<fillField stepKey="fillInSecondOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{secondOption.title}}"/>
51+
<fillField stepKey="fillInSecondOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{secondOption.price}}"/>
52+
<click stepKey="clickAddThirdValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
53+
<fillField stepKey="fillInThirdOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{thirdOption.title}}"/>
54+
<fillField stepKey="fillInThirdOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{thirdOption.price}}"/>
55+
<click stepKey="clickAddFourthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
56+
<fillField stepKey="fillInFourthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{fourthOption.title}}"/>
57+
<fillField stepKey="fillInFourthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{fourthOption.price}}"/>
58+
<click stepKey="clickAddFifthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
59+
<fillField stepKey="fillInFifthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{fifthOption.title}}"/>
60+
<fillField stepKey="fillInFifthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{fifthOption.price}}"/>
61+
<click stepKey="clickAddSixthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
62+
<fillField stepKey="fillInSixthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{sixthOption.title}}"/>
63+
<fillField stepKey="fillInSixthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{sixthOption.price}}"/>
64+
<click stepKey="clickAddSeventhValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
65+
<fillField stepKey="fillInSeventhOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{seventhOption.title}}"/>
66+
<fillField stepKey="fillInSeventhOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{seventhOption.price}}"/>
67+
<click stepKey="clickAddEighthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
68+
<fillField stepKey="fillInEighthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{eighthOption.title}}"/>
69+
<fillField stepKey="fillInEighthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{eighthOption.price}}"/>
70+
<click stepKey="clickAddNinthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
71+
<fillField stepKey="fillInNinthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{ninthOption.title}}"/>
72+
<fillField stepKey="fillInNinthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{ninthOption.price}}"/>
73+
<click stepKey="clickAddTenthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
74+
<fillField stepKey="fillInTenthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{tenthOption.title}}"/>
75+
<fillField stepKey="fillInTenthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{tenthOption.price}}"/>
76+
<click stepKey="clickAddEleventhValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
77+
<fillField stepKey="fillInEleventhOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{eleventhOption.title}}"/>
78+
<fillField stepKey="fillInEleventhOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{eleventhOption.price}}"/>
79+
<click stepKey="clickAddTwelfthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
80+
<fillField stepKey="fillInTwelfthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{twelfthOption.title}}"/>
81+
<fillField stepKey="fillInTwelfthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{twelfthOption.price}}"/>
82+
<click stepKey="clickAddThirteenthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
83+
<fillField stepKey="fillInThirteenthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{thirteenthOption.title}}"/>
84+
<fillField stepKey="fillInThirteenthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{thirteenthOption.price}}"/>
85+
<click stepKey="clickAddFourteenthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
86+
<fillField stepKey="fillInFourteenthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{fourteenthOption.title}}"/>
87+
<fillField stepKey="fillInFourteenthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{fourteenthOption.price}}"/>
88+
<click stepKey="clickAddFifteenthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
89+
<fillField stepKey="fillInFifteenthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{fifteenthOption.title}}"/>
90+
<fillField stepKey="fillInFifteenthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{fifteenthOption.price}}"/>
91+
<click stepKey="clickAddSixteenthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
92+
<fillField stepKey="fillInSixteenthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{sixteenthOption.title}}"/>
93+
<fillField stepKey="fillInSixteenthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{sixteenthOption.price}}"/>
94+
<click stepKey="clickAddSeventeenthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
95+
<fillField stepKey="fillInSeventeenthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{seventeenthOption.title}}"/>
96+
<fillField stepKey="fillInSeventeenthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{seventeenthOption.price}}"/>
97+
<click stepKey="clickAddEighteenthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
98+
<fillField stepKey="fillInEighteenthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{eighteenthOption.title}}"/>
99+
<fillField stepKey="fillInEighteenthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{eighteenthOption.price}}"/>
100+
<click stepKey="clickAddNineteenthValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
101+
<fillField stepKey="fillInNineteenthOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{nineteenthOption.title}}"/>
102+
<fillField stepKey="fillInNineteenthOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{nineteenthOption.price}}"/>
103+
<click stepKey="clickAddTwentiethValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
104+
<fillField stepKey="fillInTwentiethOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{twentiethOption.title}}"/>
105+
<fillField stepKey="fillInTwentiethOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{twentiethOption.price}}"/>
106+
<click stepKey="clickAddTwentyfirstValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
107+
<fillField stepKey="fillInTwentyfirstOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{twentyfirstOption.title}}"/>
108+
<fillField stepKey="fillInTwentyfirstOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{twentyfirstOption.price}}"/>
109+
<click stepKey="clickAddTwentytwoValue" selector="{{AdminProductCustomizableOptionsSection.addValue}}"/>
110+
<fillField stepKey="fillInTwentytwoOptionValueTitle" selector="{{AdminProductCustomizableOptionsSection.valueTitle}}" userInput="{{twentytwoOption.title}}"/>
111+
<fillField stepKey="fillInTwentytwoOptionValuePrice" selector="{{AdminProductCustomizableOptionsSection.valuePrice}}" userInput="{{twentytwoOption.price}}"/>
112+
</actionGroup>
113+
</actionGroups>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminSaveProductWith2ORMorePagesOfCustomOptionsTest">
11+
<annotations>
12+
<features value="Create product"/>
13+
<stories value="Save product with 2 or more pages of custom options"/>
14+
<title value="Admin should be able to Save product with 2 or more pages of custom options"/>
15+
<description value="Admin save product with 2 or more pages of custom options"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-4158"/>
18+
</annotations>
19+
<before>
20+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
21+
</before>
22+
<after>
23+
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
24+
</after>
25+
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
26+
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
27+
<argument name="product" value="SimpleProduct"/>
28+
</actionGroup>
29+
<actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillProductForm">
30+
<argument name="product" value="SimpleProduct"/>
31+
</actionGroup>
32+
<click selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="openCustomizableOptions"/>
33+
<waitForPageLoad stepKey="waitForCustomOptionsOpen"/>
34+
<actionGroup ref="AdminAddCustomOptionsActionGroup" stepKey="createCustomOptions">
35+
<argument name="customOptionName" value="{{ProductOptionDropDown.title}}"/>
36+
<argument name="firstOption" value="ProductOptionValueDropdown1"/>
37+
<argument name="secondOption" value="ProductOptionValueDropdown2"/>
38+
<argument name="thirdOption" value="ProductOptionValueDropdown3"/>
39+
<argument name="fourthOption" value="ProductOptionValueDropdown3"/>
40+
<argument name="fifthOption" value="ProductOptionValueDropdown3"/>
41+
<argument name="sixthOption" value="ProductOptionValueDropdown3"/>
42+
<argument name="seventhOption" value="ProductOptionValueDropdown3"/>
43+
<argument name="eighthOption" value="ProductOptionValueDropdown3"/>
44+
<argument name="ninthOption" value="ProductOptionValueDropdown3"/>
45+
<argument name="tenthOption" value="ProductOptionValueDropdown3"/>
46+
<argument name="eleventhOption" value="ProductOptionValueDropdown3"/>
47+
<argument name="twelfthOption" value="ProductOptionValueDropdown3"/>
48+
<argument name="thirteenthOption" value="ProductOptionValueDropdown3"/>
49+
<argument name="fourteenthOption" value="ProductOptionValueDropdown3"/>
50+
<argument name="fifteenthOption" value="ProductOptionValueDropdown3"/>
51+
<argument name="sixteenthOption" value="ProductOptionValueDropdown3"/>
52+
<argument name="seventeenthOption" value="ProductOptionValueDropdown3"/>
53+
<argument name="eighteenthOption" value="ProductOptionValueDropdown3"/>
54+
<argument name="nineteenthOption" value="ProductOptionValueDropdown3"/>
55+
<argument name="twentiethOption" value="ProductOptionValueDropdown3"/>
56+
<argument name="twentyfirstOption" value="ProductOptionValueDropdown3"/>
57+
<argument name="twentytwoOption" value="ProductOptionValueDropdown3"/>
58+
</actionGroup>
59+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
60+
<waitForElementVisible selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeProductSavedMessage"/>
61+
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
62+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButtonAgain"/>
63+
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShownAgain"/>
64+
</test>
65+
</tests>

0 commit comments

Comments
 (0)