With 98ed53ce when a form view is saved when a html field is in code
view mode, the change is not lost.
This new backend tour check that when saving in or not in code view, the
content is saved effectively.
The test not in code view would ensure issues like #14381 #14351 #14394
are detected on runbot.
closes #14475
opw-693052
note: the old test system is used so this test is only for up to saas-11
16 lines
786 B
Python
16 lines
786 B
Python
from openerp.api import Environment
|
|
import openerp.tests
|
|
|
|
@openerp.tests.common.at_install(False)
|
|
@openerp.tests.common.post_install(True)
|
|
class TestBackendView(openerp.tests.HttpCase):
|
|
|
|
def test_01_rte_backend_inline(self):
|
|
""" Test saving inline editor in or out of code view mode. """
|
|
with self.registry.cursor() as test_cursor:
|
|
env = Environment(test_cursor, self.uid, {})
|
|
test_record = env['web_editor.converter.test'].create({'html': '<p>hello </p>'})
|
|
form_url = "/web?debug#id={}&view_type=form&model=web_editor.converter.test".format(test_record.id)
|
|
|
|
self.phantom_js(form_url, "odoo.__DEBUG__.services['web.Tour'].run('rte_backend_inline', 'test')", "odoo.__DEBUG__.services['web.Tour'].tours.rte", login="admin")
|