Skip to content

Commit 9eb2a42

Browse files
divy-odooged-odoo
authored andcommitted
[FIX] test_website: adapt TestImageUploadProgress test
1 parent b5198fc commit 9eb2a42

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

addons/test_website/static/tests/tours/image_upload_progress.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { insertSnippet, registerWebsitePreviewTour } from "@website/js/tours/tour_utils";
22

3-
import { FileSelectorControlPanel } from "@web_editor/components/media_dialog/file_selector";
3+
import { FileSelectorControlPanel } from "@html_editor/main/media/media_dialog/file_selector";
44
import { patch } from "@web/core/utils/patch";
55

66
let patchWithError = false;
@@ -72,7 +72,7 @@ registerWebsitePreviewTour('test_image_upload_progress', {
7272
run: "click",
7373
}, {
7474
content: "click on add images to open image dialog (in multi mode)",
75-
trigger: 'we-customizeblock-option [data-add-images]',
75+
trigger: "button[data-action-id='addImage']",
7676
run: "click",
7777
}, {
7878
content: "manually trigger input change",
@@ -123,7 +123,7 @@ registerWebsitePreviewTour('test_image_upload_progress', {
123123
run: "click",
124124
}, {
125125
content: "click on replace media to open image dialog",
126-
trigger: 'we-customizeblock-option [data-replace-media]',
126+
trigger: "button[data-action-id='replaceMedia']",
127127
run: "click",
128128
}, {
129129
content: "manually trigger input change",
@@ -162,7 +162,7 @@ registerWebsitePreviewTour('test_image_upload_progress', {
162162
run: "click",
163163
}, {
164164
content: "click on replace media to open image dialog",
165-
trigger: 'we-customizeblock-option [data-replace-media]',
165+
trigger: "button[data-action-id='replaceMedia']",
166166
run: "click",
167167
}, {
168168
content: "manually trigger input change",
@@ -206,7 +206,7 @@ registerWebsitePreviewTour('test_image_upload_progress_unsplash', {
206206
run: "click",
207207
}, {
208208
content: "click on replace media to open image dialog",
209-
trigger: 'we-customizeblock-option [data-replace-media]',
209+
trigger: "button[data-action-id='replaceMedia']",
210210
run: "click",
211211
}, {
212212
content: "search 'fox' images",
@@ -230,7 +230,7 @@ registerWebsitePreviewTour('test_image_upload_progress_unsplash', {
230230
run: "click",
231231
}, {
232232
content: "unsplash image (mocked to logo) should have been used",
233-
trigger: ":iframe #wrap .s_image_gallery .img[data-original-src^='/unsplash/HQqIOc8oYro/fox']",
233+
trigger: ":iframe #wrap .s_image_gallery img[src^='/unsplash/HQqIOc8oYro/fox']",
234234
run() {
235235
unpatchMediaDialog();
236236
},

addons/test_website/tests/test_image_upload_progress.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
from odoo import http
1010
import unittest
1111

12-
13-
# TODO master-mysterious-egg fix error
14-
@unittest.skip("prepare mysterious-egg for merging")
1512
@odoo.tests.common.tagged('post_install', '-at_install')
1613
class TestImageUploadProgress(odoo.tests.HttpCase):
1714

0 commit comments

Comments
 (0)