Commit 8819c29e authored by Yusei Tahara's avatar Yusei Tahara Committed by Matevz Golob

[erp5_dms_ui_test] Fix file uploading tests. Use setFile selenium command to avoid security error.

parent 7a90f68e
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>testAttachDocument</title> <title>testAttachDocument</title>
</head> </head>
<body tal:define="file_name string:tiolive-ERP5.DMS.TioLive-001-en.odp; <body tal:define="person_full_name string:DMS tester">
full_filename_location python: here.Zuite_getFilenameLocation(file_name);
person_full_name string:DMS tester">
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="3">testAttachDocument</td></tr> <tr><td rowspan="1" colspan="3">testAttachDocument</td></tr>
...@@ -61,9 +59,14 @@ Wait for activities</span> ...@@ -61,9 +59,14 @@ Wait for activities</span>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>setFile</td>
<td>field_your_file</td> <td>field_your_file</td>
<td tal:content="full_filename_location"></td> <td>${base_url}/functional_test_data_folder/tiolive-ERP5.DMS.TioLive-001-en.odp tiolive-ERP5.DMS.TioLive-001-en.odp</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
...@@ -97,7 +100,7 @@ Wait for activities</span> ...@@ -97,7 +100,7 @@ Wait for activities</span>
</tr> </tr>
<tr> <tr>
<td>verifyTextPresent</td> <td>verifyTextPresent</td>
<td tal:content="file_name"></td> <td>tiolive-ERP5.DMS.TioLive-001-en.odp</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -37,9 +37,14 @@ Wait for activities</span> ...@@ -37,9 +37,14 @@ Wait for activities</span>
<td>60000</td> <td>60000</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>setFile</td>
<td>file</td> <td>file</td>
<td tal:content="python: here.Zuite_getFilenameLocation('tiolive-ERP5.Freedom.TioLive.Logo-001-en.png')"></td> <td>${base_url}/functional_test_data_folder/tiolive-ERP5.Freedom.TioLive.Logo-001-en.png tiolive-ERP5.Freedom.TioLive.Logo-001-en.png</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
......
...@@ -36,9 +36,14 @@ Wait for activities</span> ...@@ -36,9 +36,14 @@ Wait for activities</span>
<td>60000</td> <td>60000</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>setFile</td>
<td>file</td> <td>file</td>
<td tal:content="python: here.Zuite_getFilenameLocation('tiolive-ERP5.Freedom.TioLive-001-en.odp')"></td> <td>${base_url}/functional_test_data_folder/tiolive-ERP5.Freedom.TioLive-001-en.odp tiolive-ERP5.Freedom.TioLive-001-en.odp</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
...@@ -103,9 +108,14 @@ Wait for activities</span> ...@@ -103,9 +108,14 @@ Wait for activities</span>
<td>60000</td> <td>60000</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>setFile</td>
<td>file</td> <td>file</td>
<td tal:content="python: here.Zuite_getFilenameLocation('tiolive-ERP5.Freedom.TioLive-001-en.odp')"></td> <td>${base_url}/functional_test_data_folder/tiolive-ERP5.Freedom.TioLive-001-en.odp tiolive-ERP5.Freedom.TioLive-001-en.odp</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
...@@ -170,9 +180,14 @@ Wait for activities</span> ...@@ -170,9 +180,14 @@ Wait for activities</span>
<td>60000</td> <td>60000</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>setFile</td>
<td>file</td> <td>file</td>
<td tal:content="python: here.Zuite_getFilenameLocation('tiolive-ERP5.Freedom.TioLive.PDF-001-en.pdf')"></td> <td>${base_url}/functional_test_data_folder/tiolive-ERP5.Freedom.TioLive.PDF-001-en.pdf tiolive-ERP5.Freedom.TioLive.PDF-001-en.pdf</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
...@@ -217,9 +232,14 @@ Wait for activities</span> ...@@ -217,9 +232,14 @@ Wait for activities</span>
<td>60000</td> <td>60000</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>setFile</td>
<td>file</td> <td>file</td>
<td tal:content="python: here.Zuite_getFilenameLocation('tiolive-ERP5.Freedom.TioLive.Logo-001-en.png')"></td> <td>${base_url}/functional_test_data_folder/tiolive-ERP5.Freedom.TioLive.Logo-001-en.png tiolive-ERP5.Freedom.TioLive.Logo-001-en.png</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
...@@ -264,9 +284,14 @@ Wait for activities</span> ...@@ -264,9 +284,14 @@ Wait for activities</span>
<td>60000</td> <td>60000</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>setFile</td>
<td>file</td> <td>file</td>
<td tal:content="python: here.Zuite_getFilenameLocation('tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods')"></td> <td>${base_url}/functional_test_data_folder/tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
...@@ -321,9 +346,14 @@ Wait for activities</span> ...@@ -321,9 +346,14 @@ Wait for activities</span>
<td>60000</td> <td>60000</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>setFile</td>
<td>file</td> <td>file</td>
<td tal:content="python: here.Zuite_getFilenameLocation('tiolive-ERP5.Freedom.TioLive.Drawing-001-en.odg')"></td> <td>${base_url}/functional_test_data_folder/tiolive-ERP5.Freedom.TioLive.Drawing-001-en.odg tiolive-ERP5.Freedom.TioLive.Drawing-001-en.odg</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>testPortalContributionsToolNewFile</title> <title>testPortalContributionsToolNewFile</title>
</head> </head>
<body tal:define="file_name string:tiolive-ERP5.DMS.TioLive-001-en.odp; <body>
full_filename_location python: here.Zuite_getFilenameLocation(file_name)">
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="3">testPortalContributionsToolNewFile</td></tr> <tr><td rowspan="1" colspan="3">testPortalContributionsToolNewFile</td></tr>
...@@ -29,9 +28,14 @@ ...@@ -29,9 +28,14 @@
<td>label=Contribute File</td> <td>label=Contribute File</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>setFile</td>
<td>field_your_file</td> <td>field_your_file</td>
<td tal:content="full_filename_location"></td> <td>${base_url}/functional_test_data_folder/tiolive-ERP5.DMS.TioLive-001-en.odp tiolive-ERP5.DMS.TioLive-001-en.odp</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
...@@ -50,7 +54,7 @@ ...@@ -50,7 +54,7 @@
</tr> </tr>
<tr> <tr>
<td>verifyTextPresent</td> <td>verifyTextPresent</td>
<td tal:content="file_name"></td> <td>tiolive-ERP5.DMS.TioLive-001-en.odp</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -92,9 +96,14 @@ Wait for activities</span> ...@@ -92,9 +96,14 @@ Wait for activities</span>
<td>label=Contribute File</td> <td>label=Contribute File</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>setFile</td>
<td>field_your_file</td> <td>field_your_file</td>
<td tal:content="full_filename_location"></td> <td>${base_url}/functional_test_data_folder/tiolive-ERP5.DMS.TioLive-001-en.odp tiolive-ERP5.DMS.TioLive-001-en.odp</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
...@@ -108,7 +117,7 @@ Wait for activities</span> ...@@ -108,7 +117,7 @@ Wait for activities</span>
</tr> </tr>
<tr> <tr>
<td>verifyTextPresent</td> <td>verifyTextPresent</td>
<td tal:content="file_name"></td> <td>tiolive-ERP5.DMS.TioLive-001-en.odp</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
erp5_dms erp5_dms
erp5_ui_test erp5_ui_test
erp5_ui_test_data
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_ui_test_data</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>functional_test_data_folder</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>tiolive-ERP5.DMS.TioLive-001-en.odp</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/vnd.oasis.opendocument.presentation</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>tiolive-ERP5.DMS.TioLive-001-en.odp</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>tiolive-ERP5.Freedom.TioLive-001-en.odp</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/vnd.oasis.opendocument.presentation</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>tiolive-ERP5.Freedom.TioLive-001-en.odp</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>tiolive-ERP5.Freedom.TioLive.Drawing-001-en.odg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/vnd.oasis.opendocument.graphics</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>tiolive-ERP5.Freedom.TioLive.Drawing-001-en.odg</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>tiolive-ERP5.Freedom.TioLive.Logo-001-en.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>95</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>tiolive-ERP5.Freedom.TioLive.Logo-001-en.png</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>196</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>tiolive-ERP5.Freedom.TioLive.PDF-001-en.pdf</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/pdf</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>tiolive-ERP5.Freedom.TioLive.PDF-001-en.pdf</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/vnd.oasis.opendocument.spreadsheet</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2019-08-15 yusei
* Initial commit.
\ No newline at end of file
Copyright (c) 2019 Nexedi SA
\ No newline at end of file
This business template contains files used by functional tests.
\ No newline at end of file
GPL
\ No newline at end of file
erp5_ui_test_data
\ No newline at end of file
erp5_ui_test_data
\ No newline at end of file
1
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment