Commit c21d65ce authored by Yusei Tahara's avatar Yusei Tahara Committed by Matevz Golob

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

parent 8819c29e
...@@ -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>testMyDocumentsGadget</title> <title>testMyDocumentsGadget</title>
</head> </head>
<body tal:define="file_name string:tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods; <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">testMyDocumentsGadget</td></tr> <tr><td rowspan="1" colspan="3">testMyDocumentsGadget</td></tr>
...@@ -31,9 +30,14 @@ ...@@ -31,9 +30,14 @@
<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.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>
...@@ -92,7 +96,7 @@ ...@@ -92,7 +96,7 @@
</tr> </tr>
<tr> <tr>
<td>verifyTextPresent</td> <td>verifyTextPresent</td>
<td tal:content="file_name"></td> <td>tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -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>testCheckPDFThumbnail</title> <title>testCheckPDFThumbnail</title>
</head> </head>
<body tal:define="file_name string:tiolive-ERP5.Freedom.TioLive.MultiplePages.PDF-001-en.pdf; <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">testCheckPDFThumbnail</td></tr> <tr><td rowspan="1" colspan="3">testCheckPDFThumbnail</td></tr>
...@@ -26,9 +25,14 @@ ...@@ -26,9 +25,14 @@
<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.Freedom.TioLive.MultiplePages.PDF-001-en.pdf tiolive-ERP5.Freedom.TioLive.MultiplePages.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>
......
...@@ -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>testCreateNewFile</title> <title>testCreateNewFile</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">testCreateNewFile</td></tr> <tr><td rowspan="1" colspan="3">testCreateNewFile</td></tr>
...@@ -31,9 +30,14 @@ ...@@ -31,9 +30,14 @@
<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>clickAndWait</td> <td>clickAndWait</td>
......
erp5_ui_test_core erp5_ui_test_core
erp5_ui_test_data
erp5_dms_ui_test erp5_dms_ui_test
erp5_km erp5_km
erp5_km_ui_test_data erp5_km_ui_test_data
......
<?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.MultiplePages.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.MultiplePages.PDF-001-en.pdf</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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