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