diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-09-05 18:52:27 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-09-05 18:52:27 +0200 |
| commit | f19e6ce561b80d291cc97bf928c4b84b48ec0f59 (patch) | |
| tree | 7c5419b940876244f95d055682bbe19429ff4747 /addons/web/static/tests | |
| parent | 7700bd172f790858fb4cb9e64b90c9c77d9e5b0a (diff) | |
| parent | 213759b03e5466f119f52a557d7feefb9d477267 (diff) | |
[MERGE] forward port branch 11.0 up to 213759b03e5
Diffstat (limited to 'addons/web/static/tests')
| -rw-r--r-- | addons/web/static/tests/fields/basic_fields_tests.js | 27 | ||||
| -rw-r--r-- | addons/web/static/tests/fields/relational_fields_tests.js | 64 | ||||
| -rw-r--r-- | addons/web/static/tests/helpers/mock_server.js | 2 | ||||
| -rw-r--r-- | addons/web/static/tests/views/calendar_tests.js | 295 | ||||
| -rw-r--r-- | addons/web/static/tests/views/kanban_tests.js | 68 | ||||
| -rw-r--r-- | addons/web/static/tests/views/list_tests.js | 70 | ||||
| -rw-r--r-- | addons/web/static/tests/views/pivot_tests.js | 17 |
7 files changed, 536 insertions, 7 deletions
diff --git a/addons/web/static/tests/fields/basic_fields_tests.js b/addons/web/static/tests/fields/basic_fields_tests.js index 5a6c4e4b0fd..e34579c5ec3 100644 --- a/addons/web/static/tests/fields/basic_fields_tests.js +++ b/addons/web/static/tests/fields/basic_fields_tests.js @@ -4418,6 +4418,33 @@ QUnit.module('basic_fields', { QUnit.module('FieldDomain'); + QUnit.test('The domain editor should not crash the view when given a dynamic filter', function (assert) { + //dynamic filters (containing variables, such as uid, parent or today) + //are not handled by the domain editor, but it shouldn't crash the view + assert.expect(1); + + this.data.partner.records[0].foo = '[["int_field", "=", uid]]'; + + var form = createView({ + View: FormView, + model: 'partner', + data: this.data, + arch: + '<form>' + + '<field name="foo" widget="domain" options="{\'model\': \'partner\'}"/>' + + '<field name="int_field" invisible="1"/>' + + '</form>', + res_id: 1, + session: { + user_context: {uid: 14}, + }, + }); + + assert.strictEqual(form.$('.o_read_mode').text(), "This domain is not supported.", + "The widget should not crash the view, but gracefully admit its failure."); + form.destroy(); + }); + QUnit.test('basic domain field usage is ok', function (assert) { assert.expect(6); diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index 5d9ee218711..b68ac239c13 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -2227,7 +2227,7 @@ QUnit.module('relational_fields', { }); }); - QUnit.test('pressing ENTER on a \'no_quick_create\' many2one should not trigger M2ODialog', function (assert) { + QUnit.test('pressing ENTER on a \'no_quick_create\' many2one should open a M2ODialog', function (assert) { var done = assert.async(); assert.expect(2); @@ -2278,6 +2278,68 @@ QUnit.module('relational_fields', { }); }); + QUnit.test('select a value by pressing TAB on a many2one with onchange', function (assert) { + var done = assert.async(); + assert.expect(3); + + this.data.partner.onchanges.trululu = function () {}; + + var M2O_DELAY = relationalFields.FieldMany2One.prototype.AUTOCOMPLETE_DELAY; + relationalFields.FieldMany2One.prototype.AUTOCOMPLETE_DELAY = 0; + var def = $.Deferred(); + + var form = createView({ + View: FormView, + model: 'partner', + data: this.data, + arch: '<form>' + + '<field name="trululu"/>' + + '<field name="display_name"/>' + + '</form>', + mockRPC: function (route, args) { + var result = this._super.apply(this, arguments); + if (args.method === 'onchange') { + return $.when(def).then(_.constant(result)); + } + return result; + }, + res_id: 1, + viewOptions: { + mode: 'edit', + }, + }); + + var $input = form.$('.o_field_many2one input'); + $input.val("first").trigger('input'); + concurrency.delay(0).then(function () { + var evOptions = { + which: $.ui.keyCode.TAB, + keyCode: $.ui.keyCode.TAB, + }; + $input.trigger($.Event('keydown', evOptions)); + $input.trigger($.Event('keypress', evOptions)); + $input.trigger($.Event('keyup', evOptions)); + + // simulate a focusout (e.g. because the user clicks outside) + // before the onchange returns + form.$('.o_field_char').focus(); + + assert.strictEqual($('.modal').length, 0, + "there shouldn't be any modal in body"); + + // unlock the onchange + def.resolve(); + + assert.strictEqual($input.val(), 'first record', + "first record should have been selected"); + assert.strictEqual($('.modal').length, 0, + "there shouldn't be any modal in body"); + relationalFields.FieldMany2One.prototype.AUTOCOMPLETE_DELAY = M2O_DELAY; + form.destroy(); + done(); + }); + }); + QUnit.test('many2one in editable list + onchange, with enter [REQUIRE FOCUS]', function (assert) { assert.expect(6); var done = assert.async(); diff --git a/addons/web/static/tests/helpers/mock_server.js b/addons/web/static/tests/helpers/mock_server.js index 52a225d1314..59147edb896 100644 --- a/addons/web/static/tests/helpers/mock_server.js +++ b/addons/web/static/tests/helpers/mock_server.js @@ -870,7 +870,7 @@ var MockServer = Class.extend({ var field = args.field ? args.field : 'sequence'; var records = this.data[args.model].records; for (var i in args.ids) { - var record = _.findWhere(this.data[args.model].records, {id: args.ids[i]}); + var record = _.findWhere(records, {id: args.ids[i]}); record[field] = Number(i) + offset; } }, diff --git a/addons/web/static/tests/views/calendar_tests.js b/addons/web/static/tests/views/calendar_tests.js index 9728d8a7c74..f9662308e22 100644 --- a/addons/web/static/tests/views/calendar_tests.js +++ b/addons/web/static/tests/views/calendar_tests.js @@ -456,7 +456,7 @@ QUnit.module('Views', { calendar.destroy(); }); - QUnit.test('create event with timezone in week mode', function (assert) { + QUnit.test('create event with timezone in week mode European locale', function (assert) { assert.expect(5); this.data.event.records = []; @@ -486,6 +486,9 @@ QUnit.module('Views', { return 120; }, }, + translateParameters: { // Avoid issues due to localization formats + time_format: "%H:%M:%S", + }, mockRPC: function (route, args) { if (args.method === "create") { assert.deepEqual(args.kwargs.context, { @@ -504,7 +507,7 @@ QUnit.module('Views', { var $view = $('#qunit-fixture').contents(); $view.prependTo('body'); // => select with click position - var top = calendar.$('.fc-axis:contains(8am)').offset().top + 5; + var top = calendar.$('.fc-axis:contains(8:00)').offset().top + 5; var left = calendar.$('.fc-day:eq(2)').offset().left + 5; try { @@ -550,7 +553,7 @@ QUnit.module('Views', { $view.remove(); }); - QUnit.test('create event with timezone in week mode with formViewDialog', function (assert) { + QUnit.test('create event with timezone in week mode with formViewDialog European locale', function (assert) { assert.expect(8); this.data.event.records = []; @@ -589,6 +592,9 @@ QUnit.module('Views', { return 120; }, }, + translateParameters: { // Avoid issues due to localization formats + time_format: "%H:%M:%S", + }, mockRPC: function (route, args) { if (args.method === "create") { assert.deepEqual(args.kwargs.context, { @@ -610,7 +616,7 @@ QUnit.module('Views', { var $view = $('#qunit-fixture').contents(); $view.prependTo('body'); // => select with click position - var top = calendar.$('.fc-axis:contains(8am)').offset().top + 5; + var top = calendar.$('.fc-axis:contains(8:00)').offset().top + 5; var left = calendar.$('.fc-day:eq(2)').offset().left + 5; try { @@ -699,6 +705,282 @@ QUnit.module('Views', { $view.remove(); }); + QUnit.test('create event with timezone in week mode American locale', function (assert) { + assert.expect(5); + + this.data.event.records = []; + + var calendar = createView({ + View: CalendarView, + model: 'event', + data: this.data, + arch: + '<calendar class="o_calendar_test" '+ + 'event_open_popup="true" '+ + 'date_start="start" '+ + 'date_stop="stop" '+ + 'all_day="allday" '+ + 'mode="week" '+ + 'readonly_form_view_id="1">'+ + '<field name="name"/>'+ + '<field name="start"/>'+ + '<field name="allday"/>'+ + '</calendar>', + archs: archs, + viewOptions: { + initialDate: initialDate, + }, + session: { + getTZOffset: function () { + return 120; + }, + }, + translateParameters: { // Avoid issues due to localization formats + time_format: "%I:%M:%S", + }, + mockRPC: function (route, args) { + if (args.method === "create") { + assert.deepEqual(args.kwargs.context, { + "default_name": null, + "default_start": "2016-12-13 06:00:00", + "default_stop": "2016-12-13 08:00:00", + "default_allday": null + }, + "should send the context to create events"); + } + return this._super(route, args); + }, + }); + + + var $view = $('#qunit-fixture').contents(); + $view.prependTo('body'); // => select with click position + + var top = calendar.$('.fc-axis:contains(8am)').offset().top + 5; + var left = calendar.$('.fc-day:eq(2)').offset().left + 5; + + try { + testUtils.triggerPositionalMouseEvent(left, top, "mousedown"); + } catch (e) { + calendar.destroy(); + $view.remove(); + throw new Error('The test fails to simulate a click in the screen. Your screen is probably too small or your dev tools is open.'); + } + + testUtils.triggerPositionalMouseEvent(left, top + 60, "mousemove"); + + assert.strictEqual(calendar.$('.fc-content .fc-time').text(), "8:00am - 10:00am", + "should display the time in the calendar sticker"); + + testUtils.triggerPositionalMouseEvent(left, top + 60, "mouseup"); + $('.modal input:first').val('new event').trigger('input'); + $('.modal button.btn:contains(Create)').trigger('click'); + var $newevent = calendar.$('.fc-event:contains(new event)'); + + assert.strictEqual($newevent.text().replace(/[\s\n\r]+/g, ''), "8:00am-10:00amnewevent12/13/201608:00:00False", + "should display the new event with time, title and additional fields"); + + assert.deepEqual($newevent.data('fcSeg').event.record, + { + display_name: "new event", + start: fieldUtils.parse.datetime("2016-12-13 06:00:00", this.data.event.fields.start, {isUTC: true}), + stop: fieldUtils.parse.datetime("2016-12-13 08:00:00", this.data.event.fields.stop, {isUTC: true}), + allday: false, + name: "new event", + id: 1 + }, + "the new record should have the utc datetime (quickCreate)"); + + // delete record + + $newevent.trigger('click'); + $('.modal button.btn-default:contains(Delete)').trigger('click'); + $('.modal button.btn-primary:contains(Ok)').trigger('click'); + assert.strictEqual(calendar.$('.fc-content').length, 0, "should delete the record"); + + calendar.destroy(); + $view.remove(); + }); + + QUnit.test('create event with timezone in week mode with formViewDialog American locale', function (assert) { + assert.expect(8); + + this.data.event.records = []; + this.data.event.onchanges = { + allday: function (obj) { + if (obj.allday) { + obj.start_date = obj.start && obj.start.split(' ')[0] || obj.start_date; + obj.stop_date = obj.stop && obj.stop.split(' ')[0] || obj.stop_date || obj.start_date; + } else { + obj.start = obj.start_date && (obj.start_date + ' 00:00:00') || obj.start; + obj.stop = obj.stop_date && (obj.stop_date + ' 00:00:00') || obj.stop || obj.start; + } + } + }; + + var calendar = createView({ + View: CalendarView, + model: 'event', + data: this.data, + arch: + '<calendar class="o_calendar_test" '+ + 'event_open_popup="true" '+ + 'date_start="start" '+ + 'date_stop="stop" '+ + 'all_day="allday" '+ + 'mode="week" '+ + 'readonly_form_view_id="1">'+ + '<field name="name"/>'+ + '</calendar>', + archs: archs, + viewOptions: { + initialDate: initialDate, + }, + session: { + getTZOffset: function () { + return 120; + }, + }, + translateParameters: { // Avoid issues due to localization formats + time_format: "%I:%M:%S", + }, + mockRPC: function (route, args) { + if (args.method === "create") { + assert.deepEqual(args.kwargs.context, { + "default_name": "new event", + "default_start": "2016-12-13 06:00:00", + "default_stop": "2016-12-13 08:00:00", + "default_allday": null + }, + "should send the context to create events"); + } + if (args.method === "write") { + assert.deepEqual(args.args[1], expectedEvent, + "should move the event"); + } + return this._super(route, args); + }, + }); + + var $view = $('#qunit-fixture').contents(); + $view.prependTo('body'); // => select with click position + + var top = calendar.$('.fc-axis:contains(8am)').offset().top + 5; + var left = calendar.$('.fc-day:eq(2)').offset().left + 5; + + try { + testUtils.triggerPositionalMouseEvent(left, top, "mousedown"); + } catch (e) { + calendar.destroy(); + $view.remove(); + throw new Error('The test fails to simulate a click in the screen. Your screen is probably too small or your dev tools is open.'); + } + testUtils.triggerPositionalMouseEvent(left, top + 60, "mousemove"); + testUtils.triggerPositionalMouseEvent(left, top + 60, "mouseup"); + $('.modal input:first').val('new event').trigger('input'); + $('.modal button.btn:contains(Edit)').trigger('click'); + + assert.strictEqual($('.o_field_widget[name="start"] input').val(), "12/13/2016 08:00:00", + "should display the datetime"); + + $('.modal-lg .o_field_boolean[name="allday"] input').trigger('click'); + + assert.strictEqual($('.o_field_widget[name="start_date"] input').val(), "12/13/2016", + "should display the date"); + + $('.modal-lg .o_field_boolean[name="allday"] input').trigger('click'); + + assert.strictEqual($('.o_field_widget[name="start"] input').val(), "12/13/2016 02:00:00", + "should display the datetime from the date with the timezone"); + + // use datepicker to enter a date: 12/13/2016 08:00:00 + $('.o_field_widget[name="start"] input').trigger('click'); + $('.bootstrap-datetimepicker-widget .picker-switch a[data-action="togglePicker"]').trigger('click'); + $('.bootstrap-datetimepicker-widget .timepicker .timepicker-hour').trigger('click'); + $('.bootstrap-datetimepicker-widget .timepicker-hours td.hour:contains(08)').trigger('click'); + $('.bootstrap-datetimepicker-widget .picker-switch a[data-action="close"]').trigger('click'); + + // use datepicker to enter a date: 12/13/2016 10:00:00 + $('.o_field_widget[name="stop"] input').trigger('click'); + $('.bootstrap-datetimepicker-widget .picker-switch a[data-action="togglePicker"]').trigger('click'); + $('.bootstrap-datetimepicker-widget .timepicker .timepicker-hour').trigger('click'); + $('.bootstrap-datetimepicker-widget .timepicker-hours td.hour:contains(10)').trigger('click'); + $('.bootstrap-datetimepicker-widget .picker-switch a[data-action="close"]').trigger('click'); + + $('.modal-lg button.btn:contains(Save)').trigger('click'); + var $newevent = calendar.$('.fc-event:contains(new event)'); + + assert.strictEqual($newevent.text().replace(/[\s\n\r]+/g, ''), "8:00am-10:00amnewevent", + "should display the new event with time and title"); + + assert.deepEqual($newevent.data('fcSeg').event.record, + { + display_name: "new event", + start: fieldUtils.parse.datetime("2016-12-13 06:00:00", this.data.event.fields.start, {isUTC: true}), + stop: fieldUtils.parse.datetime("2016-12-13 08:00:00", this.data.event.fields.stop, {isUTC: true}), + allday: false, + name: "new event", + id: 1 + }, + "the new record should have the utc datetime (formViewDialog)"); + + var pos = calendar.$('.fc-content').offset(); + left = pos.left + 5; + top = pos.top + 5; + + // Mode this event to another day + var expectedEvent = { + "allday": false, + "start": "2016-12-12 06:00:00", + "stop": "2016-12-12 08:00:00" + }; + testUtils.triggerPositionalMouseEvent(left, top, "mousedown"); + left = calendar.$('.fc-day:eq(1)').offset().left + 5; + testUtils.triggerPositionalMouseEvent(left, top, "mousemove"); + testUtils.triggerPositionalMouseEvent(left, top, "mouseup"); + + // Move to "All day" + expectedEvent = { + "allday": true, + "start": "2016-12-12 00:00:00", + "stop": "2016-12-12 00:00:00" + }; + testUtils.triggerPositionalMouseEvent(left, top, "mousedown"); + top = calendar.$('.fc-day:eq(1)').offset().top + 5; + testUtils.triggerPositionalMouseEvent(left, top, "mousemove"); + testUtils.triggerPositionalMouseEvent(left, top, "mouseup"); + + calendar.destroy(); + $view.remove(); + }); + + QUnit.test('check calendar week column timeformat and event content timeformat', function (assert) { + assert.expect(2); + + var calendar = createView({ + View: CalendarView, + model: 'event', + data: this.data, + arch: + '<calendar date_start="start">'+ + '<field name="name"/>'+ + '</calendar>', + archs: archs, + viewOptions: { + initialDate: initialDate, + }, + translateParameters: { + time_format: "%I:%M:%S", + }, + }); + + assert.strictEqual(calendar.$('.fc-axis:contains(8am)').length, 1, "calendar should show according to timeformat"); + assert.strictEqual(calendar.$('.fc-event:first:contains(12:00am)').length, 1, + "event time format should 12 hour"); + + calendar.destroy(); + }); + QUnit.test('create all day event in week mode', function (assert) { assert.expect(3); @@ -1601,12 +1883,15 @@ QUnit.module('Views', { viewOptions: { initialDate: initialDate, }, + translateParameters: { // Avoid issues due to localization formats + time_format: "%H:%M:%S", + }, }); // Click on Tuesday 12am var $view = $('#qunit-fixture').contents(); $view.prependTo('body'); - var top = calendar.$('.fc-axis:contains(12am)').offset().top + 5; + var top = calendar.$('.fc-axis:contains(0:00)').offset().top + 5; var left = calendar.$('.fc-day:eq(2)').offset().left + 5; try { testUtils.triggerPositionalMouseEvent(left, top, "mousedown"); diff --git a/addons/web/static/tests/views/kanban_tests.js b/addons/web/static/tests/views/kanban_tests.js index a1837111a19..49d65629c00 100644 --- a/addons/web/static/tests/views/kanban_tests.js +++ b/addons/web/static/tests/views/kanban_tests.js @@ -1110,6 +1110,43 @@ QUnit.module('Views', { kanban.destroy(); }); + QUnit.test('m2o group record created does not use action defaults', function (assert) { + assert.expect(1); + + var kanban = createView({ + View: KanbanView, + model: 'partner', + data: this.data, + arch: '<kanban class="o_kanban_test" on_create="quick_create">' + + '<templates><t t-name="kanban-box">' + + '<div>' + + '<field name="foo"/>' + + '</div>' + + '</t></templates>' + + '</kanban>', + groupBy: ['product_id'], + mockRPC: function (route, args) { + if (args.method === 'name_create') { + assert.notOk(_.has(args.kwargs.context, 'default_name'), + "default_* should be removed from context"); + } + return this._super.apply(this, arguments); + }, + viewOptions: { + context: { + default_name: 'default name partner', + }, + }, + }); + kanban.renderButtons(); + + kanban.$('.o_column_quick_create input').val('new product'); + kanban.$('.o_column_quick_create button.o_kanban_add').click(); + + kanban.destroy(); + }); + + QUnit.test('quick create record fail in grouped', function (assert) { assert.expect(7); @@ -3222,6 +3259,37 @@ QUnit.module('Views', { kanban.destroy(); }); + QUnit.test('column progressbars are working with load more', function (assert) { + assert.expect(1); + + var kanban = createView({ + View: KanbanView, + model: 'partner', + data: this.data, + domain: [['bar', '=', true]], + arch: + '<kanban limit="1">' + + '<progressbar field="foo" colors=\'{"yop": "success", "gnap": "warning", "blip": "danger"}\'/>' + + '<templates><t t-name="kanban-box">' + + '<div>' + + '<field name="id"/>' + + '</div>' + + '</t></templates>' + + '</kanban>', + groupBy: ['bar'], + }); + + // we have 1 record shown, load 2 more and check it worked + kanban.$('.o_kanban_group').find('.o_kanban_load_more').click(); + kanban.$('.o_kanban_group').find('.o_kanban_load_more').click(); + var shownIDs = _.map(kanban.$('.o_kanban_record'), function(record) { + return parseInt(record.innerText); + }); + assert.deepEqual(shownIDs, [1, 2, 3], "intended records are loaded"); + + kanban.destroy(); + }); + // XXX test deactivated in saas~11.2 as kanban archiving has been removed (and readded in saas~11.4) QUnit.skip('column progressbars on archiving records update counter', function (assert) { assert.expect(4); diff --git a/addons/web/static/tests/views/list_tests.js b/addons/web/static/tests/views/list_tests.js index 79efc03f52e..980b94e644c 100644 --- a/addons/web/static/tests/views/list_tests.js +++ b/addons/web/static/tests/views/list_tests.js @@ -3178,6 +3178,76 @@ QUnit.module('Views', { list.destroy(); }); + QUnit.test('editable list, handle widget locks and unlocks on sort', function (assert) { + assert.expect(6); + + // we need another sortable field to lock/unlock the handle + this.data.foo.fields.amount.sortable = true; + // resequence makes sense on a sequence field, not on arbitrary fields + this.data.foo.records[0].int_field = 0; + this.data.foo.records[1].int_field = 1; + this.data.foo.records[2].int_field = 2; + this.data.foo.records[3].int_field = 3; + + var list = createView({ + View: ListView, + model: 'foo', + data: this.data, + arch: '<tree editable="top" default_order="int_field">' + + '<field name="int_field" widget="handle"/>' + + '<field name="amount" widget="float"/>' + + '</tree>', + }); + + assert.strictEqual(list.$('tbody').text(), '1200.00500.00300.000.00', + "default should be sorted by int_field"); + + // Drag and drop the fourth line in second position + testUtils.dragAndDrop( + list.$('.ui-sortable-handle').eq(3), + list.$('tbody tr').first(), + {position: 'bottom'} + ); + + // Handle should be unlocked at this point + assert.strictEqual(list.$('tbody').text(), '1200.000.00500.00300.00', + "drag and drop should have succeeded, as the handle is unlocked"); + + // Sorting by a field different for int_field should lock the handle + list.$('.o_column_sortable').eq(1).click(); + + assert.strictEqual(list.$('tbody').text(), '0.00300.00500.001200.00', + "should have been sorted by amount"); + + // Drag and drop the fourth line in second position (not) + testUtils.dragAndDrop( + list.$('.ui-sortable-handle').eq(3), + list.$('tbody tr').first(), + {position: 'bottom'} + ); + + assert.strictEqual(list.$('tbody').text(), '0.00300.00500.001200.00', + "drag and drop should have failed as the handle is locked"); + + // Sorting by int_field should unlock the handle + list.$('.o_column_sortable').eq(0).click(); + + assert.strictEqual(list.$('tbody').text(), '1200.000.00500.00300.00', + "records should be ordered as per the previous resequence"); + + // Drag and drop the fourth line in second position + testUtils.dragAndDrop( + list.$('.ui-sortable-handle').eq(3), + list.$('tbody tr').first(), + {position: 'bottom'} + ); + + assert.strictEqual(list.$('tbody').text(), '1200.00300.000.00500.00', + "drag and drop should have worked as the handle is unlocked"); + + list.destroy(); + }); + QUnit.test('editable list with handle widget with slow network', function (assert) { assert.expect(15); diff --git a/addons/web/static/tests/views/pivot_tests.js b/addons/web/static/tests/views/pivot_tests.js index 56d228bbf30..7500531cdc8 100644 --- a/addons/web/static/tests/views/pivot_tests.js +++ b/addons/web/static/tests/views/pivot_tests.js @@ -105,6 +105,23 @@ QUnit.module('Views', { pivot.destroy(); }); + QUnit.test('pivot rendering with widget', function (assert) { + assert.expect(1); + + var pivot = createView({ + View: PivotView, + model: "partner", + data: this.data, + arch: '<pivot string="Partners">' + + '<field name="foo" type="measure" widget="float_time"/>' + + '</pivot>', + }); + + assert.strictEqual(pivot.$('td.o_pivot_cell_value:contains(32:00)').length, 1, + "should contain a pivot cell with the sum of all records"); + pivot.destroy(); + }); + QUnit.test('pivot view without "string" attribute', function (assert) { assert.expect(1); |
