|
5 | 5 | * See COPYING.txt for license details.
|
6 | 6 | */
|
7 | 7 | -->
|
| 8 | + |
8 | 9 | <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
9 | 10 | xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
|
10 | 11 | <test name="AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest">
|
|
17 | 18 | <severity value="CRITICAL"/>
|
18 | 19 | <group value="mtf_migrated"/>
|
19 | 20 | </annotations>
|
| 21 | + |
20 | 22 | <before>
|
21 | 23 | <!-- Create a multiple select product attribute with two options -->
|
22 |
| - <createData entity="productAttributeMultiSelectTwoOptionsNotSearchable" stepKey="attribute"/> |
| 24 | + <createData entity="productAttributeMultiselectTwoOptionsNotSearchable" stepKey="attribute"/> |
23 | 25 | <createData entity="productAttributeOption1" stepKey="option1">
|
24 | 26 | <requiredEntity createDataKey="attribute"/>
|
25 | 27 | </createData>
|
26 | 28 | <createData entity="productAttributeOption2" stepKey="option2">
|
27 | 29 | <requiredEntity createDataKey="attribute"/>
|
28 | 30 | </createData>
|
| 31 | + |
29 | 32 | <!-- Create product attribute set -->
|
30 | 33 | <createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/>
|
31 | 34 | <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
|
32 | 35 | </before>
|
| 36 | + <after> |
| 37 | + <actionGroup ref="logout" stepKey="logout"/> |
| 38 | + </after> |
| 39 | + |
33 | 40 | <!-- Filter product attribute set by attribute set name -->
|
34 | 41 | <amOnPage url="{{AdminProductAttributeSetGridPage.url}}" stepKey="amOnAttributeSetPage"/>
|
35 | 42 | <actionGroup ref="FilterProductAttributeSetGridByAttributeSetName" stepKey="filterProductAttrSetGridByAttrSetName">
|
36 | 43 | <argument name="name" value="$$createAttributeSet.attribute_set_name$$"/>
|
37 | 44 | </actionGroup>
|
| 45 | + |
38 | 46 | <!-- Assert created attribute in an unassigned attributes -->
|
39 | 47 | <see userInput="$$attribute.attribute_code$$" selector="{{AdminProductAttributeSetEditSection.unassignedAttributesTree}}" stepKey="seeAttributeInUnassignedAttr"/>
|
| 48 | + |
40 | 49 | <!-- Assign attribute in the group -->
|
41 | 50 | <actionGroup ref="AssignAttributeToGroup" stepKey="assignAttributeToGroup">
|
42 | 51 | <argument name="group" value="Product Details"/>
|
43 | 52 | <argument name="attribute" value="$$attribute.attribute_code$$"/>
|
44 | 53 | </actionGroup>
|
45 | 54 | <see userInput="$$attribute.attribute_code$$" selector="{{AdminProductAttributeSetEditSection.groupTree}}" stepKey="seeAttributeInGroup"/>
|
46 | 55 | <actionGroup ref="SaveAttributeSet" stepKey="saveAttributeSet"/>
|
| 56 | + |
47 | 57 | <!-- Go to Product Attribute Grid page -->
|
48 | 58 | <amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttributeGrid"/>
|
49 | 59 | <fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="$$attribute.attribute_code$$" stepKey="fillAttrCodeField" />
|
50 | 60 | <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="clickSearchBtn" />
|
51 | 61 | <click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="chooseFirstRow" />
|
| 62 | + |
52 | 63 | <!-- Change attribute property: Frontend Label -->
|
53 | 64 | <fillField selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="{{productDropDownAttribute.attribute_code}}" stepKey="fillDefaultLabel"/>
|
| 65 | + |
54 | 66 | <!-- Change attribute property: Use in Search >Yes -->
|
55 | 67 | <scrollToTopOfPage stepKey="scrollToTabs"/>
|
56 | 68 | <click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="clickStorefrontPropertiesTab"/>
|
57 | 69 | <waitForElementVisible selector="{{AdvancedAttributePropertiesSection.UseInSearch}}" stepKey="waitTabLoad"/>
|
58 | 70 | <selectOption selector="{{AdvancedAttributePropertiesSection.UseInSearch}}" userInput="Yes" stepKey="seeInSearch"/>
|
| 71 | + |
59 | 72 | <!-- Change attribute property: Visible In Advanced Search >No -->
|
60 | 73 | <waitForElementVisible selector="{{AdvancedAttributePropertiesSection.VisibleInAdvancedSearch}}" stepKey="waitTabLoad2"/>
|
61 | 74 | <selectOption selector="{{AdvancedAttributePropertiesSection.VisibleInAdvancedSearch}}" userInput="No" stepKey="dontSeeInAdvancedSearch"/>
|
| 75 | + |
62 | 76 | <!-- Save the new product attributes -->
|
63 | 77 | <click selector="{{AttributePropertiesSection.Save}}" stepKey="clickSave"/>
|
64 | 78 | <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSuccessMessage"/>
|
| 79 | + |
65 | 80 | <!-- Flash cache -->
|
66 | 81 | <magentoCLI command="cache:flush" stepKey="flushCache"/>
|
| 82 | + |
67 | 83 | <!-- Go to store's advanced catalog search page -->
|
68 | 84 | <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/>
|
69 | 85 | <dontSeeElement selector="{{StorefrontCatalogSearchAdvancedFormSection.AttributeByCode('$$attribute.attribute_code$$')}}" stepKey="dontSeeAttribute"/>
|
|
0 commit comments