Debian Codegraph @

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

raw symbols SCIP
1 import { registry } from "@web/core/registry";
2
3 // This tour relies on a data created from the python test.
4 registry.category("web_tour.tours").add('tour_variants_modal_window', {
5 url: '/shop?search=Short (TEST)',
6 steps: () => [
7 {
8 content: "Select the Short (TEST) product",
9 trigger: `.oe_product_cart a:contains(/^Short \\(TEST\\)$/)`,
10 run: "click",
11 expectUnloadPage: true,
12 },
13 {
14 content: "Click on the always variant",
15 trigger: 'input[data-attribute-name="Always attribute size"][data-value-name="M always"]',
16 run: "check",
17 },
18 {
19 content: "Click on the dynamic variant",
20 trigger: 'input[data-attribute-name="Dynamic attribute size"][data-value-name="M dynamic"]',
21 run: "check",
22 },
23 {
24 content: "Click on the never variant",
25 trigger: 'input[data-attribute-name="Never attribute size"][data-value-name="M never"]',
26 run: "check",
27 },
28 {
29 content: "Click on the never custom variant",
30 trigger: 'input[data-attribute-name="Never attribute size custom"][data-value-name="Yes never custom"]',
31 run: "check",
32 },
33 {
34 trigger: 'input.variant_custom_value',
35 run: "edit TEST",
36 },
37 {
38 content: "Click add to cart",
39 trigger: '#add_to_cart',
40 run: "click",
41 },
42 {
43 trigger:
44 '.modal:has(table.o_sale_product_configurator_table)',
45 },
46 {
47 content: "Go through the modal window of the product configurator",
48 trigger: 'button:contains("Checkout")',
49 run: "click",
50 expectUnloadPage: true,
51 },
52 {
53 content: "Check the product is in the cart",
54 trigger: 'div>a>h6:contains(Short (TEST))',
55 },
56 {
57 content: "Check always variant",
58 trigger: 'span[class*=h6]:contains(M always)',
59 },
60 {
61 content: "Check dynamic variant",
62 trigger: 'span[class*=h6]:contains(M dynamic)',
63 },
64 {
65 content: "Check never variant",
66 trigger: 'div.text-muted>span:contains(Never attribute size: M never)',
67 },
68 {
69 content: "Check never custom variant",
70 trigger: 'div.text-muted>span:contains(Never attribute size custom: Yes never custom: TEST)',
71 }
72 ]});