From 4616beab64b950841a4db6c1cf99a00bb6387268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 3 Dec 2007 16:55:59 +0000 Subject: [PATCH] tests for mass workflow actions git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17966 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../testFolderWorkflowAction.xml | 268 +++++++++++++++++ ...tFolderWorkflowActionFilteredSelection.xml | 223 ++++++++++++++ ...estFolderWorkflowActionMultipleActions.xml | 283 ++++++++++++++++++ ...lderWorkflowActionCheckWorkflowHistory.xml | 188 ++++++++++++ ...nFilteredSelectionCheckWorkflowHistory.xml | 185 ++++++++++++ ...ionMultipleActionsCheckWorkflowHistory.xml | 199 ++++++++++++ bt5/erp5_ui_test/bt/revision | 2 +- 7 files changed, 1347 insertions(+), 1 deletion(-) create mode 100644 bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowAction.xml create mode 100644 bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowActionFilteredSelection.xml create mode 100644 bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowActionMultipleActions.xml create mode 100644 bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionCheckWorkflowHistory.xml create mode 100644 bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionFilteredSelectionCheckWorkflowHistory.xml create mode 100644 bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionMultipleActionsCheckWorkflowHistory.xml diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowAction.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowAction.xml new file mode 100644 index 0000000000..ec4f3276d2 --- /dev/null +++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowAction.xml @@ -0,0 +1,268 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_text</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n + xmlns:metal="http://xml.zope.org/namespaces/metal">\n +<head>\n +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n +<title>Test Folder Workflow Action</title>\n +</head>\n +<body>\n +<table cellpadding="1" cellspacing="1" border="1">\n +<thead>\n +<tr><td rowspan="1" colspan="3">Test Folder Workflow Action</td></tr>\n +</thead><tbody>\n +<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />\n +<tr>\n + <td>open</td>\n + <td tal:content="string:${here/portal_url}/foo_module/1/Foo_validate">Validate the first document</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Validated</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/FooModule_createObjects?num:int=2&start:int=2</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Created Successfully.</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/Zuite_waitForActivities</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Done.</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td tal:content="string: ${here/portal_url}/foo_module/view">/erp5/foo_module/view</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>selectAndWait</td>\n + <td>select_action</td>\n + <td>Workflow</td>\n +</tr>\n +\n +<!-- we have a listbox with 2 lines, one for 2 Draft Foos, the other for 1\n +Validated Foo -->\n +<tr>\n + <td>assertText</td>\n + <td>listbox_record_number</td>\n + <td>2 record(s)</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[1]/a</td>\n + <td>2</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[2]/a</td>\n + <td>Foo</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[3]/a</td>\n + <td>Draft</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[4]/a</td>\n + <td>Foo Workflow</td>\n +</tr>\n +<tr>\n + <td>select</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[5]/select</td>\n + <td>label=Validate Action</td>\n +</tr>\n +\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[1]/a</td>\n + <td>1</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[2]/a</td>\n + <td>Foo</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[3]/a</td>\n + <td>Validated</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[4]/a</td>\n + <td>Foo Workflow</td>\n +</tr>\n +\n +<tr>\n + <td>type</td>\n + <td>field_your_comment</td>\n + <td>Comment !</td>\n +</tr>\n +\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_callDialogMethod:method</td>\n + <td></td>\n +</tr>\n +\n +<!-- Now we are on a listbox showing *all* documents we are about to process.\n +Note that if a document cannot be processed, it\'s not shown in this list\n +-->\n +<tr>\n + <td>assertText</td>\n + <td>listbox_record_number</td>\n + <td>2 record(s)</td>\n +</tr>\n +<!-- This listbox is a proxy to the module listbox, so it has the same title\n +and the same columns. -->\n +<tr>\n + <td>assertText</td>\n + <td>listbox_title</td>\n + <td>exact:Foos:</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[2]</td>\n + <td>Title 2</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[4]</td>\n + <td>Validate Action</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[2]</td>\n + <td>Title 3</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[4]</td>\n + <td>Validate Action</td>\n +</tr>\n +\n +<tr>\n + <td>assertValue</td>\n + <td>field_your_comment</td>\n + <td>Comment !</td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_callDialogMethod:method</td>\n + <td></td>\n +</tr>\n +\n +<tr>\n + <td>assertPortalStatusMessage</td>\n + <td>Workflow Modification in Progress</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/Zuite_waitForActivities</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Done.</td>\n + <td></td>\n +</tr>\n +<!-- We\'ll check everything else (workflow history, comments, etc) in a python\n +script. -->\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/Zuite_testFolderWorkflowActionCheckWorkflowHistory</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>result</td>\n + <td>OK</td>\n +</tr>\n +\n +\n +</body>\n +</html>\n + + +]]></string> </value> + </item> + <item> + <key> <string>content_type</string> </key> + <value> <string>text/html</string> </value> + </item> + <item> + <key> <string>expand</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>testFolderWorkflowAction</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowActionFilteredSelection.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowActionFilteredSelection.xml new file mode 100644 index 0000000000..21db178a10 --- /dev/null +++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowActionFilteredSelection.xml @@ -0,0 +1,223 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_text</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n + xmlns:metal="http://xml.zope.org/namespaces/metal">\n +<head>\n +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n +<title>Test Folder Workflow Action</title>\n +</head>\n +<body>\n +<table cellpadding="1" cellspacing="1" border="1">\n +<thead>\n +<tr><td rowspan="1" colspan="3">Test Folder Workflow Action</td></tr>\n +</thead><tbody>\n +<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />\n +<tr>\n + <td>open</td>\n + <td tal:content="string:${here/portal_url}/foo_module/1/Foo_validate">Validate the first document</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Validated</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/FooModule_createObjects?num:int=2&start:int=2</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Created Successfully.</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/ListBoxZuite_waitForActivities</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Done.</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td tal:content="string: ${here/portal_url}/foo_module/view">/erp5/foo_module/view</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>type</td>\n + <td>title</td>\n + <td>%3</td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>hidden_button</td>\n + <td></td>\n +</tr>\n +\n +<tr>\n + <td>selectAndWait</td>\n + <td>select_action</td>\n + <td>Workflow</td>\n +</tr>\n +\n +<!-- we have a listbox with 1 line, for 1 Draft Foo -->\n +<tr>\n + <td>assertText</td>\n + <td>listbox_record_number</td>\n + <td>1 record(s)</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[1]/a</td>\n + <td>1</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[2]/a</td>\n + <td>Foo</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[3]/a</td>\n + <td>Draft</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[4]/a</td>\n + <td>Foo Workflow</td>\n +</tr>\n +<tr>\n + <td>select</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[5]/select</td>\n + <td>label=Validate Action</td>\n +</tr>\n +\n +<tr>\n + <td>type</td>\n + <td>field_your_comment</td>\n + <td>Comment !</td>\n +</tr>\n +\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_callDialogMethod:method</td>\n + <td></td>\n +</tr>\n +\n +<tr>\n + <td>assertText</td>\n + <td>listbox_record_number</td>\n + <td>1 record(s)</td>\n +</tr>\n +\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_callDialogMethod:method</td>\n + <td></td>\n +</tr>\n +\n +\n +<tr>\n + <td>assertPortalStatusMessage</td>\n + <td>Workflow Modification in Progress</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/Zuite_waitForActivities</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Done.</td>\n + <td></td>\n +</tr>\n +<!-- We\'ll check everything else (workflow history, comments, etc) in a python\n +script. -->\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/Zuite_testFolderWorkflowActionFilteredSelectionCheckWorkflowHistory</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>result</td>\n + <td>OK</td>\n +</tr>\n +\n +\n +</body>\n +</html>\n + + +]]></string> </value> + </item> + <item> + <key> <string>content_type</string> </key> + <value> <string>text/html</string> </value> + </item> + <item> + <key> <string>expand</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>testFolderWorkflowActionFilteredSelection</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowActionMultipleActions.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowActionMultipleActions.xml new file mode 100644 index 0000000000..a28c58e8b3 --- /dev/null +++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFolderWorkflowActionMultipleActions.xml @@ -0,0 +1,283 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_text</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n + xmlns:metal="http://xml.zope.org/namespaces/metal">\n +<head>\n +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n +<title>Test Folder Workflow Action, multiple actions</title>\n +</head>\n +<body>\n +<table cellpadding="1" cellspacing="1" border="1">\n +<thead>\n +<tr><td rowspan="1" colspan="3">Test Folder Workflow Action, multiple actions</td></tr>\n +</thead><tbody>\n +<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />\n +<tr>\n + <td>open</td>\n + <td tal:content="string:${here/portal_url}/foo_module/1/Foo_validate">Validate the first document</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Validated</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/FooModule_createObjects?num:int=2&start:int=2</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Created Successfully.</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/Zuite_waitForActivities</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Done.</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td tal:content="string: ${here/portal_url}/foo_module/view">/erp5/foo_module/view</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>selectAndWait</td>\n + <td>select_action</td>\n + <td>Workflow</td>\n +</tr>\n +\n +<!-- we have a listbox with 2 lines, one for 2 Draft Foos, the other for 1\n +Validated Foo -->\n +<tr>\n + <td>assertText</td>\n + <td>listbox_record_number</td>\n + <td>2 record(s)</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[1]/a</td>\n + <td>2</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[2]/a</td>\n + <td>Foo</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[3]/a</td>\n + <td>Draft</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[4]/a</td>\n + <td>Foo Workflow</td>\n +</tr>\n +<tr>\n + <td>select</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[5]/select</td>\n + <td>label=Validate Action</td>\n +</tr>\n +\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[1]/a</td>\n + <td>1</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[2]/a</td>\n + <td>Foo</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[3]/a</td>\n + <td>Validated</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[4]/a</td>\n + <td>Foo Workflow</td>\n +</tr>\n +<tr>\n + <td>select</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[5]/select</td>\n + <td>label=Invalidate Action</td>\n +</tr>\n +\n +<tr>\n + <td>type</td>\n + <td>field_your_comment</td>\n + <td>Comment !</td>\n +</tr>\n +\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_callDialogMethod:method</td>\n + <td></td>\n +</tr>\n +\n +<!-- Now we are on a listbox showing *all* documents we are about to process.\n +Note that if a document cannot be processed, it\'s not shown in this list\n +-->\n +<tr>\n + <td>assertText</td>\n + <td>listbox_record_number</td>\n + <td>3 record(s)</td>\n +</tr>\n +<!-- This listbox is a proxy to the module listbox, so it has the same title\n +and the same columns. -->\n +<tr>\n + <td>assertText</td>\n + <td>listbox_title</td>\n + <td>exact:Foos:</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[2]</td>\n + <td>Title 2</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[4]</td>\n + <td>Validate Action</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[2]</td>\n + <td>Title 3</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_1\']/td[4]</td>\n + <td>Validate Action</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_2\']/td[2]</td>\n + <td>Title 1</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//tr[@id=\'listbox_data_line_2\']/td[4]</td>\n + <td>Invalidate Action</td>\n +</tr>\n +\n +<tr>\n + <td>assertValue</td>\n + <td>field_your_comment</td>\n + <td>Comment !</td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_callDialogMethod:method</td>\n + <td></td>\n +</tr>\n +\n +<tr>\n + <td>assertPortalStatusMessage</td>\n + <td>Workflow Modification in Progress</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/Zuite_waitForActivities</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Done.</td>\n + <td></td>\n +</tr>\n +<!-- We\'ll check everything else (workflow history, comments, etc) in a python\n +script. -->\n +<tr>\n + <td>open</td>\n + <td>${base_url}/foo_module/Zuite_testFolderWorkflowActionMultipleActionsCheckWorkflowHistory</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>result</td>\n + <td>OK</td>\n +</tr>\n +\n +\n +</body>\n +</html>\n + + +]]></string> </value> + </item> + <item> + <key> <string>content_type</string> </key> + <value> <string>text/html</string> </value> + </item> + <item> + <key> <string>expand</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>testFolderWorkflowActionMultipleActions</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionCheckWorkflowHistory.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionCheckWorkflowHistory.xml new file mode 100644 index 0000000000..7661620982 --- /dev/null +++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionCheckWorkflowHistory.xml @@ -0,0 +1,188 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Python_magic</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +from Products.CMFCore.utils import getToolByName\n +\n +foo_module = context.getPortalObject().foo_module\n +wtool = getToolByName(context, \'portal_workflow\')\n +\n +result = \'OK\'\n +error_list = []\n +\n +def assertEquals(a, b, msg=\'\'):\n + if a != b:\n + if msg:\n + error_list.append(msg)\n + else:\n + error_list.append(\'%r != %r\' % (a, b))\n +\n +foo_2 = foo_module[\'2\']\n +assertEquals(foo_2.getSimulationState(), \'validated\', \n + \'Foo 2 state is %s\' % foo_2.getSimulationState())\n +if not error_list:\n + assertEquals(\n + wtool.getInfoFor(foo_2, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n + \'Comment !\')\n +\n +foo_3 = foo_module[\'3\']\n +assertEquals(foo_3.getSimulationState(), \'validated\', \n + \'Foo 3 state is %s\' % foo_3.getSimulationState())\n +if not error_list:\n + assertEquals(\n + wtool.getInfoFor(foo_3, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n + \'Comment !\')\n +\n +if error_list:\n + result = \'\'.join(error_list)\n +\n +return \'<html><body><span id="result">%s</span></body></html>\' % result\n + + +]]></string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>Products.CMFCore.utils</string> + <string>getToolByName</string> + <string>_getattr_</string> + <string>context</string> + <string>foo_module</string> + <string>wtool</string> + <string>result</string> + <string>error_list</string> + <string>assertEquals</string> + <string>_getitem_</string> + <string>foo_2</string> + <string>foo_3</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Zuite_testFolderWorkflowActionCheckWorkflowHistory</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionFilteredSelectionCheckWorkflowHistory.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionFilteredSelectionCheckWorkflowHistory.xml new file mode 100644 index 0000000000..4ca073dc97 --- /dev/null +++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionFilteredSelectionCheckWorkflowHistory.xml @@ -0,0 +1,185 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Python_magic</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +from Products.CMFCore.utils import getToolByName\n +\n +foo_module = context.getPortalObject().foo_module\n +wtool = getToolByName(context, \'portal_workflow\')\n +\n +result = \'OK\'\n +error_list = []\n +\n +def assertEquals(a, b, msg=\'\'):\n + if a != b:\n + if msg:\n + error_list.append(msg)\n + else:\n + error_list.append(\'%r != %r\' % (a, b))\n +\n +foo_2 = foo_module[\'2\']\n +assertEquals(foo_2.getSimulationState(), \'draft\', \n + \'Foo 2 state is %s\' % foo_2.getSimulationState())\n +\n +\n +foo_3 = foo_module[\'3\']\n +assertEquals(foo_3.getSimulationState(), \'validated\', \n + \'Foo 3 state is %s\' % foo_3.getSimulationState())\n +if not error_list:\n + assertEquals(\n + wtool.getInfoFor(foo_3, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n + \'Comment !\')\n +\n +if error_list:\n + result = \'\'.join(error_list)\n +\n +return \'<html><body><span id="result">%s</span></body></html>\' % result\n + + +]]></string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>Products.CMFCore.utils</string> + <string>getToolByName</string> + <string>_getattr_</string> + <string>context</string> + <string>foo_module</string> + <string>wtool</string> + <string>result</string> + <string>error_list</string> + <string>assertEquals</string> + <string>_getitem_</string> + <string>foo_2</string> + <string>foo_3</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Zuite_testFolderWorkflowActionFilteredSelectionCheckWorkflowHistory</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionMultipleActionsCheckWorkflowHistory.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionMultipleActionsCheckWorkflowHistory.xml new file mode 100644 index 0000000000..337a87118b --- /dev/null +++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Zuite_testFolderWorkflowActionMultipleActionsCheckWorkflowHistory.xml @@ -0,0 +1,199 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Python_magic</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +from Products.CMFCore.utils import getToolByName\n +\n +foo_module = context.getPortalObject().foo_module\n +wtool = getToolByName(context, \'portal_workflow\')\n +\n +result = \'OK\'\n +error_list = []\n +\n +def assertEquals(a, b, msg=\'\'):\n + if a != b:\n + if msg:\n + error_list.append(msg)\n + else:\n + error_list.append(\'%r != %r\' % (a, b))\n +\n +\n +foo_1 = foo_module[\'1\']\n +assertEquals(foo_1.getSimulationState(), \'invalidated\', \n + \'Foo 1 state is %s\' % foo_1.getSimulationState())\n +if not error_list:\n + assertEquals(\n + wtool.getInfoFor(foo_1, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n + \'Comment !\')\n +\n +\n +foo_2 = foo_module[\'2\']\n +assertEquals(foo_2.getSimulationState(), \'validated\', \n + \'Foo 2 state is %s\' % foo_2.getSimulationState())\n +if not error_list:\n + assertEquals(\n + wtool.getInfoFor(foo_2, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n + \'Comment !\')\n +\n +foo_3 = foo_module[\'3\']\n +assertEquals(foo_3.getSimulationState(), \'validated\', \n + \'Foo 3 state is %s\' % foo_3.getSimulationState())\n +if not error_list:\n + assertEquals(\n + wtool.getInfoFor(foo_3, \'history\', wf_id=\'foo_workflow\')[-2][\'comment\'],\n + \'Comment !\')\n +\n +if error_list:\n + result = \'\'.join(error_list)\n +\n +return \'<html><body><span id="result">%s</span></body></html>\' % result\n + + +]]></string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>Products.CMFCore.utils</string> + <string>getToolByName</string> + <string>_getattr_</string> + <string>context</string> + <string>foo_module</string> + <string>wtool</string> + <string>result</string> + <string>error_list</string> + <string>assertEquals</string> + <string>_getitem_</string> + <string>foo_1</string> + <string>foo_2</string> + <string>foo_3</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Zuite_testFolderWorkflowActionMultipleActionsCheckWorkflowHistory</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/bt/revision b/bt5/erp5_ui_test/bt/revision index 27b4d6e6ba..022e7e6ca7 100644 --- a/bt5/erp5_ui_test/bt/revision +++ b/bt5/erp5_ui_test/bt/revision @@ -1 +1 @@ -287 \ No newline at end of file +288 \ No newline at end of file -- 2.30.9