Skip to content
Permalink
Browse files

fixup! [WIP] web,account: list view: table-layout: fixed

  • Loading branch information...
aab-odoo committed Mar 21, 2019
1 parent 18c1636 commit 1c0f48d3d2ed81f6c3321cb49420c2830c16eba9
Showing with 11 additions and 10 deletions.
  1. +11 −10 addons/web/static/tests/fields/relational_fields_tests.js
@@ -2659,7 +2659,7 @@ QUnit.module('relational_fields', {
View: FormView,
model: 'partner',
data: this.data,
arch:'<form string="Partners">' +
arch: '<form string="Partners">' +
'<sheet>' +
'<group>' +
'<field name="product_id"/>' +
@@ -2684,14 +2684,14 @@ QUnit.module('relational_fields', {
await testUtils.form.clickEdit(form);
await testUtils.fields.many2one.clickOpenDropdown("product_id");
await testUtils.fields.many2one.clickHighlightedItem("product_id");
assert.containsOnce(form, 'th',
assert.containsOnce(form, 'th:not(.o_list_record_remove_header)',
"should be 1 column when the product_id is set");
await testUtils.fields.editAndTrigger(form.$('.o_field_many2one[name="product_id"] input'),
'', 'keyup');
assert.containsN(form, 'th', 2,
assert.containsN(form, 'th:not(.o_list_record_remove_header)', 2,
"should be 2 columns in the one2many when product_id is not set");
await testUtils.dom.click(form.$('.o_field_boolean[name="bar"] input'));
assert.containsOnce(form, 'th',
assert.containsOnce(form, 'th:not(.o_list_record_remove_header)',
"should be 1 column after the value change");
form.destroy();
});
@@ -2713,7 +2713,7 @@ QUnit.module('relational_fields', {
View: FormView,
model: 'partner',
data: this.data,
arch:'<form>' +
arch: '<form>' +
'<field name="bar"/>' +
'<field name="p">' +
'<tree editable="bottom">' +
@@ -2738,7 +2738,8 @@ QUnit.module('relational_fields', {
await testUtils.fields.editInput(form.$('.o_field_one2many input:first'), 'New line');
await testUtils.dom.click(form.$el);

assert.containsN(form, 'th', 2, "should be 2 columns('foo' + 'int_field')");
assert.containsN(form, 'th:not(.o_list_record_remove_header)', 2,
"should be 2 columns('foo' + 'int_field')");

form.destroy();
});
@@ -2751,7 +2752,7 @@ QUnit.module('relational_fields', {
View: FormView,
model: 'partner',
data: this.data,
arch:'<form string="Partners">' +
arch: '<form string="Partners">' +
'<sheet>' +
'<group>' +
'<field name="product_id"/>' +
@@ -2777,14 +2778,14 @@ QUnit.module('relational_fields', {
await testUtils.form.clickEdit(form);
await testUtils.dom.click(form.$('.o_field_many2one[name="product_id"] input'));
await testUtils.fields.many2one.clickHighlightedItem("product_id");
assert.containsOnce(form, 'th',
assert.containsOnce(form, 'th:not(.o_list_record_remove_header)',
"should be 1 column when the product_id is set");
await testUtils.fields.editAndTrigger(form.$('.o_field_many2one[name="product_id"] input'),
'', 'keyup');
assert.containsN(form, 'th', 2,
assert.containsN(form, 'th:not(.o_list_record_remove_header)', 2,
"should be 2 columns in the one2many when product_id is not set");
await testUtils.dom.click(form.$('.o_field_boolean[name="bar"] input'));
assert.containsOnce(form, 'th',
assert.containsOnce(form, 'th:not(.o_list_record_remove_header)',
"should be 1 column after the value change");
form.destroy();
});

0 comments on commit 1c0f48d

Please sign in to comment.
You can’t perform that action at this time.