Skip to content

Commit

Permalink
[FIX] test_themes, theme_*: fix not working theme tours
Browse files Browse the repository at this point in the history
*: loftspace, real_estate

In commit [1], the test for the "Loftspace" and "Real Estate" themes has
been disabled, as their tour was not working.

This commit fixes the tours and reenables the test for these themes. The
issue was coming from the fact that they were trying to drop more
snippets than there really are, which made an acces to the array at an
inexisting index.

[1]: 04f90cd

closes #978

X-original-commit: 4c3d843
Signed-off-by: Quentin Smetz (qsm) <[email protected]>
  • Loading branch information
sobo-odoo committed Oct 1, 2024
1 parent a242de2 commit a2c0751
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion test_themes/tests/test_crawl.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,5 @@ def test_02_homepage_tour_every_theme(self):
# when designing a theme at the moment.
Website = self.env['website']
websites_themes = Website.get_test_themes_websites()
websites_themes = [theme for index, theme in enumerate(websites_themes) if index not in (17, 23)] # FIXME
for website in websites_themes:
self.start_tour(f"/web?fw={website.id}", 'homepage', login='admin')
1 change: 0 additions & 1 deletion theme_loftspace/static/src/js/tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ wTourUtils.registerThemeHomepageTour("loftspace_tour", () => [
...wTourUtils.insertSnippet(snippets[5]),
...wTourUtils.insertSnippet(snippets[6]),
...wTourUtils.insertSnippet(snippets[7]),
...wTourUtils.insertSnippet(snippets[8]),
...wTourUtils.clickOnSnippet(snippets[4]),
wTourUtils.changeBackgroundColor(),
wTourUtils.selectColorPalette(),
Expand Down
1 change: 0 additions & 1 deletion theme_real_estate/static/src/js/tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,4 @@ wTourUtils.registerThemeHomepageTour("real_estate_tour", () => [
...wTourUtils.insertSnippet(snippets[6]),
...wTourUtils.insertSnippet(snippets[7]),
...wTourUtils.insertSnippet(snippets[8]),
...wTourUtils.insertSnippet(snippets[9]),
]);

0 comments on commit a2c0751

Please sign in to comment.