-
Foo
-
- this is foo
+ testConfig.serverData.actions[1] = {
+ id: 1,
+ name: "Settings view",
+ res_model: "res.config.settings",
+ type: "ir.actions.act_window",
+ views: [[1, "form"]],
+ };
+
+ testConfig.serverData.views = Object.assign(testConfig.serverData.views, {
+ "res.config.settings,1,form": `
+
-
+
`,
- 'res.config.settings,false,search': '
',
- };
+ "res.config.settings,false,search": "
",
+ });
- const actionManager = await createActionManager({
- actions: actions,
- archs: archs,
- data: this.data,
- mockRPC(route, args) {
- if (route === '/web/dataset/call_button' && args.method === 'execute') {
- assert.step('execute');
- return Promise.resolve(true);
- } else if (args.method === 'create') {
- assert.step('create');
+ const mockRPC = (route, args) => {
+ if (route === "/web/dataset/call_button" && args.method === "execute") {
+ assert.step("execute");
+ return true;
+ } else if (args.method === "create") {
+ assert.step("create");
}
- return this._super.apply(this, arguments);
- },
- });
+ };
- await actionManager.doAction(1);
- assert.containsNone(actionManager, '.o_field_boolean input:checked',
- 'checkbox should not be checked');
+ const webClient = await createWebClient({ testConfig, mockRPC });
- await testUtils.dom.click(actionManager.$('input[type="checkbox"]'));
- assert.containsOnce(actionManager, '.o_field_boolean input:checked',
- 'checkbox should be checked');
+ await doAction(webClient, 1);
+ assert.containsNone(
+ webClient,
+ ".o_field_boolean input:checked",
+ "checkbox should not be checked"
+ );
- await testUtils.dom.click(actionManager.$('button[name="4"]'));
- assert.containsOnce(document.body, '.modal', 'should open a warning dialog');
+ await testUtils.dom.click($(webClient.el).find('input[type="checkbox"]'));
+ assert.containsOnce(
+ webClient,
+ ".o_field_boolean input:checked",
+ "checkbox should be checked"
+ );
- await testUtils.dom.click($('.modal-footer .btn-primary'));
- assert.verifySteps([
- 'create', // saveRecord from modal
- 'execute', // execute_action
- 'create' // saveRecord from FormController._onButtonClicked
- ]);
+ await testUtils.dom.click($(webClient.el).find('button[name="4"]'));
+ assert.containsOnce(document.body, ".modal", "should open a warning dialog");
- actionManager.destroy();
- });
+ await testUtils.dom.click($(".modal-footer .btn-primary"));
+ assert.verifySteps([
+ "create", // saveRecord from modal
+ "execute", // execute_action
+ "create", // saveRecord from FormController._onButtonClicked
+ ]);
+ }
+ );
});
});
diff --git a/odoo/addons/test_lint/tests/test_eslint.py b/odoo/addons/test_lint/tests/test_eslint.py
index c19eb244ab3..9270d5a13e3 100644
--- a/odoo/addons/test_lint/tests/test_eslint.py
+++ b/odoo/addons/test_lint/tests/test_eslint.py
@@ -27,6 +27,7 @@ GLOBAL = ','.join([
'Popover',
'StackTrace',
'QUnit',
+ 'luxon',
'moment',
'py',
'ClipboardJS',
diff --git a/odoo/addons/test_lint/tests/test_markers.py b/odoo/addons/test_lint/tests/test_markers.py
index 25f339d8842..d618237a08a 100644
--- a/odoo/addons/test_lint/tests/test_markers.py
+++ b/odoo/addons/test_lint/tests/test_markers.py
@@ -31,6 +31,8 @@ class TestConflictMarkers(lint_case.LintCase):
for p in paths:
for dp, _, file_names in os.walk(p):
+ if 'node_modules' in dp:
+ continue
for fn in file_names:
if fn.endswith(EXTENSIONS):
self.check_file(os.path.join(dp, fn))
diff --git a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js
index 6eff349cbe4..14f627ebe20 100644
--- a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js
+++ b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js
@@ -12,12 +12,12 @@ tour.register('main_flow_tour', {
tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('Quotations')"),
{
// Add Stockable product
- trigger: ".o_menu_sections a:contains('Products')",
+ trigger: ".o_menu_sections .o_dropdown_toggler span:contains('Products')",
extra_trigger: '.o_main_navbar',
content: _t("Let's create products."),
position: "bottom",
}, {
- trigger: ".o_menu_sections a:has(span:contains('Products'))",
+ trigger: ".o_menu_sections .o_dropdown_item span:contains('Products')",
content: _t("Let's create products."),
position: "bottom"
}, {
@@ -654,29 +654,29 @@ tour.stepUtils.autoExpandMoreButtons('.o_form_readonly'),
tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('Inventory Overview')"),
{
mobile: false,
- trigger: ".o_menu_sections a[data-menu-xmlid='stock.menu_stock_config_settings']",
+ trigger: ".o_menu_sections button[data-menu-xmlid='stock.menu_stock_config_settings']",
extra_trigger: '.o_main_navbar',
content: _t("Go to Configuration"),
position: "bottom"
}, {
mobile: false,
- trigger: ".o_menu_sections a[data-menu-xmlid='stock.menu_reordering_rules_config']",
+ trigger: ".o_menu_sections li[data-menu-xmlid='stock.menu_reordering_rules_config']",
content: _t("Reordering Rules"),
position: "bottom"
}, {
mobile: true,
- trigger: ".o_menu_sections a:contains('Configuration')",
+ trigger: ".o_menu_sections button:contains('Configuration')",
extra_trigger: '.o_main_navbar',
content: _t("Go to Configuration"),
position: "bottom"
}, {
mobile: true,
- trigger: ".o_menu_sections a[data-menu-xmlid='stock.menu_product_in_config_stock']",
+ trigger: ".o_menu_sections button[data-menu-xmlid='stock.menu_product_in_config_stock']",
content: _t("Click on Product Section"),
position: "bottom"
}, {
mobile: true,
- trigger: ".o_menu_sections a:contains('Reordering Rules')",
+ trigger: ".o_menu_sections li:contains('Reordering Rules')",
content: _t("Click on Product Section"),
position: "bottom"
}, {
@@ -730,11 +730,11 @@ tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('Inventory Ove
tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('OP/')"),
{
// Run the schedulers
- trigger: ".o_menu_sections a:contains('Operations')",
+ trigger: ".o_menu_sections button:contains('Operations')",
content: _t("Go to Run Schedulers"),
position: "bottom"
}, {
- trigger: ".o_menu_sections a[data-menu-xmlid='stock.menu_procurement_compute']",
+ trigger: ".o_menu_sections li[data-menu-xmlid='stock.menu_procurement_compute']",
content: _t("Click on schedulers"),
position: "bottom"
}, {
@@ -778,7 +778,7 @@ tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('OP/')"),
{
trigger: '.o_form_button_edit',
content: _t('Edit the vendor bill'),
- extra_trigger: 'body.o_web_client:not(.oe_wait)',
+ extra_trigger: ".o_form_label .o_field_widget:contains('Vendor Bill')",
}, {
trigger:".o_field_widget[name=invoice_date] input",
content: _t('Set the invoice date'),
@@ -800,12 +800,12 @@ tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('OP/')"),
tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('Manufacturing Orders'), li.breadcrumb-item.active:contains('Work Centers Overview')"),
{
mobile: false,
- trigger: ".o_menu_sections a[data-menu-xmlid='mrp.menu_mrp_manufacturing']",
+ trigger: ".o_menu_sections button[data-menu-xmlid='mrp.menu_mrp_manufacturing']",
content: _t('Click on Operations menuitem'),
position: 'bottom',
}, {
mobile: false,
- trigger: ".o_menu_sections a[data-menu-xmlid='mrp.menu_mrp_production_action']",
+ trigger: ".o_menu_sections li[data-menu-xmlid='mrp.menu_mrp_production_action']",
content: _t('Open manufacturing orders'),
position: 'bottom',
}, {
@@ -815,13 +815,13 @@ tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('Manufacturing
position: 'bottom',
}, {
mobile: true,
- trigger: ".o_menu_sections a:contains('Operations')",
+ trigger: ".o_menu_sections button:contains('Operations')",
extra_trigger: '.o_main_navbar',
content: _t("Let's go to manufacturing order."),
position: "bottom",
}, {
mobile: true,
- trigger: ".o_menu_sections a:has(span:contains('Manufacturing Orders'))",
+ trigger: ".o_menu_sections li:contains('Manufacturing Orders')",
content: _t("Let's go to manufacturing order."),
position: "bottom"
}, {
@@ -833,9 +833,8 @@ tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('Manufacturing
},
...tour.stepUtils.statusbarButtonsSteps('Check availability', _t("Check availability")),
{
- trigger: '.o_form_button_edit',
+ trigger: ".o_form_button_edit:not(:disabled)",
content: _t('Edit the production order'),
- extra_trigger: 'body.o_web_client:not(.oe_wait)',
}, {
trigger: "input[name=qty_producing]",
position: 'left',
@@ -852,11 +851,11 @@ tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('Manufacturing
...tour.stepUtils.goToAppSteps('sale.sale_menu_root', _t('Organize your sales activities with the
Sales app.')),
tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('Quotations')"),
{
- trigger: ".o_menu_sections a[data-menu-xmlid='sale.sale_order_menu']",
+ trigger: ".o_menu_sections button[data-menu-xmlid='sale.sale_order_menu']",
content: _t("Go to Sales menu"),
position: "bottom"
}, {
- trigger: ".o_menu_sections a[data-menu-xmlid='sale.menu_sale_order']",
+ trigger: ".o_menu_sections li[data-menu-xmlid='sale.menu_sale_order']",
content: _t("Go to the sales orders"),
position: "bottom"
}, {
diff --git a/odoo/addons/test_new_api/static/tests/tours/x2many.js b/odoo/addons/test_new_api/static/tests/tours/x2many.js
index a903efea1d0..723624fe996 100644
--- a/odoo/addons/test_new_api/static/tests/tours/x2many.js
+++ b/odoo/addons/test_new_api/static/tests/tours/x2many.js
@@ -336,11 +336,11 @@ odoo.define('web.test.x2many', function (require) {
{
content: "switch to the second form view to test one2many with editable list (toggle menu dropdown)",
- trigger: 'nav .o_menu_sections .dropdown-toggle:containsExact(Discussions), li.o_extra_menu_items a i.fa-plus',
+ trigger: 'button[data-menu-xmlid="test_new_api.menu_main"], li.o_extra_menu_items a i.fa-plus',
extra_trigger: '.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2)',
}, {
content: "switch to the second form view to test one2many with editable list (open submenu)",
- trigger: 'nav .o_menu_sections .dropdown-item:contains(Discussions 2)',
+ trigger: 'li[data-menu-xmlid="test_new_api.menu_discussions_2"]',
}, {
content: "select previous created record",
trigger: 'td:contains(test_trigger):last',
@@ -453,11 +453,11 @@ odoo.define('web.test.x2many', function (require) {
{
content: "switch to the third form view to test onchange changing one2many (toggle menu dropdown)",
- trigger: 'nav .o_menu_sections .dropdown-toggle:containsExact(Discussions), li.o_extra_menu_items a i.fa-plus',
+ trigger: 'button[data-menu-xmlid="test_new_api.menu_main"], li.o_extra_menu_items a i.fa-plus',
extra_trigger: '.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2)',
}, {
content: "switch to the thied form view to test onchange changing one2many (open submenu)",
- trigger: 'nav .o_menu_sections .dropdown-item:contains(Discussions 3)',
+ trigger: 'li[data-menu-xmlid="test_new_api.menu_discussions_3"]',
}, {
content: "wait web client",
trigger: '.breadcrumb:contains(Discussions 3)',