AssignBlockToCMSPageActionGroup.xml 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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="AssignBlockToCMSPage">
  11. <arguments>
  12. <argument name="Block" defaultValue=""/>
  13. <argument name="CmsPage" defaultValue=""/>
  14. </arguments>
  15. <amOnPage url="{{CmsPagesPage.url}}" stepKey="amOnEditPage"/>
  16. <waitForPageLoad stepKey="waitForPageLoad1"/>
  17. <conditionalClick selector="{{CmsPagesPageActionsSection.clearAllButton}}" dependentSelector="{{CmsPagesPageActionsSection.activeFilters}}" stepKey="clickToResetFilter" visible="true"/>
  18. <waitForPageLoad stepKey="waitForGridReload"/>
  19. <conditionalClick selector="//div[contains(@data-role, 'grid-wrapper')]/table/thead/tr/th/span[contains(text(), 'ID')]" dependentSelector="//span[contains(text(), 'ID')]/parent::th[not(contains(@class, '_descend'))]/parent::tr/parent::thead/parent::table/parent::div[contains(@data-role, 'grid-wrapper')]" stepKey="clickToAttemptSortByIdDescending1" visible="true"/>
  20. <waitForLoadingMaskToDisappear stepKey="waitForFirstIdSortDescendingToFinish1" />
  21. <!-- Conditional Click again in case it goes from default state to ascending on first click -->
  22. <conditionalClick selector="//div[contains(@data-role, 'grid-wrapper')]/table/thead/tr/th/span[contains(text(), 'ID')]" dependentSelector="//span[contains(text(), 'ID')]/parent::th[not(contains(@class, '_descend'))]/parent::tr/parent::thead/parent::table/parent::div[contains(@data-role, 'grid-wrapper')]" stepKey="secondClickToAttemptSortByIdDescending2" visible="true"/>
  23. <waitForLoadingMaskToDisappear stepKey="waitForSecondIdSortDescendingToFinish1" />
  24. <waitForElementVisible selector="{{CmsPagesPageActionsSection.select(CmsPage.identifier)}}" stepKey="waitForCMSPageGrid" />
  25. <click selector="{{CmsPagesPageActionsSection.select(CmsPage.identifier)}}" stepKey="clickSelect" />
  26. <waitForElementVisible selector="{{CmsPagesPageActionsSection.edit(CmsPage.identifier)}}" stepKey="waitForEditLink" />
  27. <click selector="{{CmsPagesPageActionsSection.edit(CmsPage.identifier)}}" stepKey="clickEdit" />
  28. <waitForPageLoad stepKey="waitForPageLoad2" />
  29. <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickContentTab" />
  30. <waitForElementVisible selector="{{TinyMCESection.TinyMCE4}}" stepKey="waitForTinyMCE4"/>
  31. <seeElement selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="seeWidgetIcon" />
  32. <click selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="clickInsertWidgetIcon" />
  33. <waitForPageLoad stepKey="waitForPageLoad3" />
  34. <selectOption selector="{{WidgetSection.WidgetType}}" userInput="CMS Static Block" stepKey="selectCMSStaticBlock" />
  35. <waitForLoadingMaskToDisappear stepKey="waitForLoading1" />
  36. <selectOption selector="{{WidgetSection.WidgetTemplate}}" userInput="CMS Static Block Default Template" stepKey="selectTemplate" />
  37. <click selector="{{WidgetSection.BtnChooser}}" stepKey="clickSelectPageBtn" />
  38. <waitForLoadingMaskToDisappear stepKey="waitForLoading2" />
  39. <fillField selector="//input[@name='chooser_identifier']" userInput="{{Block.identifier}}" stepKey="fillBlockIdentifier"/>
  40. <click selector="//div[@class='modal-inner-wrap']//button[@title='Search']" stepKey="clickSearchBtn" />
  41. <waitForLoadingMaskToDisappear stepKey="waitForSecondIdSortDescendingToFinish2" />
  42. <waitForElementVisible selector="{{WidgetSection.BlockPage(Block.identifier)}}" stepKey="waitForBlockTitle" />
  43. <click selector="{{WidgetSection.BlockPage(Block.identifier)}}" stepKey="selectPreCreateBlock" />
  44. <wait time="3" stepKey="wait1" />
  45. <click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidgetBtn" />
  46. <waitForLoadingMaskToDisappear stepKey="waitForLoading3" />
  47. <waitForPageLoad stepKey="waitForPageLoad4" />
  48. <click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandButtonMenu"/>
  49. <waitForElementVisible selector="{{CmsNewPagePageActionsSection.splitButtonMenu}}" stepKey="waitForSplitButtonMenuVisible"/>
  50. <click selector="{{CmsNewPagePageActionsSection.savePage}}" stepKey="clickSavePage"/>
  51. </actionGroup>
  52. </actionGroups>