*: web_tour, test_website Since [1] when the link popover was introduced, when the URL of a link was made empty, an validation error appeared by the previously shown URL did still appear inside the popover. After this commit the previously shown link is replaced by a message that indicates that no URL is specified. The telephone and envelope icons are now also always removed when the URL is change: they used to be only toggled, which made it possible to make them appear and disappear by updating an email address or a phone number. Steps to reproduce: - Add an image-text snippet to the page - Select the image - Add a link on the image - Specify URL - Click on image => link popup shows the entered URL - Make the URL field empty - Click on image => link popup still showed the previously entered URL [1]: https://github.com/odoo/odoo/commit/8fcf930a6b6b7ffb0965b0a689c7a3117962ce7e task-2765857 closes odoo/odoo#98845 X-original-commit: f212c56d73f5dad8eb5850b0b39cc92f55706ee2 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
26 lines
805 B
Python
26 lines
805 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
import base64
|
|
|
|
import odoo.tests
|
|
from odoo.tools import mute_logger
|
|
|
|
|
|
@odoo.tests.common.tagged('post_install', '-at_install')
|
|
class TestMedia(odoo.tests.HttpCase):
|
|
|
|
@mute_logger('odoo.addons.http_routing.models.ir_http', 'odoo.http')
|
|
def test_01_replace_media(self):
|
|
SVG = base64.b64encode(b'<svg xmlns="http://www.w3.org/2000/svg"></svg>')
|
|
self.env['ir.attachment'].create({
|
|
'name': 'sample.svg',
|
|
'public': True,
|
|
'mimetype': 'image/svg+xml',
|
|
'datas': SVG,
|
|
})
|
|
self.start_tour("/", 'test_replace_media', login="admin")
|
|
|
|
def test_02_image_link(self):
|
|
self.start_tour("/", 'test_image_link', login="admin")
|