Skip to content

Commit 35a2359

Browse files
shsa-odoodivy-odoo
authored andcommitted
[IMP]: adapt drop_404_ir_attachment_url
1 parent dfb7375 commit 35a2359

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

addons/website/static/tests/tours/drop_404_ir_attachment_url.js

+18-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
changeOption,
33
insertSnippet,
44
registerWebsitePreviewTour,
5+
changeOptionInPopover,
56
} from '@website/js/tours/tour_utils';
67

78
registerWebsitePreviewTour('drop_404_ir_attachment_url', {
@@ -19,11 +20,11 @@ registerWebsitePreviewTour('drop_404_ir_attachment_url', {
1920
run: "click",
2021
},
2122
{
22-
trigger: ".snippet-option-ReplaceMedia",
23+
trigger: ".o-tab-content [data-container-title='Image'] [data-action-id='replaceMedia']",
2324
},
2425
{
2526
content: 'Once the image UI appears, check the image has no size (404)',
26-
trigger: ':iframe .s_404_snippet img',
27+
trigger: ":iframe [data-snippet='s_404_snippet'] img",
2728
run() {
2829
const imgEl = this.anchor;
2930
if (!imgEl.complete
@@ -33,11 +34,23 @@ registerWebsitePreviewTour('drop_404_ir_attachment_url', {
3334
}
3435
},
3536
},
36-
changeOption('ImageTools', 'we-select[data-name="shape_img_opt"] we-toggler'),
37-
changeOption('ImageTools', 'we-button[data-set-img-shape]'),
37+
{
38+
content: 'Click on the shape option',
39+
trigger: ".o-tab-content [data-container-title='Image'] .dropdown-toggle",
40+
run: "click",
41+
},
42+
{
43+
content: "Check the shape option page container is open",
44+
trigger: ".o_customize_tab [data-shape-group-id='basic']",
45+
},
46+
{
47+
content: 'Select the first shape',
48+
trigger: ".o_customize_tab .builder_select_page [data-action-value='html_builder/geometric/geo_shuriken']",
49+
run: "click",
50+
},
3851
{
3952
content: 'Once the shape is applied, check the image has now a size (placeholder image)',
40-
trigger: ':iframe .s_404_snippet img[src^="data:"]',
53+
trigger: ':iframe [data-snippet="s_404_snippet"] img',
4154
run() {
4255
const imgEl = this.anchor;
4356
if (!imgEl.complete

addons/website/tests/test_ui.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,6 @@ def test_interaction_lifecycle(self):
679679
})
680680
self.start_tour(self.env['website'].get_client_action_url('/'), 'interaction_lifecycle', login='admin')
681681

682-
@unittest.skip
683682
def test_drop_404_ir_attachment_url(self):
684683
website_snippets = self.env.ref('website.snippets')
685684
self.env['ir.ui.view'].create([{
@@ -714,7 +713,7 @@ def test_drop_404_ir_attachment_url(self):
714713
'model': 'ir.attachment',
715714
'res_id': attachment.id,
716715
})
717-
self.start_tour(self.env['website'].get_client_action_url('/'), 'drop_404_ir_attachment_url', login='admin')
716+
self.start_tour(self.env['website'].get_client_action_url('/'), 'drop_404_ir_attachment_url', login='admin', watch=True)
718717

719718
@unittest.skip
720719
def test_mobile_order_with_drag_and_drop(self):

0 commit comments

Comments
 (0)