Skip to content

Commit 5795112

Browse files
committedOct 9, 2024·
[FIX] test_themes: fix test_01_theme_upgrade_post_copy
Since the revamp of the "Nano" theme with this commit [1], the "option_footer_scrolltop" template is no longer enabled for this theme. This causes the "test_01_theme_upgrade_post_copy" test to fail, as it relies on this template being enabled. [1]: 47568ec closes #982 Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
1 parent 94894e1 commit 5795112

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎test_themes/tests/test_theme_upgrade.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ def test_01_theme_upgrade_post_copy(env):
2424
except Exception:
2525
pass
2626

27-
ofs_specific_view = Website.viewref('website.option_footer_scrolltop')
27+
tfd_specific_view = Website.viewref('website.template_footer_descriptive')
2828
fls_specific_view = Website.viewref('portal.footer_language_selector')
2929
theme_nano_module = env.ref('base.module_theme_nano')
3030

3131
def _simulate_user_manual_change():
3232
# Change some website options that will be changed by Theme Nano
33-
ofs_specific_view.active = False
33+
tfd_specific_view.active = False
3434
fls_specific_view.active = True
3535

3636
# 2. Simulate some website option change made by the user
@@ -40,7 +40,7 @@ def _simulate_user_manual_change():
4040
with MockRequest(env, website=website):
4141
theme_nano_module.with_context(website_id=website.id).button_choose_theme()
4242

43-
assert Website.viewref('website.option_footer_scrolltop').active is True, \
43+
assert Website.viewref('website.template_footer_descriptive').active is True, \
4444
"Theme Nano custo should be applied"
4545
assert Website.viewref('portal.footer_language_selector').active is False, \
4646
"Theme Nano custo should be applied (2)"
@@ -53,7 +53,7 @@ def _simulate_user_manual_change():
5353
env.reset() # clear the set of environments
5454
env = env() # get an environment that refers to the new registry
5555

56-
assert Website.viewref('website.option_footer_scrolltop').active is False, \
56+
assert Website.viewref('website.template_footer_descriptive').active is False, \
5757
"Theme Nano custo should NOT be applied"
5858
assert Website.viewref('portal.footer_language_selector').active is True, \
5959
"Theme Nano custo should NOT be applied (2)"

0 commit comments

Comments
 (0)
Please sign in to comment.