|
40 | 40 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
41 | 41 | </after>
|
42 | 42 | <!--Go to bundle product creation page-->
|
43 |
| - <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/> |
44 |
| - <waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/> |
| 43 | + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage"> |
| 44 | + <argument name="attributeSetId" value="{{BundleProduct.set}}"/> |
| 45 | + <argument name="productType" value="{{BundleProduct.type}}"/> |
| 46 | + </actionGroup> |
| 47 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreatePageToLoad"/> |
| 48 | + |
45 | 49 |
|
46 | 50 | <!-- Add two bundle items -->
|
47 |
| - <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/> |
48 |
| - <click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/> |
49 |
| - <waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/> |
50 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/> |
51 |
| - <selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/> |
52 |
| - <actionGroup ref="AdminClickAddProductToOptionActionGroup" stepKey="clickAddProductsToOption"/> |
53 |
| - <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions"> |
54 |
| - <argument name="product" value="$$simpleProduct0$$"/> |
| 51 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="conditionallyOpenSectionBundleItems"/> |
| 52 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddOption3"/> |
| 53 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleOptions"/> |
| 54 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillOptionTitle"/> |
| 55 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectInputType"/> |
| 56 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddProductsToOption"/> |
| 57 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterBundleProductOptions"/> |
| 58 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFirstGridRow"/> |
| 59 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterBundleProductOptions2"/> |
| 60 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFirstGridRow2"/> |
| 61 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddSelectedBundleProducts"/> |
| 62 | + <actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addBundleOptionWithTwoProducts1"> |
| 63 | + <argument name="x" value="0"/> |
| 64 | + <argument name="n" value="1"/> |
| 65 | + <argument name="prodOneSku" value="$$simpleProduct0.sku$$"/> |
| 66 | + <argument name="prodTwoSku" value="$$simpleProduct1.sku$$"/> |
| 67 | + <argument name="optionTitle" value="{{BundleProduct.optionTitle1}}"/> |
| 68 | + <argument name="inputType" value="{{BundleProduct.optionInputType1}}"/> |
55 | 69 | </actionGroup>
|
56 |
| - <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/> |
57 |
| - <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions2"> |
58 |
| - <argument name="product" value="$$simpleProduct1$$"/> |
59 |
| - </actionGroup> |
60 |
| - <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/> |
61 |
| - <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/> |
62 |
| - <!-- Check that Bundle Options initialized with default quantity --> |
63 |
| - <grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" stepKey="grabbedFirstBundleOptionQuantity"/> |
64 |
| - <assertEquals stepKey="assertFirstBundleOptionDefaultQuantity"> |
65 |
| - <expectedResult type="string">1</expectedResult> |
66 |
| - <actualResult type="string">$grabbedFirstBundleOptionQuantity</actualResult> |
67 |
| - </assertEquals> |
68 |
| - <grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" stepKey="grabbedSecondBundleOptionQuantity"/> |
69 |
| - <assertEquals stepKey="assertSecondBundleOptionDefaultQuantity"> |
70 |
| - <expectedResult type="string">1</expectedResult> |
71 |
| - <actualResult type="string">$grabbedSecondBundleOptionQuantity</actualResult> |
72 |
| - </assertEquals> |
73 | 70 |
|
74 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/> |
75 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/> |
| 71 | + <!--<!– Check that Bundle Options initialized with default quantity –>--> |
| 72 | + <!--<grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" stepKey="grabbedFirstBundleOptionQuantity"/>--> |
| 73 | + <!--<assertEquals stepKey="assertFirstBundleOptionDefaultQuantity">--> |
| 74 | + <!--<expectedResult type="string">1</expectedResult>--> |
| 75 | + <!--<actualResult type="string">$grabbedFirstBundleOptionQuantity</actualResult>--> |
| 76 | + <!--</assertEquals>--> |
| 77 | + <!--<grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" stepKey="grabbedSecondBundleOptionQuantity"/>--> |
| 78 | + <!--<assertEquals stepKey="assertSecondBundleOptionDefaultQuantity">--> |
| 79 | + <!--<expectedResult type="string">1</expectedResult>--> |
| 80 | + <!--<actualResult type="string">$grabbedSecondBundleOptionQuantity</actualResult>--> |
| 81 | + <!--</assertEquals>--> |
| 82 | + |
| 83 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty1"/> |
| 84 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty2"/> |
76 | 85 |
|
77 | 86 | <!--Fill out ancillary data on bundle product-->
|
78 | 87 | <actionGroup ref="AncillaryPrepBundleProductActionGroup" stepKey="createBundledProductForTwoSimpleProducts">
|
|
81 | 90 |
|
82 | 91 | <!--Save the product-->
|
83 | 92 | <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
|
84 |
| - <see userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/> |
| 93 | + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown"> |
| 94 | + <argument name="message" value="You saved the product."/> |
| 95 | + </actionGroup> |
85 | 96 |
|
86 | 97 | <!--Checking on admin side-->
|
87 | 98 | <scrollToTopOfPage stepKey="scroll"/>
|
88 | 99 | <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems2"/>
|
89 | 100 | <seeElement stepKey="LookingForBundleItemPresence" selector="{{AdminProductFormBundleSection.listedBundleItem}}"/>
|
90 | 101 |
|
91 | 102 | <!--Checking on customer side-->
|
92 |
| - <amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="GoToProductPage"/> |
93 |
| - <waitForPageLoad stepKey="waitForBundleProductPageToLoad"/> |
| 103 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPage"> |
| 104 | + <argument name="productUrl" value="{{BundleProduct.urlKey}}"/> |
| 105 | + </actionGroup> |
| 106 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductPageToLoad"/> |
94 | 107 | <seeElement selector="{{StorefrontBundledSection.customizeProduct}}" stepKey="LookingForAbilityToAddOptions"/>
|
95 | 108 | <click selector="{{StorefrontBundledSection.customizeProduct}}" stepKey="clickButtonToCustomize"/>
|
96 | 109 | <waitForPageLoad stepKey="waitCustomizationDropDown"/>
|
|
99 | 112 | <!--Add another bundle option with 2 items-->
|
100 | 113 | <!--Go to bundle product creation page-->
|
101 | 114 | <actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogProductPage"/>
|
102 |
| - <conditionalClick selector="{{AdminProductFiltersSection.filtersClear}}" dependentSelector="{{AdminProductFiltersSection.filtersClear}}" visible="true" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/> |
103 |
| - <waitForPageLoad stepKey="WaitForClear"/> |
| 115 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/> |
| 116 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="WaitForClear"/> |
104 | 117 | <actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName">
|
105 | 118 | <argument name="product" value="BundleProduct"/>
|
106 | 119 | </actionGroup>
|
107 |
| - <click selector="{{AdminProductFormBundleSection.addOptions}}" stepKey="clickOnBundleProductToEdit"/> |
108 |
| - <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItemsToEdit"/> |
109 |
| - <click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption"/> |
110 |
| - <waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('1')}}" stepKey="waitForBundleOptionsToAppear"/> |
111 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('1')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillNewestOptionTitle"/> |
112 |
| - <selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('1')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectNewInputType"/> |
113 |
| - <actionGroup ref="AdminClickAddProductToOptionActionGroup" stepKey="clickAddProductsToNewOption"/> |
114 |
| - <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterNewBundleProductOptions"> |
115 |
| - <argument name="product" value="$$simpleProduct2$$"/> |
| 120 | + <actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="clickOnBundleProductToEdit"> |
| 121 | + <argument name="product" value="BundleProduct"/> |
116 | 122 | </actionGroup>
|
117 |
| - <checkOption selector="//div[@class='admin__data-grid-outer-wrap']//tr[@data-repeat-index='0']//input[@type='checkbox']" stepKey="selectNewFirstGridRow"/> |
118 |
| - <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterNewBundleProductOptions2"> |
119 |
| - <argument name="product" value="$$simpleProduct3$$"/> |
| 123 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="conditionallyOpenSectionBundleItemsToEdit"/> |
| 124 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddOption"/> |
| 125 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleOptionsToAppear"/> |
| 126 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillNewestOptionTitle"/> |
| 127 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectNewInputType"/> |
| 128 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddProductsToNewOption"/> |
| 129 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterNewBundleProductOptions"/> |
| 130 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectNewFirstGridRow"/> |
| 131 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterNewBundleProductOptions2"/> |
| 132 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectNewFirstGridRow2"/> |
| 133 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddNewSelectedBundleProducts"/> |
| 134 | + <actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addBundleOptionWithTwoProducts2"> |
| 135 | + <argument name="x" value="1"/> |
| 136 | + <argument name="n" value="2"/> |
| 137 | + <argument name="prodOneSku" value="$$simpleProduct2.sku$$"/> |
| 138 | + <argument name="prodTwoSku" value="$$simpleProduct3.sku$$"/> |
| 139 | + <argument name="optionTitle" value="{{BundleProduct.optionTitle1}}"/> |
| 140 | + <argument name="inputType" value="{{BundleProduct.optionInputType1}}"/> |
120 | 141 | </actionGroup>
|
121 |
| - <checkOption selector="{{AdminProductFormBundleSection.firstProductOption}}" stepKey="selectNewFirstGridRow2"/> |
122 |
| - <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddNewSelectedBundleProducts"/> |
| 142 | + |
123 | 143 | <!-- Check that existing Bundle Options do not loose user input quantity values -->
|
124 | 144 | <grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" stepKey="grabbedFirstBundleOptionQuantityAfterUserInput"/>
|
125 | 145 | <assertEquals stepKey="assertFirstBundleOptionDefaultQuantityAfterUserInput">
|
126 |
| - <expectedResult type="string">{{BundleProduct.defaultQuantity}}</expectedResult> |
| 146 | + <expectedResult type="string">50</expectedResult> |
127 | 147 | <actualResult type="string">$grabbedFirstBundleOptionQuantityAfterUserInput</actualResult>
|
128 | 148 | </assertEquals>
|
129 | 149 | <grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" stepKey="grabbedSecondBundleOptionQuantityAfterUserInput"/>
|
130 | 150 | <assertEquals stepKey="assertSecondBundleOptionDefaultQuantityAfterUserInput">
|
131 |
| - <expectedResult type="string">{{BundleProduct.defaultQuantity}}</expectedResult> |
| 151 | + <expectedResult type="string">50</expectedResult> |
132 | 152 | <actualResult type="string">$grabbedSecondBundleOptionQuantityAfterUserInput</actualResult>
|
133 | 153 | </assertEquals>
|
134 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '2')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillNewProductDefaultQty1"/> |
135 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '3')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillNewProductDefaultQty2"/> |
136 |
| - |
| 154 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillNewProductDefaultQty1"/> |
| 155 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillNewProductDefaultQty2"/> |
137 | 156 | <!--Save the product-->
|
138 | 157 | <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButtonAgain"/>
|
139 |
| - <see userInput="You saved the product." stepKey="messageYouSavedTheProductIsShownAgain"/> |
| 158 | + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShownAgain"> |
| 159 | + <argument name="message" value="You saved the product."/> |
| 160 | + </actionGroup> |
140 | 161 |
|
141 | 162 | <!--Checking on admin side-->
|
142 | 163 | <scrollToTopOfPage stepKey="scrollAgain"/>
|
143 | 164 | <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenNewSectionBundleItems2"/>
|
144 | 165 | <seeElement selector="{{AdminProductFormBundleSection.listedBundleItem2}}" stepKey="LookingForNewBundleItemPresence"/>
|
145 |
| - |
146 | 166 | <!--Checking on customer side-->
|
147 |
| - <amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="GoToProductPageAgain"/> |
148 |
| - <waitForPageLoad stepKey="waitForBundleProductPageToLoadAgain"/> |
| 167 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPageAgain"> |
| 168 | + <argument name="productUrl" value="{{BundleProduct.urlKey}}"/> |
| 169 | + </actionGroup> |
| 170 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductPageToLoadAgain"/> |
149 | 171 | <seeElement selector="{{StorefrontBundledSection.customizeProduct}}" stepKey="LookingForAbilityToAddBothOptions"/>
|
150 | 172 | <click selector="{{StorefrontBundledSection.customizeProduct}}" stepKey="clickButtonAgainToCustomize"/>
|
151 | 173 | <waitForPageLoad stepKey="waitForBothCustomizationDropDown"/>
|
|
0 commit comments