Skip to content

Commit a667602

Browse files
committed
[FIX] theme_test_custo: correct tour trigger to look for svg images
Since [1], the test "test_01_menu_hierarchies" fails. Note that the check is not as strong as before as we cannot check the source of the image. Since [2], the btn-primary is now btn-secondary --- [1]: odoo/odoo@3cc5ff6 [2]: odoo/odoo@eca4d1b runbot-226641 closes #1102 Signed-off-by: Robin Lejeune (role) <[email protected]>
1 parent 030218b commit a667602

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

theme_test_custo/static/src/builder/footer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<BuilderSelectItem title.translate="Custom Theme"
88
actionParam="{ view: 'theme_test_custo.template_footer_custom', vars: { 'footer-template': 'custom-theme' } }"
99
>
10-
<Img src="'/theme_test_custo/static/src/img/template_footer_opt.svg'"/>
10+
<Img src="'/theme_test_custo/static/src/img/template_footer_opt.svg'" class="'theme_test_custo_footer'"/>
1111
</BuilderSelectItem>
1212
</xpath>
1313
</t>

theme_test_custo/static/src/builder/header.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
]"
1818
>
19-
<Img src="'/theme_test_custo/static/src/img/template_header_opt.svg'"/>
19+
<Img src="'/theme_test_custo/static/src/img/template_header_opt.svg'" class="'theme_test_custo_header'"/>
2020
</BuilderSelectItem>
2121
</xpath>
2222
</t>

theme_test_custo/static/tests/tours/theme_menu_hierarchies.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ wTourUtils.registerWebsitePreviewTour('theme_menu_hierarchies', {
3939
run: "click",
4040
}, {
4141
content: 'The theme custom footer template should be listed and selected',
42-
trigger: '[data-container-title="Footer"] [data-label="Template"] button.btn-primary img[src*="/theme_test_custo"]',
42+
trigger: '[data-container-title="Footer"] [data-label="Template"] button.btn-secondary svg.theme_test_custo_footer',
4343
run: () => null, // It's a check.
4444
}, {
4545
content: 'Click on header',
4646
trigger: ':iframe header',
4747
run: "click",
4848
}, {
4949
content: 'The theme custom header template should be listed and selected',
50-
trigger: '[data-container-title="Header"] [data-label="Template"] button.btn-primary img[src*="/theme_test_custo"]',
50+
trigger: '[data-container-title="Header"] [data-label="Template"] button.btn-secondary svg.theme_test_custo_header',
5151
run: () => null, // It's a check.
5252
}, {
5353
content: 'Click on image which has a shape',
@@ -63,7 +63,7 @@ wTourUtils.registerWebsitePreviewTour('theme_menu_hierarchies', {
6363
run: "click",
6464
}, {
6565
content: 'The theme custom "Curve 01" shape should be listed and selected',
66-
trigger: '[data-container-title="Text"] [data-label="Shape"] button.btn-primary:contains("Curve 01")',
66+
trigger: '[data-container-title="Text"] [data-label="Shape"] button.btn-secondary:contains("Curve 01")',
6767
run: () => null, // It's a check.
6868
},
6969
]);

0 commit comments

Comments
 (0)