EmailTemplateActionGroup.xml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. <!--Create New Template -->
  11. <actionGroup name="CreateNewTemplate">
  12. <!--Click "Add New Template" button-->
  13. <click stepKey="clickAddNewTemplateButton" selector="{{EmailTemplatesSection.addNewTemplateButton}}"/>
  14. <waitForPageLoad stepKey="waitForNewEmailTemplatesPageLoaded"/>
  15. <!--Select value for "Template" drop-down menu in "Load default template" tab-->
  16. <selectOption selector="{{EmailTemplatesSection.templateDropDown}}" stepKey="selectValueFromTemplateDropDown" userInput="Registry Update"/>
  17. <!--Fill in required fields in "Template Information" tab and click "Save Template" button-->
  18. <click stepKey="clickLoadTemplateButton" selector="{{EmailTemplatesSection.loadTemplateButton}}" after="selectValueFromTemplateDropDown"/>
  19. <fillField stepKey="fillTemplateNameField" selector="{{EmailTemplatesSection.templateNameField}}" userInput="{{EmailTemplate.templateName}}" after="clickLoadTemplateButton"/>
  20. <waitForLoadingMaskToDisappear stepKey="wait1"/>
  21. <click stepKey="clickSaveTemplateButton" selector="{{EmailTemplatesSection.saveTemplateButton}}"/>
  22. <waitForPageLoad stepKey="waitForNewTemplateCreated"/>
  23. </actionGroup>
  24. <!--Delete created Template-->
  25. <actionGroup name="DeleteCreatedTemplate">
  26. <switchToPreviousTab stepKey="switchToPreviousTab"/>
  27. <seeInCurrentUrl stepKey="seeCreatedTemplateUrl" url="email_template/edit/id"/>
  28. <click stepKey="clickDeleteTemplateButton" selector="{{EmailTemplatesSection.deleteTemplateButton}}"/>
  29. <acceptPopup stepKey="acceptDeletingTemplatePopUp"/>
  30. <see stepKey="SeeSuccessfulMessage" userInput="You deleted the email template."/>
  31. <click stepKey="clickResetFilterButton" selector="{{EmailTemplatesSection.resetFilterButton}}"/>
  32. <waitForElementNotVisible selector="{{MarketingEmailTemplateSection.clearSearchTemplate(EmailTemplate.templateName)}}" stepKey="waitForSearchFieldCleared"/>
  33. </actionGroup>
  34. </actionGroups>