|
25 | 25 | <!--Create Category-->
|
26 | 26 | <createData entity="SimpleSubCategory" stepKey="createCategory"/>
|
27 | 27 |
|
28 |
| - <!--Create Simple Product--> |
29 |
| - <createData entity="SimpleProduct" stepKey="createSimpleProduct"> |
30 |
| - <requiredEntity createDataKey="createCategory"/> |
31 |
| - </createData> |
32 | 28 | </before>
|
33 | 29 | <after>
|
34 |
| - <!--Delete created entity --> |
35 |
| - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 30 | + <!--Delete created entity |
| 31 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> --> |
36 | 32 |
|
37 |
| - <!--<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>--> |
38 |
| - <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteCreatedAttribute"> |
39 |
| - <argument name="ProductAttribute" value="newProductAttribute"/> |
40 |
| - </actionGroup> |
| 33 | + <!-- <actionGroup ref="DeleteProductAttributeActionGroup" stepKey="deleteCreatedAttribute"> |
| 34 | + <argument name="ProductAttribute" value="newProductAttribute"/> |
| 35 | + </actionGroup> --> |
41 | 36 |
|
42 | 37 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
|
43 | 38 | </after>
|
44 | 39 |
|
45 |
| - <!-- Open Product Index Page--> |
46 |
| - <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/> |
47 |
| - |
48 |
| - <!-- Select Created Product--> |
49 |
| - <actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProductGridBySku"> |
50 |
| - <argument name="product" value="$$createSimpleProduct$$"/> |
| 40 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="openProductIndexPage"/> |
| 41 | + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="navigateToCreateProductPage"> |
| 42 | + <argument name="product" value="SimpleProduct"/> |
51 | 43 | </actionGroup>
|
52 |
| - <click stepKey="openFirstProduct" selector="{{AdminProductGridSection.productRowBySku($$createSimpleProduct.sku$$)}}"/> |
53 |
| - <waitForPageLoad stepKey="waitForProductToLoad"/> |
54 |
| - |
55 |
| - <fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="fillProductQty"/> |
56 |
| - <actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectStockStatus"> |
57 |
| - <argument name="stockStatus" value="In Stock"/> |
| 44 | + <actionGroup ref="FillMainProductFormActionGroup" stepKey="fillProductForm"> |
| 45 | + <argument name="product" value="SimpleProduct"/> |
| 46 | + </actionGroup> |
| 47 | + <actionGroup ref="SetCategoryByNameActionGroup" stepKey="addCategoryToProduct"> |
| 48 | + <argument name="categoryName" value="$createCategory.name$"/> |
58 | 49 | </actionGroup>
|
59 | 50 |
|
60 |
| - <!-- Create New Product Attribute --> |
61 |
| - <actionGroup ref="AddProductAttributeActionGroup" stepKey="createattribute"/> |
| 51 | + <!-- Step 6 --> |
| 52 | + <click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/> |
| 53 | + <waitForPageLoad stepKey="waitForAttributePageToLoad"/> |
| 54 | + <click selector="{{AdminProductFormSection.createNewAttributeBtn}}" stepKey="clickCreateNewAttributeButton"/> |
| 55 | + <waitForPageLoad stepKey="waitForNewAttributePageToLoad"/> |
| 56 | + <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" stepKey="waitForDefaultLabelToBeVisible"/> |
| 57 | + <fillField selector="{{AdminCreateNewProductAttributeSection.defaultLabel}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="fillAttributeLabel"/> |
| 58 | + <selectOption selector="{{AdminCreateNewProductAttributeSection.inputType}}" userInput="Dropdown" stepKey="selectInputType"/> |
| 59 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.isRequired}}" stepKey="enableIsRequiredOption"/> |
62 | 60 |
|
63 |
| - <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveTheProduct"/> |
64 |
| - <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/> |
| 61 | + <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="waitForAddValueButtonToVisible"/> |
| 62 | + <click selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="clickOnAddValueButton"/> |
| 63 | + <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.defaultStoreView('0')}}" stepKey="waitForDefaultStoreViewToVisible"/> |
| 64 | + <fillField selector="{{AdminCreateNewProductAttributeSection.defaultStoreView('0')}}" userInput="value 1" stepKey="fillDefaultStoreView"/> |
| 65 | + <fillField selector="{{AdminCreateNewProductAttributeSection.adminOption('0')}}" userInput="value 1 admin" stepKey="fillAdminField"/> |
| 66 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.defaultRadioButton('1')}}" stepKey="selectRadioButton"/> |
| 67 | + |
| 68 | + <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="waitForAddValueButtonToVisible2"/> |
| 69 | + <click selector="{{AdminCreateNewProductAttributeSection.addValue}}" stepKey="clickOnAddValueButton2"/> |
| 70 | + <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.defaultStoreView('1')}}" stepKey="waitForDefaultStoreViewToVisible2"/> |
| 71 | + <fillField selector="{{AdminCreateNewProductAttributeSection.defaultStoreView('1')}}" userInput="value 2" stepKey="fillDefaultStoreView2"/> |
| 72 | + <fillField selector="{{AdminCreateNewProductAttributeSection.adminOption('1')}}" userInput="value 2 admin" stepKey="fillAdminField2"/> |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + <click selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="clickOnAdvancedAttributeProperties"/> |
| 77 | + <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" stepKey="waitForAttributeCodeToVisible"/> |
| 78 | + <scrollTo selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" stepKey="scrollToAttributeCode"/> |
| 79 | + <fillField selector="{{AdminCreateNewProductAttributeSection.attributeCode}}" userInput="{{newProductAttribute.attribute_code}}" stepKey="fillAttributeCode"/> |
| 80 | + |
| 81 | + <scrollTo selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="scrollToAdvancedAttributeProperties"/> |
| 82 | + <click selector="{{AdminCreateNewProductAttributeSection.advancedAttributeProperties}}" stepKey="clickOnAdvancedAttributeProperties1"/> |
| 83 | + <scrollTo selector="{{AdminCreateNewProductAttributeSection.storefrontProperties}}" stepKey="scrollToStorefrontProperties"/> |
| 84 | + <click selector="{{AdminCreateNewProductAttributeSection.storefrontProperties}}" stepKey="clickOnStorefrontProperties"/> |
| 85 | + <waitForPageLoad stepKey="waitForStoreFrontToLoad"/> |
| 86 | + |
| 87 | + |
| 88 | + <scrollTo stepKey="scroll1" selector="{{AdminCreateNewProductAttributeSection.sortProductListing}}" x="0" y="-80"/> |
| 89 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.inSearch}}" stepKey="enableInSearchOption"/> |
| 90 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.advancedSearch}}" stepKey="enableAdvancedSearch"/> |
| 91 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.isComparable}}" stepKey="enableIsUComparableption"/> |
| 92 | + |
| 93 | + <!-- Step 7 --> |
| 94 | + <click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/> |
| 95 | + <waitForPageLoad stepKey="waitForAttributeToSave"/> |
65 | 96 |
|
66 |
| - <!--Verify product attribute added in product form --> |
| 97 | + |
| 98 | + <!--Step 8: Verify product attribute added in product form --> |
67 | 99 | <scrollTo selector="{{AdminProductFormSection.contentTab}}" stepKey="scrollToContentTab"/>
|
68 | 100 | <waitForElementVisible selector="{{AdminProductFormSection.attributeTab}}" stepKey="waitForAttributeToVisible"/>
|
69 | 101 | <click selector="{{AdminProductFormSection.attributeTab}}" stepKey="clickOnAttribute"/>
|
70 | 102 | <seeElement selector="{{AdminProductFormSection.attributeLabelByText(ProductAttributeFrontendLabel.label)}}" stepKey="seeAttributeLabelInProductForm"/>
|
| 103 | + <seeElement selector="{{AdminProductFormSection.newAddedAttribute(newProductAttribute.attribute_code)}}" stepKey="seeAttributeCodeInProductForm"/> |
| 104 | + |
| 105 | + <actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveTheProduct"/> |
| 106 | + <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/> |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
71 | 111 |
|
72 |
| - <!--Verify Product Attribute in Attribute Form --> |
73 |
| - <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid"/> |
74 |
| - <fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{newProductAttribute.attribute_code}}" stepKey="setAttributeCode"/> |
75 |
| - <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/> |
76 |
| - <waitForPageLoad stepKey="waitForPageLoad" /> |
77 |
| - <see selector="{{AdminProductAttributeGridSection.attributeCodeColumn}}" userInput="{{newProductAttribute.attribute_code}}" stepKey="seeAttributeCode"/> |
78 |
| - <see selector="{{AdminProductAttributeGridSection.defaultLabelColumn}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="seeDefaultLabel"/> |
79 |
| - <see selector="{{AdminProductAttributeGridSection.isVisibleColumn}}" userInput="Yes" stepKey="seeIsVisibleColumn"/> |
80 |
| - <see selector="{{AdminProductAttributeGridSection.isSearchableColumn}}" userInput="Yes" stepKey="seeSearchableColumn"/> |
81 |
| - <see selector="{{AdminProductAttributeGridSection.isComparableColumn}}" userInput="Yes" stepKey="seeComparableColumn"/> |
82 |
| - |
83 |
| - <!--Verify Product Attribute is present in Category Store Front Page --> |
84 |
| - <amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="goToStorefrontPage"/> |
85 |
| - <waitForPageLoad stepKey="waitForProductFrontPageToLoad"/> |
86 |
| - <click selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="clickOnCategory"/> |
87 |
| - <waitForPageLoad stepKey="waitForCategoryPageToLoad"/> |
88 |
| - <click selector="{{StorefrontCategoryMainSection.productLink}}" stepKey="openSearchedProduct"/> |
89 |
| - <waitForPageLoad stepKey="waitForProductToLoad1"/> |
90 |
| - <see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductNameInStoreFront"/> |
91 |
| - <see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="{{SimpleProduct.price}}" stepKey="seeProductPriceInStoreFront"/> |
92 |
| - <actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeProductSkuInStoreFront"> |
93 |
| - <argument name="productSku" value="{{SimpleProduct.sku}}"/> |
94 |
| - </actionGroup> |
95 |
| - <scrollTo selector="{{StorefrontProductMoreInformationSection.moreInformation}}" stepKey="scrollToMoreInformation"/> |
96 |
| - <see selector="{{StorefrontProductMoreInformationSection.attributeLabel}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="seeAttributeLabel"/> |
97 |
| - <see selector="{{StorefrontProductMoreInformationSection.attributeValue}}" userInput="{{ProductAttributeOption8.value}}" stepKey="seeAttributeValue"/> |
98 |
| - |
99 |
| - <!--Verify Product Attribute present in search page --> |
100 |
| - <amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="goToStorefrontPage1"/> |
101 |
| - <waitForPageLoad stepKey="waitForProductFrontPageToLoad1"/> |
102 |
| - <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillAttribute"> |
103 |
| - <argument name="phrase" value="{{ProductAttributeOption8.value}}"/> |
104 |
| - </actionGroup> |
105 |
| - <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProductNameInCategoryPage"> |
106 |
| - <argument name="productName" value="{{SimpleProduct.name}}"/> |
107 |
| - </actionGroup> |
108 | 112 | </test>
|
109 | 113 | </tests>
|
110 |
| - |
|
0 commit comments