SearchBlockOnGridPageActionGroup.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
  10. <actionGroup name="searchBlockOnGridPage">
  11. <arguments>
  12. <argument name="Block" defaultValue=""/>
  13. </arguments>
  14. <fillField selector="//input[@name='chooser_identifier']" userInput="{{Block.identifier}}" stepKey="fillEntityIdentifier"/>
  15. <click selector="//div[@class='modal-inner-wrap']//button[@title='Search']" stepKey="clickSearchBtn" />
  16. <waitForLoadingMaskToDisappear stepKey="waitForSecondIdSortDescendingToFinish2" />
  17. <waitForElementVisible selector="{{WidgetSection.BlockPage(Block.identifier)}}" stepKey="waitForBlockTitle" />
  18. </actionGroup>
  19. <actionGroup name ="deleteBlock">
  20. <arguments>
  21. <argument name="Block" defaultValue=""/>
  22. </arguments>
  23. <amOnPage url="{{CmsBlocksPage.url}}" stepKey="navigateToCMSBlocksGrid"/>
  24. <waitForPageLoad stepKey="waitForPageLoad1"/>
  25. <conditionalClick selector="{{BlockPageActionsSection.clearAll}}" dependentSelector="{{BlockPageActionsSection.activeFilters}}" stepKey="clickToResetFilter" visible="true"/>
  26. <waitForPageLoad stepKey="waitForPageLoad2"/>
  27. <click selector="{{BlockPageActionsSection.FilterBtn}}" stepKey="clickFilterBtn"/>
  28. <fillField selector="{{BlockPageActionsSection.URLKey}}" userInput="{{Block.identifier}}" stepKey="fillBlockIdentifierInput"/>
  29. <click selector="{{BlockPageActionsSection.ApplyFiltersBtn}}" stepKey="applyFilter"/>
  30. <waitForLoadingMaskToDisappear stepKey="waitForGridToLoadResults" />
  31. <waitForElementVisible selector="{{BlockPageActionsSection.select(Block.identifier)}}" stepKey="waitForCMSPageGrid" />
  32. <click selector="{{BlockPageActionsSection.select(Block.identifier)}}" stepKey="clickSelect" />
  33. <waitForElementVisible selector="{{BlockPageActionsSection.edit(Block.identifier)}}" stepKey="waitForEditLink" />
  34. <click selector="{{BlockPageActionsSection.edit(Block.identifier)}}" stepKey="clickEdit" />
  35. <waitForLoadingMaskToDisappear stepKey="waitForPageToLoad" />
  36. <click selector="{{CmsBlockBlockActionSection.deleteBlock}}" stepKey="deleteBlock"/>
  37. <waitForElementVisible selector="{{CmsBlockBlockActionSection.deleteConfirm}}" stepKey="waitForOkButtonToBeVisible"/>
  38. <click selector="{{CmsBlockBlockActionSection.deleteConfirm}}" stepKey="clickOkButton"/>
  39. <waitForPageLoad stepKey="waitForPageLoad3"/>
  40. <see userInput="You deleted the block." stepKey="seeSuccessMessage"/>
  41. </actionGroup>
  42. </actionGroups>