|
8 | 8 |
|
9 | 9 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
10 | 10 | xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
|
11 |
| - <test name="AdminCreateConfigurableProductTest"> |
| 11 | + |
| 12 | + |
| 13 | + <test name="AdminCreateTest"> |
12 | 14 | <annotations>
|
13 |
| - <features value="Product Creation"/> |
14 |
| - <stories value="Create a Configurable Product via the Admin"/> |
15 |
| - <title value="Create a Configurable Product via the Admin."/> |
16 |
| - <description value="You should be able to create a Configurable Product via the Admin."/> |
| 15 | + <features value="ConfigurableProduct"/> |
| 16 | + <stories value="Create, Read, Update, Delete"/> |
| 17 | + <title value="admin should be able to create a configurable product with attributes"/> |
| 18 | + <description value="admin should be able to create a configurable product with attributes"/> |
17 | 19 | <severity value="CRITICAL"/>
|
18 |
| - <testCaseId value="MAGETWO-26041"/> |
| 20 | + <testCaseId value="MAGETWO-89941"/> |
19 | 21 | <group value="configurable"/>
|
20 | 22 | <group value="product"/>
|
21 |
| - <!-- Skipped, see https://jira.corp.magento.com/browse/MQE-889 --> |
22 |
| - <group value="skip"/> |
23 | 23 | </annotations>
|
| 24 | + |
24 | 25 | <before>
|
| 26 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
25 | 27 | <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
|
26 | 28 | </before>
|
| 29 | + |
27 | 30 | <after>
|
| 31 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
28 | 32 | <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/>
|
29 | 33 | </after>
|
30 | 34 |
|
31 |
| - <amOnPage url="{{AdminCategoryPage.url}}" stepKey="amOnCategoryGridPage"/> |
32 |
| - <waitForPageLoad time="30" stepKey="waitForPageLoad1"/> |
33 |
| - |
34 |
| - <click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/> |
35 |
| - <fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name}}" stepKey="enterCategoryName"/> |
36 |
| - <click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="clickOnSeoSection"/> |
37 |
| - <fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{_defaultCategory.name_lwr}}" stepKey="enterUrlKey"/> |
38 |
| - <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="clickOnSaveCategory"/> |
39 |
| - <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage"/> |
40 |
| - |
| 35 | + <!-- fill in basic configurable product values --> |
41 | 36 | <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductGridPage"/>
|
42 | 37 | <waitForPageLoad time="30" stepKey="waitForPageLoad2"/>
|
43 | 38 | <click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickOnAddProductToggle"/>
|
|
46 | 41 | <fillField userInput="{{_defaultProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillSKU"/>
|
47 | 42 | <fillField userInput="{{_defaultProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/>
|
48 | 43 | <fillField userInput="{{_defaultProduct.quantity}}" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillQuantity"/>
|
49 |
| - <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{_defaultCategory.name}}]" stepKey="searchAndSelectCategory"/> |
| 44 | + <searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[$$createCategory.name$$]" stepKey="searchAndSelectCategory"/> |
50 | 45 | <click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/>
|
51 | 46 | <fillField userInput="{{_defaultProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/>
|
52 | 47 |
|
| 48 | + <!-- create color configurations --> |
53 | 49 | <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnCreateConfigurations"/>
|
54 | 50 | <click selector="{{AdminCreateProductConfigurationsPanel.createNewAttribute}}" stepKey="clickOnNewAttribute"/>
|
| 51 | + <waitForPageLoad stepKey="waitForIFrame"/> |
55 | 52 | <switchToIFrame selector="{{AdminNewAttributePanel.newAttributeIFrame}}" stepKey="switchToNewAttributeIFrame"/>
|
56 | 53 | <fillField selector="{{AdminNewAttributePanel.defaultLabel}}" userInput="{{colorProductAttribute.default_label}}" stepKey="fillDefaultLabel"/>
|
57 | 54 | <click selector="{{AdminNewAttributePanel.saveAttribute}}" stepKey="clickOnNewAttributePanel"/>
|
58 |
| - |
59 | 55 | <switchToIFrame stepKey="switchOutOfIFrame"/>
|
| 56 | + <waitForPageLoad stepKey="waitForFilters"/> |
60 | 57 | <click selector="{{AdminCreateProductConfigurationsPanel.filters}}" stepKey="clickOnFilters"/>
|
61 | 58 | <fillField userInput="{{colorProductAttribute.default_label}}" selector="{{AdminCreateProductConfigurationsPanel.attributeCode}}" stepKey="fillFilterAttributeCodeField"/>
|
62 | 59 | <click selector="{{AdminCreateProductConfigurationsPanel.applyFilters}}" stepKey="clickApplyFiltersButton"/>
|
63 | 60 | <click selector="{{AdminCreateProductConfigurationsPanel.firstCheckbox}}" stepKey="clickOnFirstCheckbox"/>
|
64 | 61 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton1"/>
|
65 |
| - |
66 | 62 | <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="clickOnCreateNewValue1"/>
|
67 | 63 | <fillField userInput="{{colorProductAttribute1.name}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="fillFieldForNewAttribute1"/>
|
68 | 64 | <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="clickOnSaveNewAttribute1"/>
|
69 |
| - |
70 | 65 | <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="clickOnCreateNewValue2"/>
|
71 | 66 | <fillField userInput="{{colorProductAttribute2.name}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="fillFieldForNewAttribute2"/>
|
72 | 67 | <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="clickOnSaveNewAttribute2"/>
|
73 |
| - |
74 | 68 | <click selector="{{AdminCreateProductConfigurationsPanel.createNewValue}}" stepKey="clickOnCreateNewValue3"/>
|
75 | 69 | <fillField userInput="{{colorProductAttribute3.name}}" selector="{{AdminCreateProductConfigurationsPanel.attributeName}}" stepKey="fillFieldForNewAttribute3"/>
|
76 | 70 | <click selector="{{AdminCreateProductConfigurationsPanel.saveAttribute}}" stepKey="clickOnSaveNewAttribute3"/>
|
77 |
| - |
78 | 71 | <click selector="{{AdminCreateProductConfigurationsPanel.selectAll}}" stepKey="clickOnSelectAll"/>
|
79 | 72 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton2"/>
|
80 |
| - |
81 | 73 | <click selector="{{AdminCreateProductConfigurationsPanel.applyUniquePricesByAttributeToEachSku}}" stepKey="clickOnApplyUniquePricesByAttributeToEachSku"/>
|
82 | 74 | <selectOption selector="{{AdminCreateProductConfigurationsPanel.selectAttribute}}" userInput="{{colorProductAttribute.default_label}}" stepKey="selectAttributes"/>
|
83 | 75 | <fillField selector="{{AdminCreateProductConfigurationsPanel.attribute1}}" userInput="{{colorProductAttribute1.price}}" stepKey="fillAttributePrice1"/>
|
84 | 76 | <fillField selector="{{AdminCreateProductConfigurationsPanel.attribute2}}" userInput="{{colorProductAttribute2.price}}" stepKey="fillAttributePrice2"/>
|
85 | 77 | <fillField selector="{{AdminCreateProductConfigurationsPanel.attribute3}}" userInput="{{colorProductAttribute3.price}}" stepKey="fillAttributePrice3"/>
|
86 |
| - |
87 | 78 | <click selector="{{AdminCreateProductConfigurationsPanel.applySingleQuantityToEachSkus}}" stepKey="clickOnApplySingleQuantityToEachSku"/>
|
88 | 79 | <fillField selector="{{AdminCreateProductConfigurationsPanel.quantity}}" userInput="1" stepKey="enterAttributeQuantity"/>
|
89 | 80 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton3"/>
|
90 | 81 | <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButton4"/>
|
91 |
| - |
92 | 82 | <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton2"/>
|
93 | 83 | <click selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" stepKey="clickOnConfirmInPopup"/>
|
94 |
| - |
95 | 84 | <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessage"/>
|
96 | 85 | <seeInTitle userInput="{{_defaultProduct.name}}" stepKey="seeProductNameInTitle"/>
|
97 | 86 |
|
| 87 | + <!-- assert color configurations on the admin create product page --> |
98 | 88 | <seeNumberOfElements selector="{{AdminProductFormConfigurationsSection.currentVariationsRows}}" userInput="3" stepKey="seeNumberOfRows"/>
|
99 | 89 | <see selector="{{AdminProductFormConfigurationsSection.currentVariationsNameCells}}" userInput="{{colorProductAttribute1.name}}" stepKey="seeAttributeName1InField"/>
|
100 | 90 | <see selector="{{AdminProductFormConfigurationsSection.currentVariationsNameCells}}" userInput="{{colorProductAttribute2.name}}" stepKey="seeAttributeName2InField"/>
|
|
107 | 97 | <see selector="{{AdminProductFormConfigurationsSection.currentVariationsPriceCells}}" userInput="{{colorProductAttribute3.price}}" stepKey="seeUniquePrice3InField"/>
|
108 | 98 | <see selector="{{AdminProductFormConfigurationsSection.currentVariationsQuantityCells}}" userInput="{{colorProductAttribute.attribute_quantity}}" stepKey="seeQuantityInField"/>
|
109 | 99 |
|
| 100 | + <!-- assert storefront category list page --> |
110 | 101 | <amOnPage url="/" stepKey="amOnStorefront"/>
|
111 |
| - <waitForPageLoad time="30" stepKey="waitForPageLoad3"/> |
112 |
| - |
113 |
| - <click userInput="{{_defaultCategory.name}}" stepKey="clickOnCategoryName"/> |
114 |
| - <waitForPageLoad time="30" stepKey="waitForPageLoad4"/> |
115 |
| - |
| 102 | + <waitForPageLoad stepKey="waitForPageLoad3"/> |
| 103 | + <click userInput="$$createCategory.name$$" stepKey="clickOnCategoryName"/> |
| 104 | + <waitForPageLoad stepKey="waitForPageLoad4"/> |
116 | 105 | <see userInput="{{_defaultProduct.name}}" stepKey="assertProductPresent"/>
|
117 | 106 | <see userInput="{{colorProductAttribute1.price}}" stepKey="assertProductPricePresent"/>
|
118 |
| - <click userInput="{{_defaultProduct.name}}" stepKey="clickOnProductName"/> |
119 |
| - <waitForPageLoad time="30" stepKey="waitForPageLoad5"/> |
120 | 107 |
|
| 108 | + <!-- assert storefront product details page --> |
| 109 | + <click userInput="{{_defaultProduct.name}}" stepKey="clickOnProductName"/> |
| 110 | + <waitForPageLoad stepKey="waitForPageLoad5"/> |
121 | 111 | <seeInTitle userInput="{{_defaultProduct.name}}" stepKey="assertProductNameTitle"/>
|
122 | 112 | <see userInput="{{_defaultProduct.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/>
|
123 | 113 | <see userInput="{{colorProductAttribute1.price}}" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="assertProductPrice"/>
|
124 | 114 | <see userInput="{{_defaultProduct.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/>
|
125 |
| - |
126 | 115 | <see selector="{{StorefrontProductInfoMainSection.productAttributeTitle1}}" userInput="{{colorProductAttribute.default_label}}" stepKey="seeColorAttributeName1"/>
|
127 | 116 | <see selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="{{colorProductAttribute1.name}}" stepKey="seeInDropDown1"/>
|
128 | 117 | <see selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="{{colorProductAttribute2.name}}" stepKey="seeInDropDown2"/>
|
129 | 118 | <see selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="{{colorProductAttribute3.name}}" stepKey="seeInDropDown3"/>
|
130 | 119 | </test>
|
| 120 | + |
| 121 | + |
131 | 122 | </tests>
|
0 commit comments