File tree Expand file tree Collapse file tree 5 files changed +29
-32
lines changed
dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog Expand file tree Collapse file tree 5 files changed +29
-32
lines changed Original file line number Diff line number Diff line change 123
123
<actionGroup name =" FillNewProductCategory" >
124
124
<arguments >
125
125
<argument name =" categoryName" defaultValue =" Test Category" type =" string" />
126
+ <argument name =" parentCategoryName" defaultValue =" default" type =" string" />
126
127
</arguments >
127
128
128
129
<!-- Click on new Category -->
129
- <click stepKey =" clickNewCategory" selector =" {{AdminProductCategoryCreationSection.newCategory}}" />
130
+ <click stepKey =" clickNewCategory" selector =" {{AdminProductCategoryCreationSection.newCategory}}" />
130
131
<waitForPageLoad stepKey =" waitForFieldSet" />
131
132
132
- <fillField stepKey =" fillCategoryName" selector =" {{AdminProductCategoryCreationSection.nameInput}}" userInput =" {{categoryName}}" />
133
+ <fillField stepKey =" fillCategoryName" selector =" {{AdminProductCategoryCreationSection.nameInput}}" userInput =" {{categoryName}}" />
133
134
134
- <click stepKey =" clickParentCategory" selector =" {{AdminProductCategoryCreationSection.parentCategory}}" />
135
+ <!-- Search and select a parent catagory for the product -->
136
+ <click stepKey =" clickParentCategory" selector =" {{AdminProductCategoryCreationSection.parentCategory}}" />
135
137
<waitForPageLoad stepKey =" waitForDropDownVisible" />
138
+ <fillField stepKey =" searchForParent" userInput =" {{parentCategoryName}}" selector =" {{AdminProductCategoryCreationSection.parentSearch}}" />
139
+ <waitForPageLoad stepKey =" waitForFieldResults" />
140
+ <click stepKey =" clickParent" selector =" {{AdminProductCategoryCreationSection.parentSearchResult}}" />
136
141
137
- <click stepKey =" clickDefaultParentCategory" selector =" {{AdminProductCategoryCreationSection.parentCategoryDropdownDefaultOption}}" />
138
-
139
- <click stepKey =" createCategory" selector =" {{AdminProductCategoryCreationSection.createCategory}}" />
140
-
142
+ <click stepKey =" createCategory" selector =" {{AdminProductCategoryCreationSection.createCategory}}" />
141
143
<waitForPageLoad stepKey =" waitForCategoryCreated" />
142
-
143
144
</actionGroup >
144
145
145
146
<!-- Actions to delete the category last made -->
Original file line number Diff line number Diff line change 20
20
<argument name =" productOption2" />
21
21
</arguments >
22
22
23
- <!-- opens the custom option panel and clicks add options -->
24
- <click stepKey =" openCustomizableOptions" selector =" {{AdminProductCustomizableOptionsSection.customezableOptions}}" />
25
- <waitForPageLoad stepKey =" waitForCustomOptionsOpen" />
26
-
27
23
<click stepKey =" clickAddOptions" selector =" {{AdminProductCustomizableOptionsSection.addOptionBtn}}" />
28
24
<waitForPageLoad stepKey =" waitForAddProductPageLoad" />
29
25
30
26
<!-- Fill in the option and select the type of radio (once) -->
31
27
<fillField stepKey =" fillInOptionTitle" selector =" {{AdminProductCustomizableOptionsSection.lastOptionTitle}}" userInput =" {{customOptionName}}" />
32
28
<click stepKey =" clickOptionTypeParent" selector =" {{AdminProductCustomizableOptionsSection.lastOptionTypeParent}}" />
29
+ <waitForPageLoad stepKey =" waitForDropdownOpen" />
33
30
<click stepKey =" clickOptionType" selector =" {{AdminProductCustomizableOptionsSection.optionType('Radio Buttons')}}" />
34
31
35
32
<!-- Add three radio options based on the parameter -->
43
40
<fillField stepKey =" fillInValueTitle2" selector =" {{AdminProductCustomizableOptionsSection.valueTitle}}" userInput =" {{productOption2.title}}" />
44
41
<fillField stepKey =" fillInValuePrice2" selector =" {{AdminProductCustomizableOptionsSection.valuePrice}}" userInput =" {{productOption2.price}}" />
45
42
46
- <!-- close the custom option dropdown -->
47
- <click stepKey =" closeCustomizableOptions" selector =" {{AdminProductCustomizableOptionsSection.customezableOptions}}" />
48
- <waitForPageLoad stepKey =" waitForCustomOptionsClose" />
49
43
50
44
</actionGroup >
51
45
Original file line number Diff line number Diff line change 9
9
<sections xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
10
xsi : noNamespaceSchemaLocation =" ../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd" >
11
11
<section name =" AdminProductCategoryCreationSection" >
12
- <element name =" firstExampleProduct" type =" button" selector =" .data-row:nth-of-type(1)" />
13
- <element name =" newCategory" type =" button" selector =" //button/span[text()='New Category']" />
14
-
15
- <element name =" nameInput" type =" input" selector =" input[name='name']" />
16
-
17
- <element name =" parentCategory" type =" block" selector =" .product_form_product_form_create_category_modal div[data-role='selected-option']" />
18
- <element name =" parentCategoryDropdownDefaultOption" type =" block" selector =" .product_form_product_form_create_category_modal .action-menu-item._expended .admin__action-multiselect-label" />
19
- <element name =" createCategory" type =" button" selector =" #save" />
12
+ <element name =" firstExampleProduct" type =" button" selector =" .data-row:nth-of-type(1)" />
13
+ <element name =" newCategory" type =" button" selector =" //button/span[text()='New Category']" />
20
14
15
+ <element name =" nameInput" type =" input" selector =" input[name='name']" />
21
16
17
+ <element name =" parentCategory" type =" block" selector =" .product_form_product_form_create_category_modal div[data-role='selected-option']" />
18
+ <element name =" parentSearch" type =" input" selector =" aside input[data-role='advanced-select-text']" />
19
+ <element name =" parentSearchResult" type =" block" selector =" aside .admin__action-multiselect-menu-inner" />
20
+ <element name =" createCategory" type =" button" selector =" #save" />
22
21
</section >
23
22
</sections >
Original file line number Diff line number Diff line change 13
13
<features value =" Catalog" />
14
14
<stories value =" Create/Edit Category in Admin" />
15
15
<description value =" Admin should be able to create category from the product page" />
16
- <severity value =" AVERAGE" />
17
- <testCaseId value =" MC-234" />
18
- <group value =" Catalog " />
16
+ <severity value =" AVERAGE" />
17
+ <testCaseId value =" MC-234" />
18
+ <group value =" Levi " />
19
19
</annotations >
20
20
<before >
21
21
<!-- Login as admin -->
22
- <createData entity =" SimpleTwo" stepKey =" simpleProduct" />
22
+ <createData entity =" SimpleTwo" stepKey =" simpleProduct" />
23
23
<actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
24
24
</before >
25
25
26
26
<after >
27
27
<!-- Delete the created category -->
28
- <actionGroup ref =" DeleteMostRecentCategory" stepKey =" getRidOfCreatedCategory" />
28
+ <actionGroup ref =" DeleteMostRecentCategory" stepKey =" getRidOfCreatedCategory" />
29
29
<amOnPage url =" {{AdminLogoutPage.url}}" stepKey =" amOnLogoutPage" />
30
30
<deleteData createDataKey =" simpleProduct" stepKey =" deleteProduct" />
31
31
</after >
43
43
44
44
<!-- Fill out the form for the new category -->
45
45
<actionGroup ref =" FillNewProductCategory" stepKey =" FillNewProductCategory" >
46
- <argument name =" categoryName" value =" {{_defaultCategory.name}}" />
46
+ <argument name =" categoryName" value =" {{_defaultCategory.name}}" />
47
47
</actionGroup >
48
48
49
49
<!-- Check that category was created -->
50
50
<actionGroup ref =" CategoryPresent" stepKey =" checkIfCategoryPresent" >
51
- <argument name =" categoryName" value =" {{_defaultCategory.name}}" />
51
+ <argument name =" categoryName" value =" {{_defaultCategory.name}}" />
52
52
</actionGroup >
53
53
54
54
</test >
Original file line number Diff line number Diff line change 16
16
<description value =" Admin should be able to create simple product with two custom options" />
17
17
<severity value =" AVERAGE" />
18
18
<testCaseId value =" MC-248" />
19
- <group value =" Catalog " />
19
+ <group value =" Levi " />
20
20
</annotations >
21
21
<before >
22
22
<!-- log in as admin -->
39
39
</actionGroup >
40
40
<amOnPage url =" {{AdminLogoutPage.url}}" stepKey =" amOnLogoutPage" />
41
41
</after >
42
- <!-- ADD TEST STEPS HERE -->
42
+
43
+ <!-- opens the custom option panel and clicks add options -->
44
+ <click stepKey =" openCustomizableOptions" selector =" {{AdminProductCustomizableOptionsSection.customezableOptions}}" />
45
+ <waitForPageLoad stepKey =" waitForCustomOptionsOpen" />
43
46
44
47
<!-- Create a custom option with 2 values -->
45
48
<actionGroup ref =" CreateCustomRadioOptions" stepKey =" createCustomOption1" >
You can’t perform that action at this time.
0 commit comments