summaryrefslogtreecommitdiff
path: root/addons/web/static/tests
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-09-13 19:30:33 +0200
committerChristophe Simonis <chs@odoo.com>2018-09-13 19:30:33 +0200
commitf3fa5a5ef7d2e86a38f988f799a0ea33304d1e14 (patch)
treea73fd937fa8f23ae016070ec14c0a2a21621ed68 /addons/web/static/tests
parent5cfd3d5fa022e8cafb3da3d2468cc8364f0e47b3 (diff)
parent1e0a92c99626c30aa7a196c1f970b75294dbf2d0 (diff)
[MERGE] forward port branch saas-11.3 up to 1e0a92c9962
Diffstat (limited to 'addons/web/static/tests')
-rw-r--r--addons/web/static/tests/chrome/action_manager_tests.js6
-rw-r--r--addons/web/static/tests/views/kanban_tests.js37
-rw-r--r--addons/web/static/tests/views/list_tests.js70
3 files changed, 3 insertions, 110 deletions
diff --git a/addons/web/static/tests/chrome/action_manager_tests.js b/addons/web/static/tests/chrome/action_manager_tests.js
index e0bb22c0bb4..3a776a73a28 100644
--- a/addons/web/static/tests/chrome/action_manager_tests.js
+++ b/addons/web/static/tests/chrome/action_manager_tests.js
@@ -1907,7 +1907,7 @@ QUnit.module('ActionManager', {
start: function () {
var self = this;
return this._super.apply(this, arguments).then(function () {
- self.iframe.src = 'test: ' + self.iframe.getAttribute('src');
+ self.iframe.src = 'test ' + self.iframe.getAttribute('src');
});
}
});
@@ -1926,7 +1926,7 @@ QUnit.module('ActionManager', {
if (route === '/report/check_wkhtmltopdf') {
return $.when('broken');
}
- if (route === 'test: /report/html/some_report') {
+ if (route === 'test /report/html/some_report') {
return $.when();
}
return this._super.apply(this, arguments);
@@ -1947,7 +1947,7 @@ QUnit.module('ActionManager', {
'/web/action/load',
'/report/check_wkhtmltopdf',
'notification',
- 'test: /report/html/some_report', // report client action's iframe
+ 'test /report/html/some_report', // report client action's iframe
]);
actionManager.destroy();
diff --git a/addons/web/static/tests/views/kanban_tests.js b/addons/web/static/tests/views/kanban_tests.js
index 8c73dcc21e9..7680d8877b1 100644
--- a/addons/web/static/tests/views/kanban_tests.js
+++ b/addons/web/static/tests/views/kanban_tests.js
@@ -1157,43 +1157,6 @@ 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);
diff --git a/addons/web/static/tests/views/list_tests.js b/addons/web/static/tests/views/list_tests.js
index 9f476a6f1c9..a6b28ed24e7 100644
--- a/addons/web/static/tests/views/list_tests.js
+++ b/addons/web/static/tests/views/list_tests.js
@@ -3235,76 +3235,6 @@ 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);