No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

33 líneas
1.6 KiB

  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="AssertStorefrontCustomerOrderMatchesGrandTotalActionGroup">
  11. <annotations>
  12. <description>Check that order grand total equals sum of all totals.</description>
  13. </annotations>
  14. <grabTextFrom selector="{{StorefrontSalesOrderSection.salesOrderPrice('subtotal')}}" stepKey="grabValueForSubtotal"/>
  15. <grabTextFrom selector="{{StorefrontSalesOrderSection.salesOrderPrice('shipping')}}" stepKey="grabValueForShippingHandling"/>
  16. <grabTextFrom selector="{{StorefrontSalesOrderSection.salesOrderPrice('grand_total')}}" stepKey="grabValueForGrandTotal"/>
  17. <executeJS function="
  18. var grandTotal = '{$grabValueForGrandTotal}'.substr(1);
  19. return (grandTotal);" stepKey="grandTotalValue"/>
  20. <executeJS function="
  21. var subtotal = '{$grabValueForSubtotal}'.substr(1);
  22. var handling = '{$grabValueForShippingHandling}'.substr(1);
  23. var subtotalHandling = (parseFloat(subtotal) + parseFloat(handling)).toFixed(2);
  24. return (subtotalHandling);" stepKey="sumTotalValue"/>
  25. <assertEquals stepKey="assertSubTotalPrice">
  26. <expectedResult type="variable">sumTotalValue</expectedResult>
  27. <actualResult type="variable">grandTotalValue</actualResult>
  28. </assertEquals>
  29. </actionGroup>
  30. </actionGroups>