|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> |
| 10 | + |
| 11 | + <!--Go To Stores/All Stores--> |
| 12 | + <actionGroup name="GoToAllStores"> |
| 13 | + <click stepKey="clickStoreItem" selector="{{Dashboard.storesItem}}"/> |
| 14 | + <waitForElementVisible selector="{{Dashboard.storesAllStoresItem}}" stepKey="waitForAllStoresItemBecomeAvailable"/> |
| 15 | + <click stepKey="clickAllStoreItem" selector="{{Dashboard.storesAllStoresItem}}"/> |
| 16 | + <waitForPageLoad stepKey="waitForStoresPageLoaded"/> |
| 17 | + </actionGroup> |
| 18 | + |
| 19 | + <!--Create new website--> |
| 20 | + <actionGroup name="AdminCreateWebsite"> |
| 21 | + <!--Fill required fields--> |
| 22 | + <click selector="{{AdminNewWebsiteSection.addWebSite}}" stepKey="clickOnCreateWebsiteButton"/> |
| 23 | + <waitForPageLoad stepKey="waitFormToBeOpened"/> |
| 24 | + <fillField selector="{{AdminNewWebsiteSection.name}}" userInput="{{AdminTestData.testData}}" stepKey="enterWebsiteName" /> |
| 25 | + <fillField selector="{{AdminNewWebsiteSection.code}}" userInput="{{AdminTestData.testData}}" stepKey="enterWebsiteCode" /> |
| 26 | + <click selector="{{AdminNewWebsiteActionsSection.saveWebsite}}" stepKey="clickSaveWebsite" /> |
| 27 | + <waitForElementVisible selector="{{AdminStoresGridSection.websiteFilterTextField}}" stepKey="waitForStoreGridToReload"/> |
| 28 | + <see userInput="You saved the website." stepKey="seeSavedMessage" /> |
| 29 | + </actionGroup> |
| 30 | + |
| 31 | + <!--Create new store--> |
| 32 | + <actionGroup name="AdminCreateNewStore"> |
| 33 | + <!--Fill required fields--> |
| 34 | + <click selector="{{AdminNewStoreGroupSection.create}}" stepKey="clickOnCreateStore"/> |
| 35 | + <waitForPageLoad stepKey="waitFormToBeOpened"/> |
| 36 | + <selectOption selector="{{AdminNewStoreGroupSection.storeGrpWebsiteDropdown}}" userInput="{{AdminTestData.testData}}" stepKey="selectWebsite" /> |
| 37 | + <fillField selector="{{AdminNewStoreGroupSection.storeGrpNameTextField}}" userInput="{{AdminTestData.testData}}" stepKey="enterStoreGroupName" /> |
| 38 | + <fillField selector="{{AdminNewStoreGroupSection.storeGrpCodeTextField}}" userInput="{{AdminTestData.testData}}" stepKey="enterStoreGroupCode" /> |
| 39 | + <selectOption selector="{{AdminNewStoreGroupSection.storeRootCategoryDropdown}}" userInput="Default Category" stepKey="chooseRootCategory" /> |
| 40 | + <click selector="{{AdminStoreGroupActionsSection.saveButton}}" stepKey="clickSaveStoreGroup" /> |
| 41 | + <waitForElementVisible selector="{{AdminStoresGridSection.storeGrpFilterTextField}}" stepKey="waitForStoreGridReload"/> |
| 42 | + <see userInput="You saved the store." stepKey="seeSavedMessage" /> |
| 43 | + </actionGroup> |
| 44 | + |
| 45 | + <!--Create store view--> |
| 46 | + <actionGroup name="AdminCreateStoreView"> |
| 47 | + <!--Fill required fields--> |
| 48 | + <click selector="{{AdminNewStoreSection.create}}" stepKey="clickOnCreateStoreView"/> |
| 49 | + <waitForPageLoad stepKey="waitFormToBeOpened"/> |
| 50 | + <selectOption selector="{{AdminNewStoreSection.storeGrpDropdown}}" userInput="{{AdminTestData.testData}}" stepKey="selectStore" /> |
| 51 | + <fillField selector="{{AdminNewStoreSection.storeNameTextField}}" userInput="{{AdminTestData.testData}}" stepKey="enterStoreViewName" /> |
| 52 | + <fillField selector="{{AdminNewStoreSection.storeCodeTextField}}" userInput="{{AdminTestData.testData}}" stepKey="enterStoreViewCode" /> |
| 53 | + <selectOption selector="{{AdminNewStoreSection.statusDropdown}}" userInput="Enabled" stepKey="setStatus" /> |
| 54 | + <click selector="{{AdminNewStoreViewActionsSection.saveButton}}" stepKey="clickSaveStoreView" /> |
| 55 | + <waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForModal" /> |
| 56 | + <see selector="{{AdminConfirmationModalSection.title}}" userInput="Warning message" stepKey="seeWarning" /> |
| 57 | + <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="dismissModal" /> |
| 58 | + <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="waitForPageReolad"/> |
| 59 | + <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="waitForPageReload"/> |
| 60 | + <see userInput="You saved the store view." stepKey="seeSavedMessage" /> |
| 61 | + </actionGroup> |
| 62 | + |
| 63 | + <!--Go to Stores -> Configuration -> Web.--> |
| 64 | + <actionGroup name="GoToStoresConfigurationWeb"> |
| 65 | + <click stepKey="againClickStoreItem" selector="{{Dashboard.storesItem}}"/> |
| 66 | + <waitForElementVisible selector="{{Dashboard.storesConfigurationItem}}" stepKey="waitForAllStoreItemExtends"/> |
| 67 | + <click stepKey="clickConfigurationItem" selector="{{Dashboard.storesConfigurationItem}}"/> |
| 68 | + <waitForPageLoad stepKey="waitForStoresConfigurationPageLoaded"/> |
| 69 | + <click stepKey="clickWebItem" selector="{{AdminStoresConfigurationSection.webItem}}"/> |
| 70 | + <waitForPageLoad stepKey="waitForStoresConfigurationWebPageLoaded"/> |
| 71 | + </actionGroup> |
| 72 | + |
| 73 | + <!--Select Yes in Add Store Code to Urls field.--> |
| 74 | + <actionGroup name="SelectYesInAddStoreCodeToUrlsField"> |
| 75 | + <click stepKey="clickOpenUrlOptions" selector="{{AdminStoresConfigurationSection.openUrlOptions}}"/> |
| 76 | + <click stepKey="clickUseSystemValueCheckbox" selector="{{AdminStoresConfigurationSection.useSystemValueCheckbox}}"/> |
| 77 | + <selectOption selector="{{AdminStoresConfigurationSection.addStoreCodeToUrlsDropDown}}" userInput="Yes" stepKey="setAddStoreCodeToUrlsYes" /> |
| 78 | + <click stepKey="clickSaveConfigButton" selector="{{AdminStoresConfigurationSection.saveConfigButton}}"/> |
| 79 | + <waitForPageLoad stepKey="waitForSaveConfig"/> |
| 80 | + <see stepKey="seeSavedConfigurationMessage" userInput="You saved the configuration."/> |
| 81 | + </actionGroup> |
| 82 | + |
| 83 | + <!--Create an Account. Check Sign Up for Newsletter checkbox --> |
| 84 | + <actionGroup name="StorefrontCreateNewAccount"> |
| 85 | + <fillField selector="{{StorefrontCustomerCreateFormSection.firstNameField}}" userInput="{{CreateUserData.firstName}}" stepKey="enterFirstName" /> |
| 86 | + <fillField selector="{{StorefrontCustomerCreateFormSection.lastNameField}}" userInput="{{CreateUserData.lastName}}" stepKey="enterLastName" /> |
| 87 | + <click selector="{{StorefrontCustomerCreateFormSection.signUpForNewsletter}}" stepKey="selectSignUpForNewsletterCheckbox"/> |
| 88 | + <fillField selector="{{StorefrontCustomerCreateFormSection.emailField}}" userInput="{{CreateUserData.firstName}}@magento.com" stepKey="enterEmail" /> |
| 89 | + <fillField selector="{{StorefrontCustomerCreateFormSection.passwordField}}" userInput="{{CreateUserData.password}}" stepKey="enterPassword" /> |
| 90 | + <fillField selector="{{StorefrontCustomerCreateFormSection.confirmPasswordField}}" userInput="{{CreateUserData.password}}" stepKey="confirmPassword" /> |
| 91 | + <click stepKey="clickCreateAccountButton" selector="{{StorefrontCustomerCreateFormSection.createAccountButton}}"/> |
| 92 | + <waitForPageLoad stepKey="waitForMyAccountPageLoad"/> |
| 93 | + </actionGroup> |
| 94 | + |
| 95 | + <!-- Sign out --> |
| 96 | + <actionGroup name="StorefrontSignOut"> |
| 97 | + <click stepKey="clickCustomerNameItem" selector="{{CustomerMyAccountPage.customerName}}"/> |
| 98 | + <click stepKey="clickSignOutButton" selector="{{CustomerMyAccountPage.customerSignOut}}"/> |
| 99 | + <waitForPageLoad stepKey="waitForSignOut"/> |
| 100 | + </actionGroup> |
| 101 | + |
| 102 | + <!--Create an Account. Uncheck Sign Up for Newsletter checkbox --> |
| 103 | + <actionGroup name="StorefrontCreateNewAccountNewsletterUnchecked"> |
| 104 | + <click stepKey="clickCreateNewAccountButton" selector="{{CustomerMyAccountPage.createNewAccount}}"/> |
| 105 | + <waitForPageLoad stepKey="waitForCreateNewAccountPageLoaded"/> |
| 106 | + <fillField selector="{{StorefrontCustomerCreateFormSection.firstNameField}}" userInput="{{CreateUserData.firstName}}" stepKey="enterFirstName" /> |
| 107 | + <fillField selector="{{StorefrontCustomerCreateFormSection.lastNameField}}" userInput="{{CreateUserData.lastName}}" stepKey="enterLastName" /> |
| 108 | + <fillField selector="{{StorefrontCustomerCreateFormSection.emailField}}" userInput="{{CreateUserData.firstName}}@magento.com" stepKey="enterEmail" /> |
| 109 | + <fillField selector="{{StorefrontCustomerCreateFormSection.passwordField}}" userInput="{{CreateUserData.password}}" stepKey="enterPassword" /> |
| 110 | + <fillField selector="{{StorefrontCustomerCreateFormSection.confirmPasswordField}}" userInput="{{CreateUserData.password}}" stepKey="confirmPassword" /> |
| 111 | + <click stepKey="clickCreateAccountButton" selector="{{StorefrontCustomerCreateFormSection.createAccountButton}}"/> |
| 112 | + <waitForPageLoad stepKey="waitForMyAccountPageLoad"/> |
| 113 | + <see userInput="Thank you for registering with" stepKey="seeValidRegistrationMessage"/> |
| 114 | + </actionGroup> |
| 115 | + |
| 116 | + <!--Delete created Website --> |
| 117 | + <actionGroup name="AdminDeleteWebsite"> |
| 118 | + <fillField stepKey="fillSearchWebsiteField" selector="{{AdminStoresGridSection.websiteFilterTextField}}" userInput="{{AdminTestData.testData}}"/> |
| 119 | + <click stepKey="clickSearchButton" selector="{{AdminStoresGridSection.searchButton}}"/> |
| 120 | + <see stepKey="verifyThatCorrectWebsiteFound" selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" userInput="{{AdminTestData.testData}}"/> |
| 121 | + <click stepKey="clickEditExistingStoreRow" selector="{{AdminStoresGridSection.websiteNameInFirstRow}}"/> |
| 122 | + <waitForPageLoad stepKey="waitForStoreToLoad"/> |
| 123 | + <click stepKey="clickDeleteWebsiteButtonOnEditWebsitePage" selector="{{AdminStoresMainActionsSection.deleteButton}}"/> |
| 124 | + <selectOption stepKey="setCreateDbBackupToNo" selector="{{AdminStoresDeleteStoreGroupSection.createDbBackup}}" userInput="No"/> |
| 125 | + <click stepKey="clickDeleteWebsiteButton" selector="{{AdminStoresDeleteStoreGroupSection.deleteStoreGroupButton}}"/> |
| 126 | + <waitForElementVisible stepKey="waitForStoreGridToReload" selector="{{AdminStoresGridSection.websiteFilterTextField}}"/> |
| 127 | + <see stepKey="seeSavedMessage" userInput="You deleted the website."/> |
| 128 | + </actionGroup> |
| 129 | + |
| 130 | + <!--Set Default config --> |
| 131 | + <actionGroup name="AdminSetDefaultConfig"> |
| 132 | + <selectOption selector="{{AdminStoresConfigurationSection.addStoreCodeToUrlsDropDown}}" userInput="No" stepKey="setAddStoreCodeToUrlsNo" /> |
| 133 | + <click stepKey="disableUseSystemValueCheckbox" selector="{{AdminStoresConfigurationSection.useSystemValueCheckbox}}"/> |
| 134 | + <click stepKey="clickDefaultConfigSaveButton" selector="{{AdminStoresConfigurationSection.saveConfigButton}}"/> |
| 135 | + <waitForPageLoad stepKey="waitForSaveConfig"/> |
| 136 | + <see stepKey="saveDefaultConfig" userInput="You saved the configuration."/> |
| 137 | + <click stepKey="clickOpenUrlOptions" selector="{{AdminStoresConfigurationSection.openUrlOptions}}"/> |
| 138 | + </actionGroup> |
| 139 | + |
| 140 | + <!--Delete created Customer --> |
| 141 | + <actionGroup name="AdminDeleteCreatedCustomer"> |
| 142 | + <click stepKey="clickCustomerItem" selector="{{Dashboard.customer}}"/> |
| 143 | + <wait stepKey="WaitForCustomerViewOpened" time="2"/> |
| 144 | + <click stepKey="clickCustomerAllCustomerItem" selector="{{Dashboard.customerAllCustomer}}"/> |
| 145 | + <waitForPageLoad stepKey="WaitForCustomerPageIsLoaded"/> |
| 146 | + <fillField stepKey="searchToKeyword" selector="{{AdminCustomerAccountInformationSection.searchToKeyword}}" userInput="{{CreateUserData.firstName}}"/> |
| 147 | + <click stepKey="clickSearchButton" selector="{{AdminCustomerAccountInformationSection.searchButton}}"/> |
| 148 | + <waitForElementVisible stepKey="waitForFiltering" selector="{{AdminCustomerAccountInformationSection.selectCustomer}}"/> |
| 149 | + <click selector="{{AdminCustomerAccountInformationSection.selectCustomer}}" stepKey="ClickOnCustomer"/> |
| 150 | + <click selector="{{AdminCustomerAccountInformationSection.actions}}" stepKey="ClickOnActions"/> |
| 151 | + <waitForElementVisible selector="{{AdminCustomerAccountInformationSection.delete}}" stepKey="waitForDeleteButtonAppeared"/> |
| 152 | + <click selector="{{AdminCustomerAccountInformationSection.delete}}" stepKey="ClickOnDelete"/> |
| 153 | + <waitForElementVisible selector="{{AdminCustomerAccountInformationSection.confirm}}" stepKey="waitForConfirmButtonAppeared"/> |
| 154 | + <click selector="{{AdminCustomerAccountInformationSection.confirm}}" stepKey="ClickToConfirm"/> |
| 155 | + <waitForPageLoad stepKey="waitClickToConfirmButton"/> |
| 156 | + <see stepKey="seeRecordsWereDeletedMessage" userInput="A total of 2 record(s) were deleted."/> |
| 157 | + <click stepKey="clickClearAllFilterButton" selector="{{AdminCustomerAccountInformationSection.clearAll}}"/> |
| 158 | + <!-- We need this wait to make sure that Active filters is clear (waitForElementNotVisible tag doesn't wait until clearing filters)--> |
| 159 | + <wait stepKey="waitToClearAllFilters" time="2"/> |
| 160 | + </actionGroup> |
| 161 | + |
| 162 | +</actionGroups> |
0 commit comments