|
9 | 9 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
|
10 | 10 | <test name="StoreFrontAdminCreateTextSwatchAttributeAndAssertInStoreFrontTest">
|
11 | 11 | <annotations>
|
12 |
| - <features value="Product"/> |
| 12 | + <features value="ConfigurableProduct"/> |
13 | 13 | <stories value="Create Text Swatch from Stores ->Attributes section: Product"/>
|
14 | 14 | <title value="Create Text Swatch from Stores ->Attributes section: Product"/>
|
15 | 15 | <description value="Admin create product attribute with text swatch and assert them in storefront"/>
|
16 | 16 | <severity value="MAJOR"/>
|
| 17 | + <testCaseId value="AC-3921"/> |
17 | 18 | </annotations>
|
18 | 19 | <before>
|
19 | 20 | <!--Login to admin-->
|
|
39 | 40 | <click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatch"/>
|
40 | 41 | <waitForAjaxLoad stepKey="waitForAjaxLoad"/>
|
41 | 42 |
|
| 43 | + <waitForElementClickable selector="{{AttributeManageSwatchSection.isDefaultTextSwatch('1')}}" stepKey="waitForDefaultOptionToBecomeClickable"/> |
| 44 | + <click selector="{{AttributeManageSwatchSection.isDefaultTextSwatch('1')}}" stepKey="setFirstSizeAsDefault"/> |
| 45 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('0')}}" stepKey="waitForTextBoxForSSizeBecomeVisible"/> |
42 | 46 | <fillField selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('0')}}" userInput="S" stepKey="fillSwatchForAdmin"/>
|
| 47 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('0')}}" stepKey="waitForTextBoxForDescriptionForSSizeBecomeVisibleForAdmin"/> |
43 | 48 | <fillField selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('0')}}" userInput="Small" stepKey="fillDescriptionForAdmin"/>
|
| 49 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('0')}}" stepKey="waitForTextBoxForSSizeBecomeVisibleForStoreView"/> |
44 | 50 | <fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('0')}}" userInput="S1" stepKey="fillSwatchForStoreView"/>
|
| 51 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('0')}}" stepKey="waitForTextBoxForDescriptionForSSizeBecomeVisibleForStoreView"/> |
45 | 52 | <fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('0')}}" userInput="Small_1" stepKey="fillDescriptionForStoreView"/>
|
46 | 53 | <!--Add swatch for Medium-->
|
| 54 | + <waitForElementClickable selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddSwatchButtonToBeClickable"/> |
47 | 55 | <click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatchForMedium"/>
|
| 56 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('1')}}" stepKey="waitForTextBoxForMSizeBecomeVisible"/> |
48 | 57 | <fillField selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('1')}}" userInput="M" stepKey="fillMediumSwatchForAdmin"/>
|
| 58 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('1')}}" stepKey="waitForTextBoxForDescriptionForMSizeBecomeVisibleForAdmin"/> |
49 | 59 | <fillField selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('1')}}" userInput="Medium" stepKey="fillDescriptionForMediumForAdmin"/>
|
| 60 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('1')}}" stepKey="waitForTextBoxForMSizeBecomeVisibleForStoreView"/> |
50 | 61 | <fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('1')}}" userInput="M2" stepKey="fillMediumSwatchForStoreView"/>
|
| 62 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('1')}}" stepKey="waitForTextBoxForDescriptionForMSizeBecomeVisibleForStoreView"/> |
51 | 63 | <fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('1')}}" userInput="Medium_2" stepKey="fillDescriptionForMediumForStoreView"/>
|
52 | 64 | <!--Add swatch for Large-->
|
| 65 | + <waitForElementClickable selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddSwatchButtonForLargeToBeClickable"/> |
53 | 66 | <click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatchForLarge"/>
|
| 67 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('2')}}" stepKey="waitForTextBoxForLargeSizeBecomeVisible"/> |
54 | 68 | <fillField selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('2')}}" userInput="L" stepKey="fillLargeSwatchForAdmin"/>
|
| 69 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('2')}}" stepKey="waitForTextBoxForDescriptionForLargeSizeBecomeVisibleForAdmin"/> |
55 | 70 | <fillField selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('2')}}" userInput="Large" stepKey="fillDescriptionForLargeForAdmin"/>
|
| 71 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('2')}}" stepKey="waitForTextBoxForLargeSizeBecomeVisibleForStoreView"/> |
56 | 72 | <fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreSwatchValue('2')}}" userInput="L3" stepKey="fillLargeSwatchForStoreView"/>
|
| 73 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('2')}}" stepKey="waitForTextBoxForDescriptionForLargeSizeBecomeVisibleForStoreView"/> |
57 | 74 | <fillField selector="{{AttributeManageSwatchSection.textSwatchDefaultStoreDescriptionValue('2')}}" userInput="Large_3" stepKey="fillDescriptionForLargeForStoreView"/>
|
58 | 75 | <!--Add swatch for Extra Large-->
|
| 76 | + <waitForElementClickable selector="{{AttributePropertiesSection.addSwatch}}" stepKey="waitForAddSwatchButtonForExtarLargeToBeClickable"/> |
59 | 77 | <click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatchForExtraLarge"/>
|
| 78 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('3')}}" stepKey="waitForTextBoxForExtraLargeSizeBecomeVisible"/> |
60 | 79 | <fillField selector="{{AttributeManageSwatchSection.textSwatchAdminSwatchValue('3')}}" userInput="XL" stepKey="fillExtraLargeSwatchForAdmin"/>
|
| 80 | + <waitForElementVisible selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('3')}}" stepKey="waitForTextBoxForDescriptionForExtraLargeSizeBecomeVisibleForAdmin"/> |
61 | 81 | <fillField selector="{{AttributeManageSwatchSection.textSwatchAdminDescriptionValue('3')}}" userInput="Extra Large" stepKey="fillDescriptionForExtraLargeForAdmin"/>
|
62 | 82 | <!--Select Scope-->
|
63 | 83 | <waitForElementClickable selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}" stepKey="waitForAdvancedPropertiesFieldIsVisible"/>
|
|
68 | 88 | <click selector="{{AdminNewAttributePanel.saveAttribute}}" stepKey="clickSaveAttribute"/>
|
69 | 89 | <waitForPageLoad stepKey="waitForSavingAttribute"/>
|
70 | 90 | <!-- Open created attribute-->
|
71 |
| - <fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{sizeAttribute.attribute_code}}" stepKey="setAttributeCode"/> |
| 91 | + <waitForElementClickable selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" stepKey="waitToFillAttributeCodeInTextBox"/> |
| 92 | + <fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{sizeAttribute.attribute_code}}" stepKey="fillAttributeCode"/> |
| 93 | + <waitForElementClickable selector="{{AdminProductAttributeGridSection.Search}}" stepKey="waitForSearchForAttributeFromTheGridButtonToBeClicked"/> |
72 | 94 | <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/>
|
| 95 | + <waitForElementClickable selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="waitToClickOnAttributeRow"/> |
73 | 96 | <click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="clickOnAttributeRow"/>
|
74 | 97 | <waitForPageLoad stepKey="waitForPageLoad2"/>
|
75 | 98 | <!--Assert textual swatch value configured for each store view-->
|
|
81 | 104 | <actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage"/>
|
82 | 105 | <actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openDefaultAttributeSet"/>
|
83 | 106 | <dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('size')}}" selector2="{{AdminProductAttributeSetSection.attribute('Product Details')}}" stepKey="assignTestAttributes"/>
|
| 107 | + <waitForElementClickable selector="{{AdminProductAttributeSetSection.saveBtn}}" stepKey="waitToClickOnAttributeSetSaveButton"/> |
84 | 108 | <click selector="{{AdminProductAttributeSetSection.saveBtn}}" stepKey="clickAttributeSetSave"/>
|
85 | 109 | <!-- Navigate to Catalog-> Products and click On Configurable product dropdown -->
|
86 | 110 | <actionGroup ref="GotoCatalogProductsPageActionGroup" stepKey="goToCatalogProductsPage"/>
|
|
0 commit comments