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

[erp5_ui_test_core, erp5_dms_ui_test, erp5_km_ui_test,...

[erp5_ui_test_core, erp5_dms_ui_test, erp5_km_ui_test, erp5_configurator_standard_ui_test] setFile command does not need pause command now.
parent 25744353
......@@ -213,11 +213,6 @@
<td>//input[@name=&quot;field_your_configuration_spreadsheet&quot;]</td>
<td>${base_url}/functional_test_data_folder/consulting_configurator_sample_categories.ods consulting_configurator_sample_categories.ods</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@name=&quot;next:method&quot;]</td>
......@@ -304,11 +299,6 @@
<td>//input[@name=&quot;field_your_portal_type_roles_spreadsheet&quot;]</td>
<td>${base_url}/functional_test_data_folder/consulting_configurator_sample_roles_configuration_sheet.ods consulting_configurator_sample_roles_configuration_sheet.ods</td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@name=&quot;next:method&quot;]</td>
......
......@@ -62,11 +62,6 @@ Wait for activities</span>
<td>setFile</td>
<td>field_your_file</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>
<td>type</td>
......
......@@ -41,11 +41,6 @@ Wait for activities</span>
<td>file</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>
<td>clickAndWait</td>
<td>Base_contribute:method</td>
......@@ -81,10 +76,13 @@ Wait for activities</span>
<td>Image</td>
<td></td>
</tr>
<td>waitForElementPresent</td>
<td>//select[@name="select_action"]</td>
<td></td>
<tr>
<td>selectAndWait</td>
<td>select_action</td>
<td>label=Publish Document</td>
<td>Publish Document</td>
</tr>
<tr>
<td>type</td>
......@@ -113,6 +111,16 @@ Wait for activities</span>
<td></td>
</tr>
<!-- javascript:SelectFile('tiolive-ERP5.Freedom.TioLive.Logo?format=png') -->
<tr>
<td>type</td>
<td>//input[@name="listbox_reference"]</td>
<td>tiolive-ERP5.Freedom.TioLive.Logo</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>tiolive-ERP5.Freedom.TioLive.Logo-001-en</td>
......
......@@ -40,11 +40,6 @@ Wait for activities</span>
<td>file</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>
<td>clickAndWait</td>
<td>Base_contribute:method</td>
......@@ -112,11 +107,6 @@ Wait for activities</span>
<td>file</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>
<td>clickAndWait</td>
<td>Base_contribute:method</td>
......@@ -184,11 +174,6 @@ Wait for activities</span>
<td>file</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>
<td>clickAndWait</td>
<td>Base_contribute:method</td>
......@@ -236,11 +221,6 @@ Wait for activities</span>
<td>file</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>
<td>clickAndWait</td>
<td>Base_contribute:method</td>
......@@ -288,11 +268,6 @@ Wait for activities</span>
<td>file</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>
<td>clickAndWait</td>
<td>Base_contribute:method</td>
......@@ -350,11 +325,6 @@ Wait for activities</span>
<td>file</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>
<td>clickAndWait</td>
<td>Base_contribute:method</td>
......
......@@ -32,11 +32,6 @@
<td>field_your_file</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>
<td>clickAndWait</td>
<td>dialog_submit_button</td>
......@@ -100,11 +95,6 @@ Wait for activities</span>
<td>field_your_file</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>
<td>clickAndWait</td>
<td>dialog_submit_button</td>
......
......@@ -34,11 +34,6 @@
<td>field_your_file</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>
<td>clickAndWait</td>
<td>dialog_submit_button</td>
......
......@@ -29,11 +29,6 @@
<td>field_your_file</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>
<td>clickAndWait</td>
<td>dialog_submit_button</td>
......
......@@ -34,11 +34,6 @@
<td>field_your_file</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>
<td>clickAndWait</td>
<td>dialog_submit_button</td>
......
......@@ -4,18 +4,11 @@
/**
* You can set file data to file input field without security error.
* After this command you must use pause command because this command
* is asynchronous.
* <tr>
* <td>setFile</td>
* <td>field_my_file</td>
* <td>/data.jpg myfilename.jpg</td>
* </tr>
* <tr>
* <td>pause</td>
* <td>10000</td>
* <td></td>
* </tr>
*/
Selenium.prototype.doSetFile = function(locator, url_and_filename) {
var tmpArray = url_and_filename.split(' ', 2);
......@@ -38,6 +31,10 @@ Selenium.prototype.doSetFile = function(locator, url_and_filename) {
dT.items.add(new File([blob], fileName));
fileField.files = dT.files;
});
return Selenium.decorateFunctionWithTimeout(function () {
var window = selenium.browserbot.getCurrentWindow();
return (fileField.value || "").endsWith(fileName);
}, 60000);
};
......
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