|
diff --git a/addons/web/static/tests/views/list_view_tests.js b/addons/web/static/tests/views/list_view_tests.js
index 809eabf59ed..d09de3b8697 100644
--- a/addons/web/static/tests/views/list_view_tests.js
+++ b/addons/web/static/tests/views/list_view_tests.js
@@ -4257,32 +4257,26 @@ QUnit.module("Views", (hooks) => {
noContentHelp: ' click to add a foo ', }); - // as help is being provided in the action, table won't be rendered until a record exists - assert.containsNone( - target, - ".o_list_table", - " there should not be any records in the view." - ); assert.containsOnce(target, ".o_view_nocontent", "should have no content help"); // click on create button await click(target.querySelector(".o_list_button_add")); - const handleWidgetMinWidth = "33px"; + const handleWidgetWidth = "33px"; const handleWidgetHeader = target.querySelector("thead > tr > th.o_handle_cell"); assert.strictEqual( - window.getComputedStyle(handleWidgetHeader).minWidth, - handleWidgetMinWidth, - "While creating first record, min-width should be applied to handle widget." + window.getComputedStyle(handleWidgetHeader).width, + handleWidgetWidth, + "While creating first record, width should be applied to handle widget." ); // creating one record await editInput(target, ".o_selected_row [name='foo'] input", "test_foo"); await clickSave(target); assert.strictEqual( - window.getComputedStyle(handleWidgetHeader).minWidth, - handleWidgetMinWidth, - "After creation of the first record, min-width of the handle widget should remain as it is" + window.getComputedStyle(handleWidgetHeader).width, + handleWidgetWidth, + "After creation of the first record, width of the handle widget should remain as it is" ); } ); @@ -6581,7 +6575,7 @@ QUnit.module("Views", (hooks) => { noContentHelp: "click to add a partner", }); assert.containsOnce(target, ".o_view_nocontent", "should display the no content helper"); - assert.containsNone(target, ".o_list_view table", "should not have a table in the dom"); + assert.containsOnce(target, ".o_list_view table", "should have a table in the dom"); assert.deepEqual( [...target.querySelectorAll(".o_view_nocontent")].map((el) => el.textContent), ["click to add a partner"] @@ -6595,7 +6589,6 @@ QUnit.module("Views", (hooks) => { ".o_view_nocontent", "should not display the no content helper" ); - assert.containsOnce(target, ".o_list_view table", "should have a table in the dom"); }); QUnit.test("no nocontent helper when no data and no help", async function (assert) { @@ -6678,7 +6671,7 @@ QUnit.module("Views", (hooks) => { target.querySelector(".o_list_view .o_content"), "o_view_sample_data" ); - assert.containsNone(target, ".o_list_table"); + assert.containsOnce(target, ".o_list_table"); assert.containsOnce(target, ".o_nocontent_help"); await toggleMenuItem(target, "False Domain"); @@ -6923,7 +6916,7 @@ QUnit.module("Views", (hooks) => { target.querySelector(".o_list_view .o_content"), "o_view_sample_data" ); - assert.containsNone(target, ".o_list_table"); + assert.containsOnce(target, ".o_list_table"); assert.containsOnce(target, ".o_nocontent_help"); } ); @@ -6967,7 +6960,7 @@ QUnit.module("Views", (hooks) => { target.querySelector(".o_list_view .o_content"), "o_view_sample_data" ); - assert.containsNone(target, ".o_list_table"); + assert.containsOnce(target, ".o_list_table"); assert.containsOnce(target, ".o_nocontent_help"); } ); @@ -7025,7 +7018,7 @@ QUnit.module("Views", (hooks) => { target.querySelector(".o_list_view .o_content"), "o_view_sample_data" ); - assert.containsNone(target, ".o_list_table"); + assert.containsOnce(target, ".o_list_table"); assert.containsOnce(target, ".o_nocontent_help"); } ); @@ -7340,12 +7333,12 @@ QUnit.module("Views", (hooks) => { ".o_view_nocontent", "should have a no content helper displayed" ); - assert.containsNone( + assert.containsOnce( target, "div.table-responsive", - "should not have a div.table-responsive" + "should have a div.table-responsive" ); - assert.containsNone(target, "table", "should not have rendered a table"); + assert.containsOnce(target, "table", "should have rendered a table"); await click(target.querySelector(".o_list_button_add")); assert.containsNone( @@ -7353,7 +7346,6 @@ QUnit.module("Views", (hooks) => { ".o_view_nocontent", "should not have a no content helper displayed" ); - assert.containsOnce(target, "table", "should have rendered a table"); assert.hasClass( target.querySelector("tbody tr"), "o_selected_row", diff --git a/addons/web/static/tests/webclient/actions/window_action_tests.js b/addons/web/static/tests/webclient/actions/window_action_tests.js index 2a6d0fe9118..69e2322104a 100644 --- a/addons/web/static/tests/webclient/actions/window_action_tests.js +++ b/addons/web/static/tests/webclient/actions/window_action_tests.js @@ -2501,12 +2501,11 @@ QUnit.module("ActionManager", (hooks) => { assert.containsOnce(target, ".o_list_view"); assert.containsOnce(target, ".o_view_nocontent"); assert.strictEqual(target.querySelector(".o_view_nocontent").innerText, "Hello"); - assert.containsNone(target, "table"); + assert.containsOnce(target, "table"); await doAction(webClient, 4); assert.containsOnce(target, ".o_list_view"); assert.containsNone(target, ".o_view_nocontent"); - assert.containsOnce(target, "table"); }); QUnit.test("process context.form_view_initial_mode", async function (assert) { |
|---|