[IMP] web: removed extra space in export field list

before this commit:
when manually adding field in export wizard, string has extra space in
begining.

after this commit:
manually added field in export field list doesn't contain any extra
spaces.

task-2065433

closes odoo/odoo#36759

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
Hardik Prajapati
2019-09-12 10:01:47 +00:00
committed by Mohammed Shekha
parent 02327d8a6b
commit 3998fa8dc1
2 changed files with 4 additions and 2 deletions
@@ -139,7 +139,7 @@ var DataExport = Dialog.extend({
$fieldList.append(
$('<li>', {'class': 'o_export_field', 'data-field_id': fieldID}).append(
$('<span>', {'class': "fa fa-arrows o_short_field mx-1"}),
label,
label.trim(),
$('<span>', {'class': 'fa fa-trash m-1 pull-right o_remove_field', 'title': _t("Remove field")})
)
);
@@ -212,7 +212,7 @@ QUnit.module('widgets', {
});
QUnit.test('Export dialog UI test', async function (assert) {
assert.expect(4);
assert.expect(5);
var list = await createView({
View: ListView,
model: 'partner',
@@ -269,6 +269,8 @@ QUnit.module('widgets', {
// Add field
await testUtils.dom.click($('.modal div:contains(Activities) .o_add_field'));
assert.strictEqual($('.modal .o_fields_list li').length, 2, "There should be two fields in export field list.");
assert.strictEqual($('.modal .o_fields_list li:eq(1)').text(), "Activities",
"string of second field in export list should be 'Activities'");
// Remove field
await testUtils.dom.click($('.modal .o_fields_list li:first .o_remove_field'));
assert.strictEqual($('.modal .o_fields_list li').length, 1, "There should be only one field in list");