|
15 | 15 | <title value="Import customizable options to a product with existing SKU"/>
|
16 | 16 | <description value="Import customizable options to a product with existing SKU"/>
|
17 | 17 | <severity value="MAJOR"/>
|
18 |
| - <testCaseId value="MAGETWO-98211"/> |
| 18 | + <testCaseId value="MC-16471"/> |
19 | 19 | <useCaseId value="MAGETWO-70232"/>
|
20 | 20 | <group value="catalog"/>
|
21 |
| - <skip> |
22 |
| - <issueId value="MC-17140"/> |
23 |
| - </skip> |
24 | 21 | </annotations>
|
25 | 22 | <before>
|
26 |
| - <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
27 | 23 | <!--Create category-->
|
28 |
| - <comment userInput="Create category" stepKey="commentCreateCategory"/> |
29 | 24 | <createData entity="ApiCategory" stepKey="createCategory"/>
|
30 |
| - <!-- Create two product --> |
31 |
| - <comment userInput="Create two product" stepKey="commentCreateTwoProduct"/> |
| 25 | + <!-- Create two products --> |
32 | 26 | <createData entity="SimpleProduct2" stepKey="createFirstProduct"/>
|
| 27 | + <updateData entity="ProductWithTwoTextFieldOptions" createDataKey="createFirstProduct" stepKey="updateFirstProductWithCustomOptions"> |
| 28 | + <requiredEntity createDataKey="createFirstProduct"/> |
| 29 | + </updateData> |
33 | 30 | <createData entity="ApiSimpleProduct" stepKey="createSecondProduct">
|
34 | 31 | <requiredEntity createDataKey="createCategory"/>
|
35 | 32 | </createData>
|
| 33 | + |
| 34 | + <!-- TODO: REMOVE AFTER FIX MC-21717 --> |
| 35 | + <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
| 36 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 37 | + |
| 38 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
36 | 39 | </before>
|
37 | 40 | <after>
|
| 41 | + <!--Delete created data--> |
| 42 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 43 | + <deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/> |
38 | 44 | <!--Delete second product with changed sku-->
|
39 |
| - <comment userInput="Delete second product with changed sku" stepKey="commentDeleteProduct"/> |
40 | 45 | <actionGroup ref="deleteProductBySku" stepKey="deleteSecondProduct">
|
41 | 46 | <argument name="sku" value="$$createFirstProduct.sku$$-1"/>
|
42 | 47 | </actionGroup>
|
43 |
| - <!--Delete created data--> |
44 |
| - <comment userInput="Delete created data" stepKey="commentDeleteCreatedData"/> |
45 |
| - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
46 |
| - <deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/> |
| 48 | + <actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearProductGridFilter"/> |
47 | 49 | <actionGroup ref="logout" stepKey="logoutOfAdmin"/>
|
48 | 50 | </after>
|
49 |
| - <!--Go to product page --> |
50 |
| - <comment userInput="Go to product page" stepKey="commentGoToProductPage"/> |
51 |
| - <amOnPage url="{{AdminProductEditPage.url($$createFirstProduct.id$$)}}" stepKey="goToProductEditPage"/> |
52 |
| - <waitForPageLoad stepKey="waitForProductEditPageLoad"/> |
53 |
| - <actionGroup ref="AddProductCustomOptionField" stepKey="addCutomOption1"> |
54 |
| - <argument name="option" value="ProductOptionField"/> |
55 |
| - </actionGroup> |
56 |
| - <actionGroup ref="AddProductCustomOptionField" stepKey="addCutomOption2"> |
57 |
| - <argument name="option" value="ProductOptionField2"/> |
58 |
| - </actionGroup> |
59 |
| - <actionGroup ref="saveProductForm" stepKey="saveProduct"/> |
60 | 51 | <!--Change second product sku to first product sku-->
|
61 |
| - <comment userInput="Change second product sku to first product sku" stepKey="commentChangeSecondProduct"/> |
62 | 52 | <amOnPage url="{{AdminProductEditPage.url($$createSecondProduct.id$$)}}" stepKey="goToProductEditPage1"/>
|
63 | 53 | <waitForPageLoad stepKey="waitForProductEditPageLoad1"/>
|
64 | 54 | <fillField selector="{{AdminProductFormSection.productSku}}" userInput="$$createFirstProduct.sku$$" stepKey="fillProductSku1"/>
|
65 | 55 | <!--Import customizable options and check-->
|
66 |
| - <comment userInput="Import customizable options and check" stepKey="commentImportOptions"/> |
67 | 56 | <conditionalClick selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" dependentSelector="{{AdminProductCustomizableOptionsSection.addOptionBtn}}" visible="false" stepKey="openCustomOptionSection"/>
|
68 | 57 | <actionGroup ref="importProductCustomizableOptions" stepKey="importOptions">
|
69 | 58 | <argument name="productName" value="$$createFirstProduct.name$$"/>
|
|
77 | 66 | <argument name="optionIndex" value="1"/>
|
78 | 67 | </actionGroup>
|
79 | 68 | <!--Save product and check sku changed message-->
|
80 |
| - <comment userInput="Save product and check sku changed message" stepKey="commentSAveProductAndCheck"/> |
81 |
| - <actionGroup ref="saveProductForm" stepKey="saveProduct1"/> |
82 |
| - <see userInput="SKU for product $$createSecondProduct.name$$ has been changed to $$createFirstProduct.sku$$-1." stepKey="seeSkuChangedMessage"/> |
| 69 | + <actionGroup ref="saveProductForm" stepKey="saveSecondProduct"/> |
| 70 | + <see selector="{{AdminMessagesSection.notice}}" userInput="SKU for product $$createSecondProduct.name$$ has been changed to $$createFirstProduct.sku$$-1." stepKey="seeSkuChangedMessage"/> |
83 | 71 | </test>
|
84 | 72 | </tests>
|
0 commit comments