AdminAccountConfigurationActionGroup.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
  4. <!-- Disable the shipping method -->
  5. <actionGroup name="AdminDisableShippingMethod">
  6. <magentoCLI stepKey="disableShippingMethod" command="config:set carriers/temando/active 0" />
  7. <magentoCLI stepKey="removeEndpoint" command="config:set carriers/temando/session_endpoint ''" />
  8. <magentoCLI stepKey="removeAccountId" command="config:set carriers/temando/account_id ''" />
  9. <magentoCLI stepKey="removeBearerToken" command="config:set carriers/temando/bearer_token ''" />
  10. </actionGroup>
  11. <actionGroup name="AdminDisableShippingMethodFlushConfigCache" extends="AdminDisableShippingMethod">
  12. <magentoCLI stepKey="flushCache" command="cache:flush config" after="removeBearerToken" />
  13. </actionGroup>
  14. <!-- Enable the shipping method -->
  15. <actionGroup name="AdminEnableShippingMethod" extends="AdminNavigateToShippingConfiguration">
  16. <scrollTo stepKey="scrollToEnabled" y="85" selector="{{MagentoShippingSection.isTemandoActive}}" after="waitForShippingConfigurationToLoad" />
  17. <selectOption selector="{{MagentoShippingSection.isTemandoActive}}" stepKey="seeShippingEnabled" userInput="1" />
  18. <fillField stepKey="fillApiEndpoint" selector="{{MagentoShippingSection.sessionEndpoint}}" userInput="{{_CREDS.carriers_temando_session_endpoint}}" />
  19. <fillField stepKey="fillAccountId" selector="{{MagentoShippingSection.accountId}}" userInput="{{_CREDS.carriers_temando_account_id}}" />
  20. <fillField stepKey="fillBearerToken" selector="{{MagentoShippingSection.bearerToken}}" userInput="{{_CREDS.carriers_temando_bearer_token}}" />
  21. <click stepKey="clickSave" selector="{{MagentoShippingSection.ButtonSave}}" />
  22. <seeInCurrentUrl stepKey="returnToConfigurationPage" url="{{TemandoAdminConfigPage.url}}" />
  23. <waitForPageLoad stepKey="waitForSuccess" />
  24. <see stepKey="seeSuccessMessage" userInput="You saved the configuration." />
  25. </actionGroup>
  26. <!-- Admin menu links -->
  27. <actionGroup name="AdminShippingModuleMenuLinks">
  28. <click selector="{{TemandoAdminMenuSection.StoresMenuItem}}" stepKey="clickStoresMenuItem" />
  29. <seeElement selector="{{TemandoAdminMenuSection.CarriersMenuItemLink}}" stepKey="seeCarriersMenuItem" />
  30. <seeElement selector="{{TemandoAdminMenuSection.LocationsMenuItemLink}}" stepKey="seeLocationsMenuItem" />
  31. <seeElement selector="{{TemandoAdminMenuSection.PackagingMenuItemLink}}" stepKey="seePackagingMenuItem" />
  32. <seeElement selector="{{TemandoAdminMenuSection.ExperiencesMenuItemLink}}" stepKey="seeExperiencesMenuItem" />
  33. </actionGroup>
  34. <!-- Activate shipping method link -->
  35. <actionGroup name="ActivateShippingLink">
  36. <see stepKey="seeActivationMessage" userInput="Activate Magento Shipping" />
  37. <seeLink stepKey="seeActivationLink" userInput="Activate Magento Shipping" />
  38. <click stepKey="clickActivateShippinglink" userInput="Activate Magento Shipping" />
  39. <seeInCurrentUrl stepKey="seeShippingConfigurationUrl" url="system_config/edit/section/carriers" />
  40. </actionGroup>
  41. <!-- Navigate to the carriers configuration page -->
  42. <actionGroup name="AdminNavigateToCarrierConfiguration">
  43. <click selector="{{TemandoAdminMenuSection.StoresMenuItem}}" stepKey="clickStoresMenuItem" />
  44. <seeElement selector="{{TemandoAdminMenuSection.CarriersMenuItemLink}}" stepKey="seeCarriersMenuItem" />
  45. <click stepKey="clickCarriersConfigurationLink" selector="{{TemandoAdminMenuSection.CarriersMenuItemLink}}" />
  46. <waitForPageLoad stepKey="waitForCarriersConfigurationPage" />
  47. </actionGroup>
  48. <!-- Navigate to the locations configuration page -->
  49. <actionGroup name="AdminNavigateToLocationConfiguration">
  50. <click stepKey="clickStoresMenuItem" selector="{{TemandoAdminMenuSection.StoresMenuItem}}" />
  51. <seeElement stepKey="seeLocationsMenuItem" selector="{{TemandoAdminMenuSection.LocationsMenuItemLink}}" />
  52. <click stepKey="clickLocationsConfigurationLink" selector="{{TemandoAdminMenuSection.LocationsMenuItemLink}}" />
  53. <waitForPageLoad stepKey="waitForLocationsConfigurationPage" />
  54. </actionGroup>
  55. <!-- Navigate to the packaging configuration page -->
  56. <actionGroup name="AdminNavigateToPackagingConfiguration">
  57. <click stepKey="clickStoresMenuItem" selector="{{TemandoAdminMenuSection.StoresMenuItem}}" />
  58. <seeElement stepKey="seePackagingMenuItem" selector="{{TemandoAdminMenuSection.PackagingMenuItemLink}}" />
  59. <click stepKey="clickPackagingConfigurationLink" selector="{{TemandoAdminMenuSection.PackagingMenuItemLink}}" />
  60. <waitForPageLoad stepKey="waitForPackagingConfigurationPage" />
  61. </actionGroup>
  62. <!-- Navigate to the shipping configuration page -->
  63. <actionGroup name="AdminNavigateToShippingConfiguration">
  64. <amOnPage url="{{TemandoAdminConfigPage.url}}" stepKey="navigateToShippingConfiguration" />
  65. <waitForPageLoad stepKey="waitForShippingConfigurationToLoad" />
  66. <conditionalClick selector="{{MagentoShippingSection.sectionHead}}" dependentSelector="{{MagentoShippingSection.isTemandoActive}}" visible="false" stepKey="expandMagentoShipping" />
  67. </actionGroup>
  68. <!-- Navigate to the advanced settings page -->
  69. <actionGroup name="AdminNavigateToAdvancedSettings">
  70. <amOnPage url="{{TemandoAdvancedSettingsPage.url}}" stepKey="navigateToAdvancedSettings" />
  71. <waitForPageLoad stepKey="waitForAdvancedSettingsToLoad" />
  72. <see stepKey="seeAdvancedSettings" userInput="Advanced Settings" />
  73. </actionGroup>
  74. <!-- Navigate to the checkout view settings page -->
  75. <actionGroup name="AdminNavigateToCheckoutViewSettings">
  76. <amOnPage url="{{TemandoCheckoutViewSettingsPage.url}}" stepKey="navigateToCheckoutViewSettings" />
  77. <waitForPageLoad stepKey="waitForCheckoutViewSettings" />
  78. <see stepKey="seeCheckoutViewSettings" userInput="Show Fields At Checkout" />
  79. </actionGroup>
  80. <!-- Disabled getting started buttons -->
  81. <actionGroup name="AdminGettingStartedButtonsDisabled">
  82. <scrollTo stepKey="scrollToSectionConfiguration" selector="{{MagentoShippingSection.GettingStartedSection}}" />
  83. <see stepKey="seeActivateMessage" userInput="Once you have activated Magento Shipping, configure these sections to get up and running" />
  84. <seeElement stepKey="seeLocationsConfigureButtonDisabled" selector="{{MagentoShippingSection.GettingStartedLocationsButtonDisabled}}" />
  85. <seeElement stepKey="seeCarriersConfigureButtonDisabled" selector="{{MagentoShippingSection.GettingStartedCarriersButtonDisabled}}" />
  86. <seeElement stepKey="seePackagingConfigureButtonDisabled" selector="{{MagentoShippingSection.GettingStartedPackagingButtonDisabled}}" />
  87. <seeElement stepKey="seeShippingExperiencesConfigureButtonDisabled" selector="{{MagentoShippingSection.GettingStartedShippingExperiencesButtonDisabled}}" />
  88. </actionGroup>
  89. <!-- Update configuration -->
  90. <actionGroup name="AdminUpdateShippingConfiguration">
  91. <arguments>
  92. <argument name="isActive" defaultValue="0" type="string" />
  93. <argument name="apiEndpoint" defaultValue="" type="string" />
  94. <argument name="apiAccountId" defaultValue="" type="string" />
  95. <argument name="apiBearerToken" defaultValue="" type="string" />
  96. </arguments>
  97. <scrollTo stepKey="scrollToEnabled" y="-85" selector="{{MagentoShippingSection.isTemandoActive}}" />
  98. <selectOption selector="{{MagentoShippingSection.isTemandoActive}}" stepKey="seeShippingEnabled" userInput="{{isActive}}" />
  99. <fillField stepKey="fillApiEndpoint" selector="{{MagentoShippingSection.sessionEndpoint}}" userInput="{{apiEndpoint}}" />
  100. <fillField stepKey="fillAccountId" selector="{{MagentoShippingSection.accountId}}" userInput="{{apiAccountId}}" />
  101. <fillField stepKey="fillBearerToken" selector="{{MagentoShippingSection.bearerToken}}" userInput="{{apiBearerToken}}" />
  102. </actionGroup>
  103. <actionGroup name="AdminUpdateShippingConfigurationWithSave" extends="AdminUpdateShippingConfiguration">
  104. <click stepKey="clickSave" selector="{{MagentoShippingSection.ButtonSave}}" />
  105. <seeInCurrentUrl stepKey="returnToConfigurationPage" url="{{TemandoAdminConfigPage.url}}" />
  106. <waitForPageLoad stepKey="waitForSuccess" />
  107. <see stepKey="seeSuccessMessage" userInput="You saved the configuration." />
  108. </actionGroup>
  109. <!-- Enable collection points -->
  110. <actionGroup name="AdminEnableCollectionPoints">
  111. <arguments>
  112. <argument name="isActive" defaultValue="0" type="string" />
  113. <argument name="countries" defaultValue="" type="string" />
  114. </arguments>
  115. <scrollTo stepKey="scrollToCollectionPoints" selector="{{MagentoShippingSection.CollectionPointsEnabled}}" y="85" />
  116. <selectOption selector="{{MagentoShippingSection.CollectionPointsEnabled}}" stepKey="setCollectionPointsEnabled" userInput="{{isActive}}" />
  117. <selectOption selector="{{MagentoShippingSection.CollectionPointCountries}}" stepKey="setCollectionPointCountries" parameterArray="{{countries}}" />
  118. </actionGroup>
  119. <!-- Enable click and collect -->
  120. <actionGroup name="AdminEnableClickAndCollect">
  121. <arguments>
  122. <argument name="isActive" defaultValue="0" type="string" />
  123. </arguments>
  124. <scrollTo stepKey="scrollToClickAndCollect" selector="{{MagentoShippingSection.ClickAndCollectionEnabled}}" y="85" />
  125. <selectOption selector="{{MagentoShippingSection.ClickAndCollectionEnabled}}" stepKey="enableClickAndCollect" userInput="{{isActive}}"/>
  126. </actionGroup>
  127. <!-- Enable sync -->
  128. <actionGroup name="AdminAdvancedSettingsEnableSync">
  129. <click selector="{{AdvancedSettingsSection.SyncEnabled}}" stepKey="clickEnableSync" />
  130. <checkOption selector="{{AdvancedSettingsSection.SyncShipment}}" stepKey="enableSyncShipment" />
  131. </actionGroup>
  132. <actionGroup name="AdminAdvancedSettingsEnableSyncWithSave" extends="AdminAdvancedSettingsEnableSync">
  133. <click stepKey="clickAdvancedSettingsSave" selector="{{AdvancedSettingsSection.ButtonSave}}" after="enableSyncShipment" />
  134. <seeInCurrentUrl stepKey="returnToConfigurationPageFromAdvancedSettings" url="{{TemandoAdminConfigPage.url}}" />
  135. <see stepKey="seeAdvancedSettingsSuccessMessage" userInput="Settings saved successfully, stream created" />
  136. </actionGroup>
  137. <!-- Save shipping configuration -->
  138. <actionGroup name="SaveConfiguration">
  139. <click stepKey="clickSave" selector="{{MagentoShippingSection.ButtonSave}}" />
  140. <seeInCurrentUrl stepKey="returnToConfigurationPage" url="{{TemandoAdminConfigPage.url}}" />
  141. <see stepKey="seeSuccessMessage" userInput="You saved the configuration." />
  142. </actionGroup>
  143. <!-- Enable address type -->
  144. <actionGroup name="AdminEnableAddressType">
  145. <checkOption selector="{{CheckoutViewSettingsSection.AddressType}}" stepKey="checkAddressType" />
  146. <selectOption selector="{{CheckoutViewSettingsSection.DropdownOptions}}" parameterArray="['Residential','Business']" stepKey="selectDropdownValues" />
  147. <selectOption selector="{{CheckoutViewSettingsSection.DefaultValue}}" userInput="Residential" stepKey="selectDefaultValue" />
  148. </actionGroup>
  149. <actionGroup name="AdminEnableAddressTypeWithSave" extends="AdminEnableAddressType">
  150. <click stepKey="clickSaveAddressType" selector="button.save" after="selectDefaultValue" />
  151. <waitForPageLoad stepKey="waitForAddressTypeSave" />
  152. <seeInCurrentUrl stepKey="returnToConfigurationPageFromAddressTypeSave" url="{{TemandoAdminConfigPage.url}}" />
  153. </actionGroup>
  154. <!-- Disable address type -->
  155. <actionGroup name="AdminDisableAddressType">
  156. <uncheckOption selector="{{CheckoutViewSettingsSection.AddressType}}" stepKey="uncheckAddressType" />
  157. </actionGroup>
  158. <!-- Disable address type with save -->
  159. <actionGroup name="AdminDisableAddressTypeWithSave" extends="AdminDisableAddressType">
  160. <click stepKey="clickSaveAddressType" selector="button.save" after="uncheckAddressType" />
  161. <waitForPageLoad stepKey="waitForAddressTypeSave" />
  162. <seeInCurrentUrl stepKey="returnToConfigurationPageFromAddressTypeSave" url="{{TemandoAdminConfigPage.url}}" />
  163. </actionGroup>
  164. <!-- Verify address type save -->
  165. <actionGroup name="verifyAdressTypeActive">
  166. <seeCheckboxIsChecked selector="{{CheckoutViewSettingsSection.AddressType}}" stepKey="seeAddressTypeChecked" />
  167. <seeInField stepKey="seeDropdownLabel" selector="{{CheckoutViewSettingsSection.DropdownLabel}}" userInput="Address Type" />
  168. <seeOptionIsSelected selector="{{CheckoutViewSettingsSection.DropdownOptions}}" stepKey="seeResidentialOptionIsSelected" userInput="Residential" />
  169. <seeOptionIsSelected selector="{{CheckoutViewSettingsSection.DropdownOptions}}" stepKey="seeBusinessOptionIsSelected" userInput="Business" />
  170. <seeOptionIsSelected selector="{{CheckoutViewSettingsSection.DefaultValue}}" stepKey="seeDefaultValueIsSelected" userInput="Residential" />
  171. </actionGroup>
  172. <!-- Enable authority to leave -->
  173. <actionGroup name="AdminEnableAuthorityToLeave">
  174. <checkOption selector="{{CheckoutViewSettingsSection.AuthorityToLeave}}" stepKey="checkAddressType" />
  175. <seeElement stepKey="seeCheckboxLabel" selector="{{CheckoutViewSettingsSection.AuthorityToLeaveCheckboxLabel}}" />
  176. </actionGroup>
  177. <actionGroup name="AdminEnableAuthorityToLeaveWithSave" extends="AdminEnableAuthorityToLeave">
  178. <click stepKey="clickSaveAuthorityToLeave" selector="button.save" after="seeCheckboxLabel" />
  179. <waitForPageLoad stepKey="waitForAuthorityToLeaveSave" />
  180. <seeInCurrentUrl stepKey="returnToConfigurationPageFromAuthorityToLeaveSave" url="{{TemandoAdminConfigPage.url}}" />
  181. </actionGroup>
  182. <!-- Disable authority to leave -->
  183. <actionGroup name="AdminDisableAuthorityToLeave">
  184. <uncheckOption selector="{{CheckoutViewSettingsSection.AuthorityToLeave}}" stepKey="uncheckAddressType" />
  185. </actionGroup>
  186. <actionGroup name="AdminDisableAuthorityToLeaveWithSave" extends="AdminDisableAuthorityToLeave">
  187. <click stepKey="clickSaveAuthorityToLeave" selector="button.save" after="uncheckAddressType" />
  188. <waitForPageLoad stepKey="waitForAuthorityToLeaveSave" />
  189. <seeInCurrentUrl stepKey="returnToConfigurationPageFromAuthorityToLeaveSave" url="{{TemandoAdminConfigPage.url}}" />
  190. </actionGroup>
  191. <!-- Verify authority to leave save -->
  192. <actionGroup name="VerifyAuthorityToLeaveActive">
  193. <seeCheckboxIsChecked selector="{{CheckoutViewSettingsSection.AuthorityToLeave}}" stepKey="seeAuthorityToLeaveCheckboxChecked" />
  194. <seeInField stepKey="seeCheckboxLabel" userInput="Authority To Leave" selector="{{CheckoutViewSettingsSection.AuthorityToLeaveCheckboxLabel}}" />
  195. </actionGroup>
  196. <!-- Enable signature required -->
  197. <actionGroup name="AdminEnableSignatureRequired">
  198. <checkOption selector="{{CheckoutViewSettingsSection.SignatureRequired}}" stepKey="enableSignatureRequired" />
  199. <seeElement stepKey="seeCheckboxLabel" selector="{{CheckoutViewSettingsSection.SignatureRequiredCheckboxLabel}}" />
  200. </actionGroup>
  201. <actionGroup name="AdminEnableSignatureRequiredWithSave" extends="AdminEnableSignatureRequired">
  202. <click stepKey="clickSaveSignatureRequired" selector="button.save" after="seeCheckboxLabel" />
  203. <waitForPageLoad stepKey="waitForSignatureRequiredSave" />
  204. <seeInCurrentUrl stepKey="returnToConfigurationPageFromSignatureRequiredSave" url="{{TemandoAdminConfigPage.url}}" />
  205. </actionGroup>
  206. <!-- Disable signature required -->
  207. <actionGroup name="AdminDisableSignatureRequired">
  208. <uncheckOption selector="{{CheckoutViewSettingsSection.SignatureRequired}}" stepKey="uncheckSignatureRequired" />
  209. </actionGroup>
  210. <actionGroup name="AdminDisableSignatureRequiredWithSave" extends="AdminDisableSignatureRequired">
  211. <click stepKey="clickSaveSignatureRequired" selector="button.save" after="uncheckSignatureRequired" />
  212. <waitForPageLoad stepKey="waitForSignatureRequiredSave" />
  213. <seeInCurrentUrl stepKey="returnToConfigurationPageFromSignatureRequiredSave" url="{{TemandoAdminConfigPage.url}}" />
  214. </actionGroup>
  215. <!-- Verify signature required -->
  216. <actionGroup name="VerifySignatureRequiredActive">
  217. <seeCheckboxIsChecked selector="{{CheckoutViewSettingsSection.SignatureRequired}}" stepKey="seeSignatureRequiredCheckboxChecked" />
  218. <seeInField stepKey="seeCheckboxLabel" userInput="Signature Required" selector="{{CheckoutViewSettingsSection.SignatureRequiredCheckboxLabel}}" />
  219. </actionGroup>
  220. </actionGroups>