|
17 | 17 | <testCaseId value="MC-11296"/>
|
18 | 18 | <group value="catalog"/>
|
19 | 19 | </annotations>
|
| 20 | + |
20 | 21 | <before>
|
21 | 22 | <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
|
| 23 | + <createData entity="defaultSimpleProduct" stepKey="simpleProduct"/> |
| 24 | + <createData entity="_defaultCategory" stepKey="createAnchoredCategory1"/> |
| 25 | + <createData entity="_defaultCategory" stepKey="createSecondCategory"/> |
22 | 26 |
|
23 | 27 | <!-- Switch "Category Product" and "Product Category" indexers to "Update by Schedule" mode -->
|
24 | 28 | <amOnPage url="{{AdminIndexManagementPage.url}}" stepKey="onIndexManagement"/>
|
|
30 | 34 | <actionGroup ref="AdminSwitchIndexerToActionModeActionGroup" stepKey="switchProductCategory">
|
31 | 35 | <argument name="indexerValue" value="catalog_product_category"/>
|
32 | 36 | </actionGroup>
|
33 |
| - |
34 |
| - <!-- Create the anchored category <Cat1_anchored> --> |
35 |
| - <createData entity="_defaultCategory" stepKey="createAnchoredCategory1"/> |
36 |
| - <actionGroup ref="AdminAnchorCategoryActionGroup" stepKey="anchorCategory"> |
37 |
| - <argument name="categoryName" value="$$createAnchoredCategory1.name$$"/> |
38 |
| - </actionGroup> |
39 |
| - |
40 |
| - <!-- Create subcategory <Sub1> of the anchored category --> |
41 |
| - <click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategoryButton"/> |
42 |
| - <fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{SimpleSubCategory.name}}" stepKey="addSubCategoryName"/> |
43 |
| - <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveSubCategory1"/> |
44 |
| - <waitForPageLoad stepKey="waitForSecondCategoryToSave"/> |
45 |
| - <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/> |
46 |
| - |
47 |
| - <!-- Assign <product1> to the <Sub1> --> |
48 |
| - <createData entity="defaultSimpleProduct" stepKey="simpleProduct"/> |
49 |
| - |
50 |
| - <amOnPage url="{{AdminProductEditPage.url($$simpleProduct.id$$)}}" stepKey="goToProduct"/> |
51 |
| - <waitForPageLoad stepKey="waitForProductPage"/> |
52 |
| - <click selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="activateDropDown"/> |
53 |
| - <fillField userInput="{{SimpleSubCategory.name}}" selector="{{AdminProductFormSection.searchCategory}}" stepKey="fillSearchField"/> |
54 |
| - <waitForPageLoad stepKey="waitForSearchSubCategory"/> |
55 |
| - <click selector="{{AdminProductFormSection.selectCategory(SimpleSubCategory.name)}}" stepKey="selectSubCategory"/> |
56 |
| - <click selector="{{AdminProductFormSection.done}}" stepKey="clickButtonDone"/> |
57 |
| - <waitForPageLoad stepKey="waitForCategoryApply"/> |
58 |
| - <click selector="{{AdminProductFormSection.save}}" stepKey="clickButtonSave"/> |
59 |
| - <waitForPageLoad stepKey="waitForSave"/> |
60 |
| - |
61 |
| - <!-- Create another non-anchored category <Cat2> --> |
62 |
| - <createData entity="_defaultCategory" stepKey="createSecondCategory"/> |
63 |
| - |
64 |
| - <!-- Enable `Use Categories Path for Product URLs` on Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization --> |
65 |
| - <amOnPage url="{{AdminCatalogSearchConfigurationPage.url}}" stepKey="onConfigPage"/> |
66 |
| - <waitForPageLoad stepKey="waitForLoading"/> |
67 |
| - <conditionalClick selector="{{AdminCatalogSearchEngineConfigurationSection.searchEngineOptimization}}" dependentSelector="{{AdminCatalogSearchEngineConfigurationSection.openedEngineOptimization}}" visible="false" stepKey="clickEngineOptimization"/> |
68 |
| - <uncheckOption selector="{{AdminCatalogSearchEngineConfigurationSection.systemValueUseCategoriesPath}}" stepKey="uncheckDefault"/> |
69 |
| - <selectOption userInput="Yes" selector="{{AdminCatalogSearchEngineConfigurationSection.selectUseCategoriesPatForProductUrls}}" stepKey="selectYes"/> |
70 |
| - <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> |
71 |
| - <waitForPageLoad stepKey="waitForSaving"/> |
72 |
| - <see selector="{{AdminIndexManagementSection.successMessage}}" userInput="You saved the configuration." stepKey="seeMessage"/> |
73 | 37 | </before>
|
| 38 | + |
74 | 39 | <after>
|
75 | 40 | <!-- Switch "Category Product" and "Product Category" indexers to "Update by Save" mode -->
|
76 | 41 | <amOnPage url="{{AdminIndexManagementPage.url}}" stepKey="onIndexManagement"/>
|
|
90 | 55 | <deleteData createDataKey="createAnchoredCategory1" stepKey="deleteAnchoredCategory1"/>
|
91 | 56 | <actionGroup ref="logout" stepKey="logout"/>
|
92 | 57 | </after>
|
| 58 | + <!-- Create the anchored category <Cat1_anchored> --> |
| 59 | + <actionGroup ref="AdminAnchorCategoryActionGroup" stepKey="anchorCategory"> |
| 60 | + <argument name="categoryName" value="$$createAnchoredCategory1.name$$"/> |
| 61 | + </actionGroup> |
| 62 | + |
| 63 | + <!-- Create subcategory <Sub1> of the anchored category --> |
| 64 | + <click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategoryButton"/> |
| 65 | + <fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{SimpleSubCategory.name}}" stepKey="addSubCategoryName"/> |
| 66 | + <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveSubCategory1"/> |
| 67 | + <waitForPageLoad stepKey="waitForSecondCategoryToSave"/> |
| 68 | + <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSaveSuccessMessage"/> |
| 69 | + |
| 70 | + <!-- Assign <product1> to the <Sub1> --> |
| 71 | + <amOnPage url="{{AdminProductEditPage.url($$simpleProduct.id$$)}}" stepKey="goToProduct"/> |
| 72 | + <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 73 | + <click selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="activateDropDownCategory"/> |
| 74 | + <fillField userInput="{{SimpleSubCategory.name}}" selector="{{AdminProductFormSection.searchCategory}}" stepKey="fillSearch"/> |
| 75 | + <waitForPageLoad stepKey="waitForSubCategory"/> |
| 76 | + <click selector="{{AdminProductFormSection.selectCategory(SimpleSubCategory.name)}}" stepKey="selectSub1Category"/> |
| 77 | + <click selector="{{AdminProductFormSection.done}}" stepKey="clickDone"/> |
| 78 | + <waitForPageLoad stepKey="waitForApplyCategory"/> |
| 79 | + <click selector="{{AdminProductFormSection.save}}" stepKey="clickSave"/> |
| 80 | + <waitForPageLoad stepKey="waitForSavingChanges"/> |
| 81 | + |
| 82 | + <!-- Enable `Use Categories Path for Product URLs` on Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization --> |
| 83 | + <amOnPage url="{{AdminCatalogSearchConfigurationPage.url}}" stepKey="onConfigPage"/> |
| 84 | + <waitForPageLoad stepKey="waitForLoading"/> |
| 85 | + <conditionalClick selector="{{AdminCatalogSearchEngineConfigurationSection.searchEngineOptimization}}" dependentSelector="{{AdminCatalogSearchEngineConfigurationSection.openedEngineOptimization}}" visible="false" stepKey="clickEngineOptimization"/> |
| 86 | + <uncheckOption selector="{{AdminCatalogSearchEngineConfigurationSection.systemValueUseCategoriesPath}}" stepKey="uncheckDefault"/> |
| 87 | + <selectOption userInput="Yes" selector="{{AdminCatalogSearchEngineConfigurationSection.selectUseCategoriesPatForProductUrls}}" stepKey="selectYes"/> |
| 88 | + <click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/> |
| 89 | + <waitForPageLoad stepKey="waitForSaving"/> |
| 90 | + <see selector="{{AdminIndexManagementSection.successMessage}}" userInput="You saved the configuration." stepKey="seeMessage"/> |
93 | 91 |
|
94 | 92 | <!-- Navigate to the Catalog > Products -->
|
95 | 93 | <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="onCatalogProductPage"/>
|
|
107 | 105 | <click selector="{{AdminProductFormSection.unselectCategories(SimpleSubCategory.name)}}" stepKey="removeCategory"/>
|
108 | 106 | <click selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="openDropDown"/>
|
109 | 107 | <checkOption selector="{{AdminProductFormSection.selectCategory($$createSecondCategory.name$$)}}" stepKey="selectCategory"/>
|
110 |
| - <click selector="{{AdminProductFormSection.done}}" stepKey="clickDone"/> |
111 |
| - <waitForPageLoad stepKey="waitForApplyCategory"/> |
112 |
| - <click selector="{{AdminProductFormSection.save}}" stepKey="clickSave"/> |
| 108 | + <click selector="{{AdminProductFormSection.done}}" stepKey="pressButtonDone"/> |
| 109 | + <waitForPageLoad stepKey="waitForApplyCategory2"/> |
| 110 | + <click selector="{{AdminProductFormSection.save}}" stepKey="pushButtonSave"/> |
113 | 111 | <waitForPageLoad stepKey="waitForSavingProduct"/>
|
114 | 112 |
|
115 | 113 | <!--Product is saved -->
|
|
183 | 181 | <click selector="{{AdminProductFormSection.done}}" stepKey="clickButtonDone"/>
|
184 | 182 | <waitForPageLoad stepKey="waitForCategoryApply"/>
|
185 | 183 | <click selector="{{AdminProductFormSection.save}}" stepKey="clickButtonSave"/>
|
186 |
| - <waitForPageLoad stepKey="waitForSaving"/> |
| 184 | + <waitForPageLoad stepKey="waitForSaveChanges"/> |
187 | 185 |
|
188 | 186 | <!-- Product is saved successfully -->
|
189 | 187 | <see userInput="You saved the product." selector="{{CatalogProductsSection.messageSuccessSavedProduct}}" stepKey="seeSaveMessage"/>
|
|
0 commit comments