mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-26 23:32:06 +02:00
Initial commit: Sale packages
This commit is contained in:
commit
14e3d26998
6469 changed files with 2479670 additions and 0 deletions
|
|
@ -0,0 +1,46 @@
|
|||
/** @odoo-module */
|
||||
|
||||
import tour from 'web_tour.tour'
|
||||
import wTourUtils from 'website.tour_utils';
|
||||
import wsTourUtils from 'website_sale.tour_utils';
|
||||
|
||||
tour.register('onsite_payment_tour', {
|
||||
test: true,
|
||||
url: '/web',
|
||||
},
|
||||
[
|
||||
...wsTourUtils.addToCart({productName: 'Product Consumable'}),
|
||||
wsTourUtils.goToCart(),
|
||||
wTourUtils.clickOnElement('Proceed to checkout', 'a:contains(Process Checkout)'),
|
||||
...wsTourUtils.fillAdressForm(),
|
||||
wTourUtils.clickOnElement('Example shipping On Site', '.o_delivery_carrier_select:contains("Example shipping On Site")'),
|
||||
wTourUtils.clickOnElement('pay button', 'button[name="o_payment_submit_button"]:visible:not(:disabled)'),
|
||||
{
|
||||
content: "Check if the payment is successful",
|
||||
trigger: 'p:contains(Your order has been saved. Please come to the store to pay for your products)',
|
||||
},
|
||||
|
||||
// Test multi products (Either physical or not)
|
||||
...wsTourUtils.addToCart({productName: 'Product Consumable'}),
|
||||
...wsTourUtils.addToCart({productName: 'Product Service'}),
|
||||
wsTourUtils.goToCart({quantity: 2}),
|
||||
wTourUtils.clickOnElement('Go to payment page', 'a:contains("Process Checkout")'),
|
||||
...wsTourUtils.fillAdressForm(),
|
||||
wTourUtils.clickOnElement('"Pay in store when picking the product"', '.o_delivery_carrier_select:contains("Example shipping On Site")'),
|
||||
wTourUtils.clickOnElement('Pay button', 'button[name="o_payment_submit_button"]:visible:not(:disabled)'),
|
||||
{
|
||||
content: "Check if the payment is successful",
|
||||
trigger: 'p:contains(Your order has been saved. Please come to the store to pay for your products)',
|
||||
},
|
||||
|
||||
// Test without any physical product (option pay on site should not appear)
|
||||
...wsTourUtils.addToCart({productName: 'Product Service'}),
|
||||
wsTourUtils.goToCart(),
|
||||
wTourUtils.clickOnElement('Go to payment page', 'a:contains("Process Checkout")'),
|
||||
...wsTourUtils.fillAdressForm(),
|
||||
{
|
||||
content: 'Assert pay on site is NOT an option',
|
||||
trigger: 'body:not(:contains("Test Payment Provider"))',
|
||||
},
|
||||
]
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue