Debian Codegraph @

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

raw symbols SCIP
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('shop_update_cart', {
5 url: '/shop',
6 steps: () => [
7 ...tourUtils.searchProduct("conference chair", { select: true }),
8 {
9 trigger: "#product_detail",
10 },
11 {
12 content: "select Conference Chair Aluminium",
13 trigger: 'label:contains(Aluminium) input',
14 run: "click",
15 },
16 {
17 trigger: "#product_detail",
18 },
19 {
20 content: "select Conference Chair Steel",
21 trigger: 'label:contains(Steel) input',
22 run: "click",
23 },
24 {
25 trigger: "label:contains(Steel) input:checked",
26 },
27 {
28 content: "click on add to cart",
29 trigger: '#product_detail form #add_to_cart',
30 run: "click",
31 },
32 {
33 content: "click in modal on 'Proceed to checkout' button",
34 trigger: 'button:contains("Checkout")',
35 run: "click",
36 expectUnloadPage: true,
37 },
38 ...tourUtils.assertCartContains({productName: 'Conference Chair', combinationName: 'Steel'}),
39 {
40 content: "add suggested",
41 trigger: '.js_cart_lines:has(a:contains("Storage Box")) button:contains("Add to cart")',
42 run: "click",
43 expectUnloadPage: true,
44 },
45 {
46 trigger: '#cart_products a[name="o_cart_line_product_link"]>h6:contains("Storage Box")',
47 },
48 {
49 content: "remove Storage Box",
50 trigger: '#cart_products div:has(a[name="o_cart_line_product_link"]>h6:contains("Storage Box")) a:has(i.oi-minus)',
51 run: "click",
52 },
53 {
54 trigger: '#wrap:not(:has(#cart_products a[name="o_cart_line_product_link"]>h6:contains("Storage Box")))',
55 },
56 {
57 content: "add one more",
58 trigger: '#cart_products div:has(a[name="o_cart_line_product_link"]>h6:contains("Conference Chair")) a:has(i.oi-plus)',
59 run: "click",
60 },
61 {
62 trigger: '#cart_products div:has(div>a>h6:contains("Conference Chair")) input.js_quantity:value(2)',
63 },
64 {
65 content: "set one",
66 trigger: '#cart_products input.js_quantity',
67 run: "edit 1",
68 },
69 ],
70 });