|
52 | 52 |
|
53 | 53 | <!-- Find the product that we just created using the product grid -->
|
54 | 54 | <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
|
55 |
| - <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearProductsFilter" /> |
56 | 55 | <actionGroup ref="filterProductGridBySku" stepKey="findCreatedProduct">
|
57 | 56 | <argument name="product" value="ApiConfigurableProduct"/>
|
58 | 57 | </actionGroup>
|
59 |
| - <waitForPageLoad stepKey="waitForProductFilterLoad"/> |
60 | 58 | <click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProduct"/>
|
61 | 59 | <waitForPageLoad stepKey="waitForProductPageLoad"/>
|
62 | 60 |
|
63 |
| - <!-- Create configurations based off the Text Swatch we created earlier --> |
| 61 | + <!-- Create configurations for product we created earlier --> |
64 | 62 | <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickCreateConfigurations"/>
|
65 | 63 |
|
66 | 64 | <!--Create new attribute-->
|
|
81 | 79 | <waitForPageLoad stepKey="waitForSaveAttribute"/>
|
82 | 80 | <switchToIFrame stepKey="switchOutOfIFrame"/>
|
83 | 81 |
|
84 |
| - <!--Find attribute in grid and select--> |
85 |
| - <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/> |
86 |
| - <click selector="{{AdminDataGridHeaderSection.filters}}" stepKey="clickOnFilters"/> |
87 |
| - <fillField selector="{{AdminProductAttributeGridSection.attributeCodeFilterInput}}" userInput="{{productAttributeWithDropdownTwoOptions.attribute_code}}" stepKey="fillFilterAttributeCodeField"/> |
88 |
| - <click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickApplyFiltersButton"/> |
89 |
| - <click selector="{{AdminDataGridTableSection.rowCheckbox('1')}}" stepKey="clickOnFirstCheckbox"/> |
90 |
| - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNextStep"/> |
91 |
| - <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanelSection.selectAllByAttribute(productAttributeWithDropdownTwoOptions.attribute_code)}}" stepKey="waitForNextPageOpened"/> |
92 |
| - <click selector="{{AdminCreateProductConfigurationsPanelSection.selectAllByAttribute(productAttributeWithDropdownTwoOptions.attribute_code)}}" stepKey="clickSelectAll"/> |
93 |
| - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNextStep1"/> |
94 |
| - <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.applySinglePriceToAllSkus}}" stepKey="waitForNextPageOpened1"/> |
95 |
| - <click selector="{{AdminCreateProductConfigurationsPanel.applySinglePriceToAllSkus}}" stepKey="clickOnApplySinglePriceToAllSkus"/> |
96 |
| - <fillField selector="{{AdminCreateProductConfigurationsPanel.singlePrice}}" userInput="10" stepKey="enterAttributePrice"/> |
97 |
| - <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/> |
98 |
| - <fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="100" stepKey="enterAttributeQuantity"/> |
99 |
| - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickNextStep2"/> |
100 |
| - <waitForElementVisible selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="waitForNextPageOpened2"/> |
101 |
| - <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="generateProducts"/> |
| 82 | + <!-- Generate products --> |
| 83 | + <actionGroup ref="AdminGenerateConfigurations" stepKey="generateProducts"> |
| 84 | + <argument name="attributeCode" value="{{productAttributeWithDropdownTwoOptions.attribute_code}}"/> |
| 85 | + <argument name="qty" value="100"/> |
| 86 | + <argument name="price" value="10"/> |
| 87 | + </actionGroup> |
102 | 88 | <waitForElementVisible selector="{{AdminProductFormActionSection.saveButton}}" stepKey="waitForSaveButtonVisible"/>
|
103 | 89 | <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/>
|
104 | 90 | <waitForElementVisible selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" stepKey="waitForPopUpVisible"/>
|
|
111 | 97 |
|
112 | 98 | <!--See that validation message is shown under the fields-->
|
113 | 99 | <scrollTo selector="{{AdminProductFormConfigurationsSection.currentVariationsSkuCells}}" stepKey="scrollTConfigurationTab"/>
|
114 |
| - <see userInput="Please enter less or equal than 64 symbols." selector="{{AdminProductFormConfigurationsSection.confProductSkuMessage('0')}}" stepKey="seeValidationMessage"/> |
| 100 | + <see userInput="Please enter less or equal than 64 symbols." selector="{{AdminProductFormConfigurationsSection.skuValidationMessage('0')}}" stepKey="seeValidationMessage"/> |
115 | 101 |
|
116 | 102 | <!--Edit "SKU" with valid quantity-->
|
117 |
| - <fillField selector="{{AdminProductFormConfigurationsSection.confProductSku('0')}}" userInput="{{ApiConfigurableProduct.sku}}-thisIsShortName" stepKey="fillValidValue"/> |
| 103 | + <fillField selector="{{AdminProductFormConfigurationsSection.configurableMatrixSku('0')}}" userInput="{{ApiConfigurableProduct.sku}}-thisIsShortName" stepKey="fillValidValue"/> |
118 | 104 |
|
119 | 105 | <!--Click on "Save"-->
|
120 | 106 | <waitForElementVisible selector="{{AdminProductFormActionSection.saveButton}}" stepKey="waitForSaveBtnVisible"/>
|
|
123 | 109 | <!--Click on "Confirm". Product is saved, success message appears -->
|
124 | 110 | <waitForElementVisible selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" stepKey="waitPopUpVisible"/>
|
125 | 111 | <click selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" stepKey="clickOnConfirmPopup"/>
|
126 |
| - <seeElement selector="{{AdminMessagesSection.success}}" stepKey="seeSaveProductMessage"/> |
| 112 | + <see selector="{{AdminMessagesSection.success}}" userInput="You saved the product." stepKey="seeSaveProductMessage"/> |
127 | 113 | </test>
|
128 | 114 | </tests>
|
0 commit comments