From 617cfd7dc8d01746aeb47aef6a226dff07401c4c Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Tue, 23 Jun 2015 09:12:44 +0200 Subject: [PATCH] [FIX] web_tests,test_new_api: act_window for new design compatibility The widget_x2many tour uses the discussion model to test one2many and many2many widgets. The tour clicks on an item of the menu which opens the discussion model with the discussion_form_2 view (in create mode). Then, it clicks on the view_switcher to display the list view, and clicks on an item of the list to open a previously created record. In the new design, there is no more view_switcher in form view. This flow is thus unfeasible. This solution changes the menu action so that it directly opens the model with the list view, on which we can click on the record to display in form view. --- addons/web_tests/static/src/js/web.tour.js | 6 +----- openerp/addons/test_new_api/views.xml | 5 +++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/addons/web_tests/static/src/js/web.tour.js b/addons/web_tests/static/src/js/web.tour.js index 270c058c49e..bcadb38fb10 100644 --- a/addons/web_tests/static/src/js/web.tour.js +++ b/addons/web_tests/static/src/js/web.tour.js @@ -361,13 +361,9 @@ Tour.register({ element: 'a.oe_menu_leaf:contains(Discussions 2)' }, - { - title: "switch to list view", - waitFor: ".oe_list_editable", - element: '.oe-cp-switch-list', - }, { title: "select previous created record", + waitFor: '.breadcrumb li:containsExact(Discussions 2)', element: 'td[data-field="name"]:contains(test_trigger):last', }, { diff --git a/openerp/addons/test_new_api/views.xml b/openerp/addons/test_new_api/views.xml index a2aad3fdd72..f66f1ea57da 100644 --- a/openerp/addons/test_new_api/views.xml +++ b/openerp/addons/test_new_api/views.xml @@ -114,8 +114,9 @@ Discussions 2 test_new_api.discussion - tree,form - +