1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- -->
- <!-- Test XML Example -->
- <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
- <actionGroup name="AdminCreateStoreViewActionGroup">
- <arguments>
- <argument name="StoreGroup" defaultValue="_defaultStoreGroup"/>
- <argument name="customStore" defaultValue="customStore"/>
- </arguments>
- <amOnPage url="{{AdminSystemStoreViewPage.url}}" stepKey="navigateToNewStoreView"/>
- <waitForPageLoad stepKey="waitForPageLoad1" />
- <comment userInput="Creating Store View" stepKey="storeViewCreationComment" />
- <!--Create Store View-->
- <selectOption selector="{{AdminNewStoreSection.storeGrpDropdown}}" userInput="{{StoreGroup.name}}" stepKey="selectStore" />
- <fillField selector="{{AdminNewStoreSection.storeNameTextField}}" userInput="{{customStore.name}}" stepKey="enterStoreViewName" />
- <fillField selector="{{AdminNewStoreSection.storeCodeTextField}}" userInput="{{customStore.code}}" stepKey="enterStoreViewCode" />
- <selectOption selector="{{AdminNewStoreSection.statusDropdown}}" userInput="Enabled" stepKey="setStatus" />
- <click selector="{{AdminNewStoreViewActionsSection.saveButton}}" stepKey="clickSaveStoreView" />
- <waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForModal" />
- <see selector="{{AdminConfirmationModalSection.title}}" userInput="Warning message" stepKey="seeWarningAboutTakingALongTimeToComplete" />
- <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmModal" />
- <waitForPageLoad stepKey="waitForStorePageLoad" />
- <waitForElementNotVisible selector="{{AdminNewStoreViewActionsSection.loadingMask}}" stepKey="waitForElementVisible"/>
- </actionGroup>
- <!--Save the Store view-->
- <actionGroup name="AdminCreateStoreViewActionSaveGroup">
- <waitForLoadingMaskToDisappear stepKey="waitForGridLoad"/>
- <waitForElementVisible selector="{{AdminStoresGridSection.websiteFilterTextField}}" stepKey="waitForStoreGridToReload2"/>
- <see userInput="You saved the store view." stepKey="seeSavedMessage" />
- </actionGroup>
- <!--Save the same Store view code for code validation-->
- <actionGroup name="AdminCreateStoreViewCodeUniquenessActionGroup">
- <waitForLoadingMaskToDisappear stepKey="waitForForm"/>
- <see userInput="Store with the same code already exists." stepKey="seeMessage" />
- </actionGroup>
- <actionGroup name="navigateToAdminContentManagementPage">
- <amOnPage url="{{AdminContentManagementPage.url}}" stepKey="navigateToConfigurationPage"/>
- <waitForPageLoad stepKey="waitForPageLoad1"/>
- </actionGroup>
- <actionGroup name="saveStoreConfiguration">
- <comment userInput="saveStoreConfiguration" stepKey="comment"/>
- <waitForElementVisible selector="{{StoreConfigSection.Save}}" stepKey="waitForSaveButton"/>
- <click selector="{{StoreConfigSection.Save}}" stepKey="clickSaveButton"/>
- <waitForPageLoad stepKey="waitForPageLoad"/>
- </actionGroup>
- <actionGroup name="saveStoreConfigurationAndValidateFieldError">
- <arguments>
- <argument name="inputFieldError" type="string"/>
- <argument name="errorMessageSelector" type="string"/>
- <argument name="errorMessage" type="string"/>
- </arguments>
- <comment userInput="saveStoreConfigurationAndValidateFieldError" stepKey="comment"/>
- <waitForElementVisible selector="{{StoreConfigSection.Save}}" stepKey="waitForSaveButton"/>
- <click selector="{{StoreConfigSection.Save}}" stepKey="clickSaveButton"/>
- <waitForElement selector="{{inputFieldError}}" stepKey="waitForErrorField"/>
- <waitForElementVisible selector="{{errorMessageSelector}}" stepKey="waitForErrorMessage"/>
- <see selector="{{errorMessageSelector}}" userInput="{{errorMessage}}" stepKey="seeErrorMessage"/>
- </actionGroup>
- </actionGroups>
|