AdminSwitchStoreViewActionGroup.xml 1.7 KB

123456789101112131415161718192021222324252627
  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. <!-- Test XML Example -->
  9. <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  10. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
  11. <actionGroup name="AdminSwitchStoreViewActionGroup">
  12. <arguments>
  13. <argument name="storeView" defaultValue="customStore.name"/>
  14. </arguments>
  15. <click selector="{{AdminMainActionsSection.storeViewDropdown}}" stepKey="clickStoreViewSwitchDropdown"/>
  16. <waitForElementVisible selector="{{AdminMainActionsSection.storeViewByName('Default Store View')}}" stepKey="waitForStoreViewsAreVisible"/>
  17. <click selector="{{AdminMainActionsSection.storeViewByName(storeView)}}" stepKey="clickStoreViewByName"/>
  18. <waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitingForInformationModal"/>
  19. <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmStoreSwitch"/>
  20. <waitForPageLoad stepKey="waitForStoreViewSwitched"/>
  21. <see userInput="{{storeView}}" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewName"/>
  22. </actionGroup>
  23. <actionGroup name="AdminSwitchToAllStoreViewActionGroup" extends="AdminSwitchStoreViewActionGroup">
  24. <click selector="{{AdminMainActionsSection.allStoreViews}}" stepKey="clickStoreViewByName" after="waitForStoreViewsAreVisible"/>
  25. <see selector="{{AdminMainActionsSection.storeSwitcher}}" userInput="All Store Views" stepKey="seeNewStoreViewName" after="waitForStoreViewSwitched"/>
  26. </actionGroup>
  27. </actionGroups>