summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/basic_fields_tests.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2018-01-25 15:25:30 +0100
committerGéry Debongnie <ged@odoo.com>2018-01-25 16:31:06 +0100
commit21c1b1acd34406d1c568a66976c69511a656861e (patch)
tree81d20d2a997225fac7fdf8a8942f32d8ca9ef2ce /addons/web/static/tests/fields/basic_fields_tests.js
parenteefe879a37aba221bda84adfd880fb7876955920 (diff)
[FIX] web: add target=_blank to url field widgets
Url in the web client are supposed to open in a new tab. This was the way it worked in v10.0 and was lost with the refactoring of the new views. We just reintroduce that behaviour with this commit. Closes github issue #22389
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
-rw-r--r--addons/web/static/tests/fields/basic_fields_tests.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/static/tests/fields/basic_fields_tests.js b/addons/web/static/tests/fields/basic_fields_tests.js
index 9ea423250e4..fdc8c530af8 100644
--- a/addons/web/static/tests/fields/basic_fields_tests.js
+++ b/addons/web/static/tests/fields/basic_fields_tests.js
@@ -1073,7 +1073,7 @@ QUnit.module('basic_fields', {
QUnit.module('UrlWidget');
QUnit.test('url widget in form view', function (assert) {
- assert.expect(8);
+ assert.expect(9);
var form = createView({
View: FormView,
@@ -1093,6 +1093,8 @@ QUnit.module('basic_fields', {
"should have a anchor with correct classes");
assert.strictEqual(form.$('a.o_form_uri.o_field_widget.o_text_overflow').attr('href'), 'yop',
"should have proper href link");
+ assert.strictEqual(form.$('a.o_form_uri.o_field_widget.o_text_overflow').attr('target'), '_blank',
+ "should have target attribute set to _blank");
assert.strictEqual(form.$('a.o_form_uri.o_field_widget.o_text_overflow').text(), 'yop',
"the value should be displayed properly");