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