[FIX] website_slides: add missing no-demo test data

The `course_publisher_standard` tour was missing slide (channel) tags.

We are replacing values used in the tour so that the tour
runs on the same data whether demo data is installed or not.

See runbot build errors 55762 and 55768.

Task-3744848

closes odoo/odoo#156797

X-original-commit: 7d614147bde737c69bed928c7c19d1ac3e7077c8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
This commit is contained in:
Florian Charlier
2024-03-07 13:23:22 +00:00
parent 696389439d
commit c1b86a946d
3 changed files with 10 additions and 5 deletions
@@ -28,8 +28,8 @@ wTourUtils.registerWebsitePreviewTour('course_publisher_standard', {
trigger: '.o_field_many2many_tags input',
run: 'text Gard',
}, {
content: 'eLearning: select gardener tag',
trigger: '.ui-autocomplete a:contains("Gardener")',
content: 'eLearning: select Gardening tag',
trigger: '.ui-autocomplete a:contains("Gardening")',
in_modal: false,
}, {
content: 'eLearning: set description',
@@ -83,8 +83,8 @@ var addArticleToSection = function (sectionName, pageName, backend) {
content: 'eLearning: click on tags',
trigger: (backend ? 'iframe ' : '' ) + 'ul.select2-choices:first',
}, {
content: 'eLearning: select Theory tag',
trigger: (backend ? 'iframe ' : '' ) + 'div.select2-result-label:contains("Theory")',
content: 'eLearning: select Practice tag',
trigger: (backend ? 'iframe ' : '' ) + 'div.select2-result-label:contains("Practice")',
in_modal: false,
}, {
content: 'eLearning: fill article completion time',
@@ -7,7 +7,7 @@ from dateutil.relativedelta import relativedelta
from odoo import tests
from odoo.addons.base.tests.common import HttpCaseWithUserPortal
from odoo.addons.gamification.tests.common import HttpCaseGamification
from odoo.fields import Datetime
from odoo.fields import Command, Datetime
from odoo.tools import mute_logger
from odoo.tools.misc import file_open
@@ -202,6 +202,11 @@ class TestUiPublisher(HttpCaseGamification):
(4, self.env.ref('website_slides.group_website_slides_manager').id)
],
})
self.env['slide.channel.tag.group'].create([{
'name': 'Your Favorite Role',
'tag_ids': [Command.create({'name': 'Gardening'})]}
])
self.env['slide.tag'].create({'name': 'Practice'})
self.start_tour(self.env['website'].get_client_action_url('/slides'), 'course_publisher_standard', login=user_demo.login)