summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/relational_fields_mobile_tests.js
diff options
context:
space:
mode:
authorVincent Schippefilt <vsc@odoo.com>2019-03-06 14:02:32 +0100
committerAaron Bohy <aab@odoo.com>2019-03-06 20:07:17 +0100
commitab56e637b7f97ddcdbcc9baea99ae097e342409c (patch)
tree4cb47da9f7ef89b19d18429220a7507470ec12a9 /addons/web/static/tests/fields/relational_fields_mobile_tests.js
parenteeed894fd50e477135e1ac9a82f6e98ce063ab90 (diff)
[REF] web: adapt code after jQuery update
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
Diffstat (limited to 'addons/web/static/tests/fields/relational_fields_mobile_tests.js')
-rw-r--r--addons/web/static/tests/fields/relational_fields_mobile_tests.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/addons/web/static/tests/fields/relational_fields_mobile_tests.js b/addons/web/static/tests/fields/relational_fields_mobile_tests.js
index 1f2b2655e02..794a8a89545 100644
--- a/addons/web/static/tests/fields/relational_fields_mobile_tests.js
+++ b/addons/web/static/tests/fields/relational_fields_mobile_tests.js
@@ -52,11 +52,11 @@ QUnit.module('relational_fields', {
QUnit.module('FieldOne2Many');
- QUnit.test('one2many kanban: deletion in mobile', function (assert) {
+ QUnit.test('one2many kanban: deletion in mobile', async function (assert) {
assert.expect(9);
this.data.partner.records[0].p = [1, 2];
- var form = createView({
+ var form = await createView({
View: FormView,
model: 'partner',
data: this.data,
@@ -94,7 +94,7 @@ QUnit.module('relational_fields', {
assert.containsNone(form, '.o_field_one2many .o-kanban-button-new',
'"Create" button should not be visible in readonly');
- testUtils.form.clickEdit(form);
+ await testUtils.form.clickEdit(form);
assert.containsOnce(form, '.o_field_one2many .o-kanban-button-new',
'"Create" button should be visible in edit');
@@ -102,16 +102,16 @@ QUnit.module('relational_fields', {
"should have 2 records");
// open and delete record
- testUtils.dom.click(form.$('.oe_kanban_global_click').first());
+ await testUtils.dom.click(form.$('.oe_kanban_global_click').first());
assert.strictEqual($('.modal .modal-footer .o_btn_remove').length, 1,
'there should be a Remove button in the modal footer');
- testUtils.dom.click($('.modal .modal-footer .o_btn_remove'));
+ await testUtils.dom.click($('.modal .modal-footer .o_btn_remove'));
assert.strictEqual($('.o_modal').length, 0, "there shoul be no more modal");
assert.strictEqual(form.$('.o_kanban_record:not(.o_kanban_ghost)').length, 1,
'should contain 1 records');
// save and check that the correct command has been generated
- testUtils.form.clickSave(form);
+ await testUtils.form.clickSave(form);
form.destroy();
});
});