[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.
This commit is contained in:
Aaron Bohy
2015-06-26 09:31:25 +02:00
parent b0ff033d69
commit 617cfd7dc8
2 changed files with 4 additions and 7 deletions
+1 -5
View File
@@ -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',
},
{
+3 -2
View File
@@ -114,8 +114,9 @@
<record id="action_discussions_2" model="ir.actions.act_window">
<field name="name">Discussions 2</field>
<field name="res_model">test_new_api.discussion</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="discussion_form_2"/>
<field name="view_ids" eval="[(5,0,0),
(0,0,{'view_mode':'tree'}),
(0,0,{'view_mode':'form', 'view_id': ref('discussion_form_2')})]"/>
</record>
<menuitem id="menu_discussions_2" action="action_discussions_2" parent="menu_sub" sequence="10"/>