|
69 | 69 | <waitForPageLoad stepKey="wait5"/>
|
70 | 70 | <see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="MFTF automation!" stepKey="seeDescription3"/>
|
71 | 71 | </test>
|
| 72 | + |
| 73 | + <test name="AdminConfigurableProductRemoveAnOptionTest"> |
| 74 | + <annotations> |
| 75 | + <features value="ConfigurableProduct"/> |
| 76 | + <stories value="Create, Read, Update, Delete"/> |
| 77 | + <title value="Admin should be able to remove a product configuration"/> |
| 78 | + <description value="Admin should be able to remove a product configuration"/> |
| 79 | + <testCaseId value="MC-63"/> |
| 80 | + <group value="ConfigurableProduct"/> |
| 81 | + </annotations> |
| 82 | + |
| 83 | + <before> |
| 84 | + <!-- This was copied and modified from the EndToEndB2CGuestUserTest --> |
| 85 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 86 | + <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> |
| 87 | + <requiredEntity createDataKey="createCategory"/> |
| 88 | + </createData> |
| 89 | + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> |
| 90 | + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> |
| 91 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 92 | + </createData> |
| 93 | + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> |
| 94 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 95 | + </createData> |
| 96 | + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> |
| 97 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 98 | + </createData> |
| 99 | + <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> |
| 100 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 101 | + </getData> |
| 102 | + <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2"> |
| 103 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 104 | + </getData> |
| 105 | + <createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> |
| 106 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 107 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 108 | + </createData> |
| 109 | + <createData entity="ApiSimpleTwo" stepKey="createConfigChildProduct2"> |
| 110 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 111 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 112 | + </createData> |
| 113 | + <createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> |
| 114 | + <requiredEntity createDataKey="createConfigProduct"/> |
| 115 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 116 | + <requiredEntity createDataKey="getConfigAttributeOption1"/> |
| 117 | + <requiredEntity createDataKey="getConfigAttributeOption2"/> |
| 118 | + </createData> |
| 119 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> |
| 120 | + <requiredEntity createDataKey="createConfigProduct"/> |
| 121 | + <requiredEntity createDataKey="createConfigChildProduct1"/> |
| 122 | + </createData> |
| 123 | + <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2"> |
| 124 | + <requiredEntity createDataKey="createConfigProduct"/> |
| 125 | + <requiredEntity createDataKey="createConfigChildProduct2"/> |
| 126 | + </createData> |
| 127 | + </before> |
| 128 | + |
| 129 | + <after> |
| 130 | + <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/> |
| 131 | + <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/> |
| 132 | + <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> |
| 133 | + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> |
| 134 | + </after> |
| 135 | + |
| 136 | + <!--check storefront for both options--> |
| 137 | + <amOnPage url="$$createConfigProduct.sku$$.html" stepKey="amOnStorefront1"/> |
| 138 | + <waitForPageLoad stepKey="wait1"/> |
| 139 | + <see selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="option1" stepKey="seeOption1Storefront"/> |
| 140 | + <see selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="option2" stepKey="seeOption2Storefront"/> |
| 141 | + |
| 142 | + <!--check admin for both options--> |
| 143 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 144 | + <amOnPage url="{{AdminProductEditPage.url($$createConfigProduct.id$$)}}" stepKey="goToEditPage"/> |
| 145 | + <waitForPageLoad stepKey="wait2"/> |
| 146 | + <see selector="{{AdminProductFormConfigurationsSection.currentVariationsNameCells}}" userInput="$$createConfigChildProduct1.name$$" stepKey="seeOption1Admin"/> |
| 147 | + <see selector="{{AdminProductFormConfigurationsSection.currentVariationsNameCells}}" userInput="$$createConfigChildProduct2.name$$" stepKey="seeOption2Admin"/> |
| 148 | + |
| 149 | + <!--remove an option--> |
| 150 | + <click selector="{{AdminProductFormConfigurationsSection.actionsBtn('1')}}" stepKey="clickToExpandActions"/> |
| 151 | + <click selector="{{AdminProductFormConfigurationsSection.removeProductBtn}}" stepKey="clickRemove"/> |
| 152 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSave"/> |
| 153 | + <waitForPageLoad stepKey="wait3"/> |
| 154 | + |
| 155 | + <!--check admin for one option--> |
| 156 | + <dontSee selector="{{AdminProductFormConfigurationsSection.currentVariationsNameCells}}" userInput="$$createConfigChildProduct1.name$$" stepKey="dontSeeOption1Admin"/> |
| 157 | + |
| 158 | + <!--check storefront for one option--> |
| 159 | + <amOnPage url="$$createConfigProduct.sku$$.html" stepKey="amOnStorefront2"/> |
| 160 | + <waitForPageLoad stepKey="wait4"/> |
| 161 | + <dontSee selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="option1" stepKey="dontSeeOption1InStorefront"/> |
| 162 | + <see selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="option2" stepKey="seeOption2Again"/> |
| 163 | + </test> |
72 | 164 | </tests>
|
0 commit comments