Debian Codegraph @

addons/website_sale/static/tests/tours/website_sale_gmc_advertised_prices.js

raw symbols SCIP
1 import { registry } from '@web/core/registry';
2
3 function check_price(price, currency) {
4 return [
5 {
6 content: 'Check price',
7 trigger: `span.oe_price:contains("${price}")`
8 },
9 {
10 content: 'Check currency',
11 trigger: `span.oe_price:contains("${currency}")`
12 },
13 ]
14 }
15
16 registry.category('web_tour.tours').add('website_sale_gmc_check_advertised_prices_red_sofa_default', {
17 steps: () => check_price('1,000.0', '$')
18 });
19
20 registry.category('web_tour.tours').add('website_sale_gmc_check_advertised_prices_blue_sofa_default', {
21 steps: () => check_price('1,200.0', '$')
22 });
23
24 registry.category('web_tour.tours').add('website_sale_gmc_check_advertised_prices_red_sofa_christmas', {
25 steps: () => check_price('990.0', '€') // 1000.0 * 1.1 (EUR rate) - 10% discount
26 });
27
28 registry.category('web_tour.tours').add('website_sale_gmc_check_advertised_prices_blue_sofa_christmas', {
29 steps: () => check_price('1,188.0', '€') // 1200.0 * 1.1 (EUR rate) - 10% discount
30 });
31
32 registry.category('web_tour.tours').add('website_sale_gmc_check_advertised_prices_red_sofa_tax_included', {
33 steps: () => check_price('1,150.0', '$') // 1000.0 + 15% tax
34 });
35
36 registry.category('web_tour.tours').add('website_sale_gmc_check_advertised_prices_blue_sofa_tax_included', {
37 steps: () => check_price('1,380.0', '$') // 1200.0 + 15% tax
38 });