| 1 |
import { registry } from "@web/core/registry"; |
| 2 |
import * as tourUtils from "@website_sale/js/tours/tour_utils"; |
| 3 |
|
| 4 |
registry.category("web_tour.tours").add("check_free_delivery", { |
| 5 |
url: "/shop", |
| 6 |
steps: () => [ |
| 7 |
|
| 8 |
...tourUtils.addToCart({ productName: "Office Chair Black TEST", expectUnloadPage: true }), |
| 9 |
tourUtils.goToCart({ quantity: 1 }), |
| 10 |
tourUtils.goToCheckout(), |
| 11 |
{ |
| 12 |
trigger: "#o_delivery_methods label:text(Delivery Now Free Over 10)", |
| 13 |
}, |
| 14 |
{ |
| 15 |
content: "Check Free Delivery value to be zero", |
| 16 |
trigger: "#o_delivery_methods span:contains('0.0')", |
| 17 |
run: "click", |
| 18 |
}, |
| 19 |
|
| 20 |
{ |
| 21 |
trigger: '#o_delivery_methods input[name="o_delivery_radio"]:checked', |
| 22 |
}, |
| 23 |
{ |
| 24 |
content: "Ensure price was loaded asynchronously", |
| 25 |
trigger: |
| 26 |
'#o_delivery_methods [name="o_delivery_method"]:contains("20.0"):contains("The Poste")', |
| 27 |
}, |
| 28 |
tourUtils.confirmOrder(), |
| 29 |
{ |
| 30 |
content: "Select `Wire Transfer` payment method", |
| 31 |
trigger: 'input[name="o_payment_radio"][data-payment-method-code="wire_transfer"]', |
| 32 |
run: "click", |
| 33 |
}, |
| 34 |
...tourUtils.pay({ expectUnloadPage: true, waitFinalizeYourPayment: true }), |
| 35 |
{ |
| 36 |
content: "Confirmation page should be shown", |
| 37 |
trigger: "#oe_structure_website_sale_confirmation_1:not(:visible)", |
| 38 |
}, |
| 39 |
], |
| 40 |
}); |