|
37 | 37 | </after>
|
38 | 38 |
|
39 | 39 | <!--Go to bundle product creation page-->
|
40 |
| - <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage" /> |
41 |
| - <waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/> |
| 40 | + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage"> |
| 41 | + <argument name="attributeSetId" value="{{BundleProduct.set}}"/> |
| 42 | + <argument name="productType" value="{{BundleProduct.type}}"/> |
| 43 | + </actionGroup> |
| 44 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreatePageToLoad"/> |
42 | 45 |
|
43 | 46 | <!--Create bundle product-->
|
44 |
| - <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/> |
45 |
| - <click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/> |
46 |
| - <waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/> |
47 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/> |
48 |
| - <selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/> |
49 |
| - <actionGroup ref="AdminClickAddProductToOptionActionGroup" stepKey="clickAddProductsToOption"/> |
50 |
| - <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions"> |
51 |
| - <argument name="product" value="$$simpleProduct1$$"/> |
52 |
| - </actionGroup> |
53 |
| - <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/> |
54 |
| - <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions2"> |
55 |
| - <argument name="product" value="$$simpleProduct2$$"/> |
| 47 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="conditionallyOpenSectionBundleItems"/> |
| 48 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddOption3"/> |
| 49 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleOptions"/> |
| 50 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillOptionTitle"/> |
| 51 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectInputType"/> |
| 52 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddProductsToOption"/> |
| 53 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterBundleProductOptions"/> |
| 54 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFirstGridRow"/> |
| 55 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterBundleProductOptions2"/> |
| 56 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFirstGridRow2"/> |
| 57 | + <actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="clickAddSelectedBundleProducts"> |
| 58 | + <argument name="x" value="0"/> |
| 59 | + <argument name="n" value="1"/> |
| 60 | + <argument name="prodOneSku" value="$$simpleProduct1.sku$$"/> |
| 61 | + <argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/> |
| 62 | + <argument name="optionTitle" value="{{BundleProduct.optionTitle1}}"/> |
| 63 | + <argument name="inputType" value="{{BundleProduct.optionInputType1}}"/> |
56 | 64 | </actionGroup>
|
57 |
| - <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/> |
58 |
| - <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/> |
59 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/> |
60 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/> |
| 65 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty1"/> |
| 66 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty2"/> |
61 | 67 |
|
62 | 68 | <!--Fill out ancillary data on bundle product-->
|
63 | 69 | <actionGroup ref="AncillaryPrepBundleProductActionGroup" stepKey="createBundledProductForTwoSimpleProducts">
|
|
66 | 72 |
|
67 | 73 | <!--Save the product-->
|
68 | 74 | <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
|
69 |
| - <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/> |
| 75 | + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown"> |
| 76 | + <argument name="message" value="You saved the product."/> |
| 77 | + </actionGroup> |
70 | 78 |
|
71 | 79 | <!--Creating Second bundle product-->
|
72 | 80 | <!--Go to bundle product creation page-->
|
73 |
| - <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage2" /> |
74 |
| - <waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad2"/> |
| 81 | + <actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage2"> |
| 82 | + <argument name="attributeSetId" value="{{BundleProduct.set}}"/> |
| 83 | + <argument name="productType" value="{{BundleProduct.type}}"/> |
| 84 | + </actionGroup> |
| 85 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreatePageToLoad2"/> |
75 | 86 |
|
76 | 87 | <!--Create bundle product 2-->
|
77 |
| - <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems2"/> |
78 |
| - <click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption32"/> |
79 |
| - <waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions2"/> |
80 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle2"/> |
81 |
| - <selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType2"/> |
82 |
| - <actionGroup ref="AdminClickAddProductToOptionActionGroup" stepKey="clickAddProductsToOption2"/> |
83 |
| - <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptionsx2"> |
84 |
| - <argument name="product" value="$$simpleProduct3$$"/> |
85 |
| - </actionGroup> |
86 |
| - <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRowx2"/> |
87 |
| - <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions22"> |
88 |
| - <argument name="product" value="$$simpleProduct4$$"/> |
| 88 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="conditionallyOpenSectionBundleItems2"/> |
| 89 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddOption32"/> |
| 90 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleOptions2"/> |
| 91 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillOptionTitle2"/> |
| 92 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectInputType2"/> |
| 93 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddProductsToOption2"/> |
| 94 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterBundleProductOptionsx2"/> |
| 95 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFirstGridRowx2"/> |
| 96 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterBundleProductOptions22"/> |
| 97 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFirstGridRow22"/> |
| 98 | + <actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="clickAddSelectedBundleProducts2"> |
| 99 | + <argument name="x" value="0"/> |
| 100 | + <argument name="n" value="1"/> |
| 101 | + <argument name="prodOneSku" value="$$simpleProduct3.sku$$"/> |
| 102 | + <argument name="prodTwoSku" value="$$simpleProduct4.sku$$"/> |
| 103 | + <argument name="optionTitle" value="{{BundleProduct.optionTitle1}}"/> |
| 104 | + <argument name="inputType" value="{{BundleProduct.optionInputType1}}"/> |
89 | 105 | </actionGroup>
|
90 |
| - <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow22"/> |
91 |
| - <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts2"/> |
92 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty12"/> |
93 |
| - <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty22"/> |
| 106 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty12"/> |
| 107 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty22"/> |
94 | 108 |
|
95 |
| - <fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name2}}" stepKey="fillProductName2"/> |
96 |
| - <fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku2}}" stepKey="fillProductSku2"/> |
| 109 | + <actionGroup ref="AdminFillProductNameOnProductFormActionGroup" stepKey="fillProductName2"> |
| 110 | + <argument name="productName" value="{{BundleProduct.name2}}"/> |
| 111 | + </actionGroup> |
| 112 | + <actionGroup ref="AdminFillProductSkuOnProductFormActionGroup" stepKey="fillProductSku2"> |
| 113 | + <argument name="productSku" value="{{BundleProduct.sku2}}"/> |
| 114 | + </actionGroup> |
97 | 115 |
|
98 | 116 | <!--Trigger SEO drop down-->
|
99 | 117 | <scrollTo selector="{{AdminProductFormBundleSection.seoDropdown}}" stepKey="moveToSEOSection"/>
|
|
104 | 122 |
|
105 | 123 | <!--Save the product-->
|
106 | 124 | <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton2"/>
|
107 |
| - <see userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown2"/> |
| 125 | + <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown2"> |
| 126 | + <argument name="message" value="You saved the product."/> |
| 127 | + </actionGroup> |
108 | 128 |
|
109 | 129 | <!--Mass delete bundle products-->
|
110 | 130 | <!--Clear Filters-->
|
|
123 | 143 | <actionGroup ref="ClearPageCacheActionGroup" stepKey="ClearPageCaches"/>
|
124 | 144 |
|
125 | 145 | <!--Testing deletion of products-->
|
126 |
| - <amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="GoToProductPageAgain"/> |
127 |
| - <waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement"/> |
128 |
| - <dontSeeElement stepKey="LookingForNameOfProduct" selector="{{StorefrontBundledSection.bundleProductName}}"/> |
129 |
| - <seeElement stepKey="LookingForPageNotFoundMessage" selector="{{StorefrontBundledSection.pageNotFound}}"/> |
130 |
| - <amOnPage url="{{BundleProduct.urlKey2}}.html" stepKey="GoToProductPageAgain2"/> |
131 |
| - <waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement2"/> |
132 |
| - <dontSeeElement stepKey="LookingForNameOfProduct2" selector="{{StorefrontBundledSection.bundleProductName}}"/> |
133 |
| - <seeElement stepKey="LookingForPageNotFoundMessage2" selector="{{StorefrontBundledSection.pageNotFound}}"/> |
| 146 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPageAgain"> |
| 147 | + <argument name="productUrl" value="{{BundleProduct.urlKey}}"/> |
| 148 | + </actionGroup> |
| 149 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="WaitForProductPageToLoadToShowElement"/> |
| 150 | + <actionGroup ref="StorefrontAssertProductNameIsNotShownOnProductPageActionGroup" stepKey="LookingForNameOfProduct"> |
| 151 | + <argument name="productName" value="{{BundleProduct.name}}"/> |
| 152 | + </actionGroup> |
| 153 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LookingForPageNotFoundMessage"/> |
| 154 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPageAgain2"> |
| 155 | + <argument name="productUrl" value="{{BundleProduct.urlKey2}}"/> |
| 156 | + </actionGroup> |
| 157 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="WaitForProductPageToLoadToShowElement2"/> |
| 158 | + <actionGroup ref="StorefrontAssertProductNameIsNotShownOnProductPageActionGroup" stepKey="LookingForNameOfProduct2"> |
| 159 | + <argument name="productName" value="{{BundleProduct.name2}}"/> |
| 160 | + </actionGroup> |
| 161 | + <comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LookingForPageNotFoundMessage2"/> |
134 | 162 | </test>
|
135 | 163 | </tests>
|
0 commit comments