|
15 | 15 | <severity value="MAJOR"/>
|
16 | 16 | <testCaseId value="AC-4359"/>
|
17 | 17 | </annotations>
|
18 |
| - <before> |
19 |
| - <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
20 |
| - </before> |
21 | 18 | <after>
|
22 |
| - <deleteData createDataKey="stock" stepKey="deleteCustomStock"/> |
23 |
| - <!--Disable all sources.--> |
24 |
| - <actionGroup ref="DisableAllSourcesActionGroup" stepKey="deleteSource"/> |
25 |
| - <!--Delete all created product--> |
26 |
| - <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProducts"> |
27 |
| - <argument name="sku" value="{{ApiConfigurableProduct.sku}}"/> |
| 19 | + <actionGroup ref="DeleteProductAttributeActionGroup" after="clearFilters" stepKey="deleteCreatedAttribute"> |
| 20 | + <argument name="ProductAttribute" value="sizeAttribute"/> |
28 | 21 | </actionGroup>
|
29 |
| - <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilters"/> |
30 |
| - <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> |
31 | 22 | </after>
|
32 |
| - <createData entity="FullSource1" stepKey="source"/> |
33 |
| - <createData entity="BasicMsiStockWithMainWebsite1" stepKey="stock"/> |
34 |
| - <createData entity="SourceStockLinked1" stepKey="sourceStockLink"> |
35 |
| - <requiredEntity createDataKey="stock"/> |
36 |
| - <requiredEntity createDataKey="source"/> |
37 |
| - </createData> |
38 |
| - <!--Open product page and start creating configurable product--> |
39 |
| - <actionGroup ref="AdminOpenProductIndexPageActionGroup" after="saveAttribute" stepKey="openProductIndexPage"/> |
40 |
| - <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateConfigurableProduct"> |
41 |
| - <argument name="product" value="ApiConfigurableProduct"/> |
| 23 | + <actionGroup ref="AdminNavigateToNewProductAttributePageActionGroup" after="sourceStockLink" stepKey="navigateToNewProductAttributePage"/> |
| 24 | + <actionGroup ref="AdminFillProductAttributePropertiesActionGroup" after="navigateToNewProductAttributePage" stepKey="fillAttributeProperties"> |
| 25 | + <argument name="attributeName" value="{{sizeAttribute.attribute_code}}"/> |
| 26 | + <argument name="attributeType" value="{{sizeAttribute.input_type}}"/> |
42 | 27 | </actionGroup>
|
43 |
| - <!-- Fill all the necessary information such as weight, name, SKU etc --> |
44 |
| - <actionGroup ref="FillMainProductFormActionGroup" stepKey="fillProductForm"> |
45 |
| - <argument name="product" value="ApiConfigurableProduct"/> |
| 28 | + <!--Add option S, M and L to attribute and save--> |
| 29 | + <waitForElementClickable selector="{{AdminNewAttributePanel.addOption}}" stepKey="waitToClickOnAddOptionButton" after="fillAttributeProperties"/> |
| 30 | + <click selector="{{AdminNewAttributePanel.addOption}}" after="waitToClickOnAddOptionButton" stepKey="clickAddOptionSSize"/> |
| 31 | + <actionGroup ref="AdminAddOptionsToSizeAttributeActionGroup" stepKey="addSSizeOption" after="clickAddOptionSSize"> |
| 32 | + <argument name="position" value="0"/> |
| 33 | + <argument name="size" value="S"/> |
46 | 34 | </actionGroup>
|
47 |
| - <actionGroup ref="AdminCreateOptionsForAttributeMultiStockActionGroup" stepKey="generateVariations"> |
48 |
| - <argument name="attributeCode" value="{{sizeAttribute.attribute_code}}"/> |
49 |
| - <argument name="sourceCode" value="$source.source[source_code]$"/> |
| 35 | + <waitForElementClickable selector="{{AdminNewAttributePanel.addOption}}" stepKey="waitToClickAddOptionForMSize" after="addSSizeOption"/> |
| 36 | + <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOptionForMSize" after="waitToClickAddOptionForMSize"/> |
| 37 | + <actionGroup ref="AdminAddOptionsToSizeAttributeActionGroup" stepKey="addMSizeOption" after="clickAddOptionForMSize"> |
| 38 | + <argument name="position" value="1"/> |
| 39 | + <argument name="size" value="M"/> |
50 | 40 | </actionGroup>
|
51 |
| - <actionGroup ref="SaveConfigurableProductActionGroup" stepKey="saveConfigurable"> |
52 |
| - <argument name="product" value="ApiConfigurableProduct"/> |
| 41 | + <waitForElementClickable selector="{{AdminNewAttributePanel.addOption}}" stepKey="waitToClickAddOptionForLSize" after="addMSizeOption"/> |
| 42 | + <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOptionForLSize" after="waitToClickAddOptionForLSize" /> |
| 43 | + <actionGroup ref="AdminAddOptionsToSizeAttributeActionGroup" stepKey="addLSizeOption" after="clickAddOptionForLSize"> |
| 44 | + <argument name="position" value="2"/> |
| 45 | + <argument name="size" value="L"/> |
53 | 46 | </actionGroup>
|
54 |
| - <!-- Go to child product S and update status as out of stock--> |
55 |
| - <actionGroup ref="AdminOpenChildVariationOfConfigurableProductActionGroup" stepKey="OpenChildVariation"/> |
56 |
| - <switchToNextTab stepKey="switchToConfigChildProductPage"/> |
57 |
| - <waitForPageLoad stepKey="waitForProductPageLoad"/> |
58 |
| - <actionGroup ref="AdminUpdateStatusOfChildVariationOfConfigurableProductActionGroup" stepKey="updateStatusAndSave"/> |
59 |
| - <closeTab stepKey="closeConfigChildProductPage"/> |
60 |
| - <!--Reindex and clear cache--> |
61 |
| - <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
62 |
| - <argument name="indices" value=""/> |
63 |
| - </actionGroup> |
64 |
| - <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> |
65 |
| - <argument name="tags" value="full_page"/> |
66 |
| - </actionGroup> |
67 |
| - <!-- Go to storefront and assert the configurable product--> |
68 |
| - <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront2"/> |
69 |
| - <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPage"> |
70 |
| - <argument name="productUrl" value="{{ApiConfigurableProduct.urlKey}}"/> |
71 |
| - </actionGroup> |
72 |
| - <waitForPageLoad stepKey="waitingForPageLoad"/> |
73 |
| - <waitForElementClickable selector="{{StorefrontConfigurableProductPage.productAttributeDropDown}}" stepKey="waitForDropDownOptionToBeSelected"/> |
74 |
| - <click selector="{{StorefrontConfigurableProductPage.productAttributeDropDown}}" stepKey="clickOnDropDown"/> |
75 |
| - <dontSeeElement selector="{{StorefrontProductInfoMainSection.dropDownOption('S')}}" stepKey="seeSSizeIsAvailable"/> |
| 47 | + <waitForElementClickable selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}" stepKey="waitForAdvancedPropertiesFieldIsVisible" after="addLSizeOption" /> |
| 48 | + <click selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}" stepKey="openAttributeAdvancedSection" after="waitForAdvancedPropertiesFieldIsVisible"/> |
| 49 | + <selectOption selector="{{AdvancedAttributePropertiesSection.Scope}}" userInput="Global" stepKey="selectScope" after="openAttributeAdvancedSection"/> |
| 50 | + <click selector="{{AdminProductFormNewAttributeSection.saveAttribute}}" stepKey="saveAttribute" after="selectScope"/> |
76 | 51 | </test>
|
77 | 52 | </tests>
|
0 commit comments