AdminCartPriceRulesFormSection.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
  10. <section name="AdminCartPriceRulesFormSection">
  11. <element name="save" type="button" selector="#save" timeout="30"/>
  12. <element name="saveAndContinue" type="button" selector="#save_and_continue" timeout="30"/>
  13. <element name="delete" type="button" selector="#delete" timeout="30"/>
  14. <element name="modalAcceptButton" type="button" selector="button.action-accept" timeout="30"/>
  15. <!-- Rule Information (the main form on the page) -->
  16. <element name="ruleInformationHeader" type="button" selector="div[data-index='rule_information']" timeout="30"/>
  17. <element name="ruleName" type="input" selector="input[name='name']"/>
  18. <element name="websites" type="multiselect" selector="select[name='website_ids']"/>
  19. <element name="customerGroups" type="multiselect" selector="select[name='customer_group_ids']"/>
  20. <element name="coupon" type="select" selector="select[name='coupon_type']"/>
  21. <element name="couponCode" type="input" selector="input[name='coupon_code']"/>
  22. <element name="useAutoGeneration" type="checkbox" selector="input[name='use_auto_generation']"/>
  23. <element name="fromDate" type="input" selector="input[name='from_date']"/>
  24. <element name="toDate" type="input" selector="input[name='to_date']"/>
  25. <element name="userPerCoupon" type="input" selector="//input[@name='uses_per_coupon']"/>
  26. <element name="userPerCustomer" type="input" selector="//input[@name='uses_per_customer']"/>
  27. <element name="priority" type="input" selector="//*[@name='sort_order']"/>
  28. <!-- Conditions sub-form -->
  29. <element name="conditionsHeader" type="button" selector="div[data-index='conditions']" timeout="30"/>
  30. <element name="conditionsHeaderOpen" type="button" selector="div[data-index='conditions'] div[data-state-collapsible='open']" timeout="30"/>
  31. <element name="conditionsValue" type="input" selector=".rule-param-edit input"/>
  32. <element name="conditionsOperator" type="select" selector=".rule-param-edit select"/>
  33. <element name="addCondition" type="button" selector="//*[@id='conditions__{{arg}}__children']//span" parameterized="true"/>
  34. <element name="ruleCondition" type="select" selector="rule[conditions][{{arg}}][new_child]" parameterized="true"/>
  35. <element name="ruleParameter" type="text" selector="//span[@class='rule-param']/a[contains(text(), '{{arg}}')]" parameterized="true"/>
  36. <element name="ruleParameterSelect" type="select" selector="rule[conditions][{{arg}}][operator]" parameterized="true"/>
  37. <element name="ruleParameterInput" type="input" selector="rule[conditions][{{arg}}][value]" parameterized="true"/>
  38. <element name="openChooser" type="button" selector="//label[@for='conditions__{{arg}}__value']" parameterized="true"/>
  39. <element name="categoryCheckbox" type="checkbox" selector="//span[contains(text(), '{{arg}}')]/parent::a/preceding-sibling::input[@type='checkbox']" parameterized="true"/>
  40. <!-- Actions sub-form -->
  41. <element name="actionsTab" type="text" selector="//div[@data-index='actions']//span[contains(.,'Actions')][1]"/>
  42. <element name="actionsHeader" type="button" selector="div[data-index='actions']" timeout="30"/>
  43. <element name="actionsHeaderOpen" type="button" selector="div[data-index='actions'] div[data-state-collapsible='open']" timeout="30"/>
  44. <element name="apply" type="select" selector="select[name='simple_action']"/>
  45. <element name="conditions" type="button" selector=".rule-param.rule-param-new-child > a"/>
  46. <element name="childAttribute" type="select" selector="//select[contains(@name, 'new_child')]"/>
  47. <element name="condition" type="text" selector="//span[@class='rule-param']/a[text()='{{arg}}']" parameterized="true"/>
  48. <element name="operator" type="select" selector="//select[contains(@name, '[operator]')]"/>
  49. <element name="option" type="select" selector="//ul[@class='rule-param-children']//select[contains(@name, '[value]')]"/>
  50. <element name="actionValue" type="input" selector=".rule-param-edit input"/>
  51. <element name="actionOperator" type="select" selector=".rule-param-edit select"/>
  52. <element name="applyDiscountToShipping" type="checkbox" selector="input[name='apply_to_shipping']"/>
  53. <element name="applyDiscountToShippingLabel" type="checkbox" selector="input[name='apply_to_shipping']+label"/>
  54. <element name="discountAmount" type="input" selector="input[name='discount_amount']"/>
  55. <element name="discountStep" type="input" selector="input[name='discount_step']"/>
  56. <element name="addRewardPoints" type="input" selector="input[name='extension_attributes[reward_points_delta]']"/>
  57. <element name="freeShipping" type="select" selector="//select[@name='simple_free_shipping']"/>
  58. <!-- Manage Coupon Codes sub-form -->
  59. <element name="manageCouponCodesHeader" type="button" selector="div[data-index='manage_coupon_codes']" timeout="30"/>
  60. <element name="successMessage" type="text" selector="div.message.message-success.success"/>
  61. <element name="couponQty" type="input" selector="#coupons_qty"/>
  62. <element name="generateCouponsButton" type="button" selector="#coupons_generate_button" timeout="30"/>
  63. <element name="generatedCouponByIndex" type="text" selector="#couponCodesGrid_table > tbody > tr:nth-child({{var}}) > td.col-code" parameterized="true"/>
  64. </section>
  65. </sections>