|
21 | 21 | <before>
|
22 | 22 | <!--Creating data-->
|
23 | 23 | <createData entity="_defaultCategory" stepKey="createPreReqCategory"/>
|
| 24 | + <createData entity="SimpleProduct2" stepKey="simpleProduct0"/> |
24 | 25 | <createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
|
25 | 26 | <createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
|
| 27 | + <createData entity="SimpleProduct2" stepKey="simpleProduct3"/> |
26 | 28 | <!--Admin login-->
|
27 | 29 | <actionGroup stepKey="loginToAdminPanel" ref="LoginAsAdmin"/>
|
28 | 30 | </before>
|
29 | 31 | <after>
|
30 | 32 | <!--Deleting data-->
|
31 | 33 | <deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/>
|
| 34 | + <deleteData createDataKey="simpleProduct0" stepKey="deleteSimpleProduct0"/> |
32 | 35 | <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
|
33 | 36 | <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
|
| 37 | + <deleteData createDataKey="simpleProduct3" stepKey="deleteSimpleProduct3"/> |
34 | 38 | <!--Logging out-->
|
35 | 39 | <actionGroup ref="logout" stepKey="logout"/>
|
36 | 40 | </after>
|
|
48 | 52 | <click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/>
|
49 | 53 | <waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts"/>
|
50 | 54 | <actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions">
|
51 |
| - <argument name="product" value="$$simpleProduct1$$"/> |
| 55 | + <argument name="product" value="$$simpleProduct0$$"/> |
52 | 56 | </actionGroup>
|
53 | 57 | <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
|
54 | 58 | <actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions2">
|
55 |
| - <argument name="product" value="$$simpleProduct2$$"/> |
| 59 | + <argument name="product" value="$$simpleProduct1$$"/> |
56 | 60 | </actionGroup>
|
57 | 61 | <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/>
|
58 | 62 | <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/>
|
|
80 | 84 | <click selector="{{StorefrontBundledSection.customizeProduct}}" stepKey="clickButtonToCustomize"/>
|
81 | 85 | <waitForPageLoad stepKey="waitCustomizationDropDown"/>
|
82 | 86 | <seeElement selector="{{StorefrontBundledSection.customizableBundleItemOption}}" stepKey="seeBundleItem"/>
|
| 87 | + |
| 88 | + <!--Add another bundle option with 2 items--> |
| 89 | + <!--Go to bundle product creation page--> |
| 90 | + <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage"/> |
| 91 | + <waitForPageLoad stepKey="WaitForPageToLoad"/> |
| 92 | + <conditionalClick selector="{{AdminProductCatalog.filtersClear}}" dependentSelector="{{AdminProductCatalog.filtersClear}}" visible="true" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/> |
| 93 | + <waitForPageLoad stepKey="WaitForClear"/> |
| 94 | + <actionGroup ref="filterProductGridByName" stepKey="filterBundleProductOptionsDownToName"> |
| 95 | + <argument name="product" value="BundleProduct"/> |
| 96 | + </actionGroup> |
| 97 | + <click selector="{{AdminProductFormBundleSection.addOptions}}" stepKey="clickOnBundleProductToEdit"/> |
| 98 | + <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItemsToEdit"/> |
| 99 | + <click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption"/> |
| 100 | + <pauseExecution stepKey="pause"/> |
| 101 | + <waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('1')}}" stepKey="waitForBundleOptionsToAppear"/> |
| 102 | + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('1')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillNewestOptionTitle"/> |
| 103 | + <selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('1')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectNewInputType"/> |
| 104 | + <waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToNewBundle"/> |
| 105 | + <click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToNewOption"/> |
| 106 | + <waitForPageLoad stepKey="waitForPageLoadAfterNewBundleProducts"/> |
| 107 | + <actionGroup ref="filterProductGridBySku" stepKey="filterNewBundleProductOptions"> |
| 108 | + <argument name="product" value="$$simpleProduct2$$"/> |
| 109 | + </actionGroup> |
| 110 | + <checkOption selector="//div[@class='admin__data-grid-outer-wrap']//tr[@data-repeat-index='0']//input[@type='checkbox']" stepKey="selectNewFirstGridRow"/> |
| 111 | + <actionGroup ref="filterProductGridBySku" stepKey="filterNewBundleProductOptions2"> |
| 112 | + <argument name="product" value="$$simpleProduct3$$"/> |
| 113 | + </actionGroup> |
| 114 | + <checkOption selector="{{AdminProductFormBundleSection.firstProductOption}}" stepKey="selectNewFirstGridRow2"/> |
| 115 | + <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddNewSelectedBundleProducts"/> |
| 116 | + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '2')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillNewProductDefaultQty1"/> |
| 117 | + <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '3')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillNewProductDefaultQty2"/> |
| 118 | + |
| 119 | + <!--Save the product--> |
| 120 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButtonAgain"/> |
| 121 | + <see userInput="You saved the product." stepKey="messageYouSavedTheProductIsShownAgain"/> |
| 122 | + |
| 123 | + <!--Checking on admin side--> |
| 124 | + <scrollToTopOfPage stepKey="scrollAgain"/> |
| 125 | + <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenNewSectionBundleItems2"/> |
| 126 | + <seeElement selector="{{AdminProductFormBundleSection.listedBundleItem2}}" stepKey="LookingForNewBundleItemPresence"/> |
| 127 | + |
| 128 | + <!--Checking on customer side--> |
| 129 | + <amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="GoToProductPageAgain"/> |
| 130 | + <waitForPageLoad stepKey="waitForBundleProductPageToLoadAgain"/> |
| 131 | + <seeElement selector="{{StorefrontBundledSection.customizeProduct}}" stepKey="LookingForAbilityToAddBothOptions"/> |
| 132 | + <click selector="{{StorefrontBundledSection.customizeProduct}}" stepKey="clickButtonAgainToCustomize"/> |
| 133 | + <waitForPageLoad stepKey="waitForBothCustomizationDropDown"/> |
| 134 | + <seeElement selector="{{StorefrontBundledSection.customizableBundleItemOption2}}" stepKey="seeBundleItems"/> |
83 | 135 | </test>
|
84 | 136 | </tests>
|
0 commit comments