Commit b9abd32f authored by Jérome Perrin's avatar Jérome Perrin

Initial support of firefox 115 for Zelenium tests

See merge request nexedi/erp5!1838
parents 00dcc183 288e0444
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'send',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -49,7 +49,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_create_event_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Sent',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -42,7 +42,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'send',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -79,7 +79,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_create_event_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Sent',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -50,7 +50,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_create_event_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -47,7 +47,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_response_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -47,7 +47,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_response_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -49,7 +49,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -49,7 +49,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_notification_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -47,7 +47,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -47,7 +47,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_notification_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'Test event',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'send',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -51,7 +51,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'Test event',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Sent',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -54,7 +54,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'Test event',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'send',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -93,7 +93,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'Test event',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Sent',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -51,7 +51,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_create_event_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -49,7 +49,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_response_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -49,7 +49,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_response_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -51,7 +51,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -51,7 +51,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_notification_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -49,7 +49,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -49,7 +49,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_notification_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......
......@@ -16,7 +16,7 @@
</item>
<item>
<key> <string>height</string> </key>
<value> <int>284</int> </value>
<value> <int>276</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
......
......@@ -78,7 +78,7 @@
<!-- Wait for spreadsheet to be rendered by the gadget -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='spreadsheet']</td>
<td>css=.spreadsheet</td>
<td></td>
</tr>
<!-- Verify maximize button is present -->
......
......@@ -116,7 +116,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='spreadsheet']</td>
<td>css=.spreadsheet</td>
<td></td>
</tr>
<!-- Wait for editor completly loaded, this is workaround, wait for lock in renderjs -->
......
......@@ -357,7 +357,7 @@
</item>
<item>
<key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'none\'; img-src \'self\' https://*.tile.openstreetmap.org data:; media-src \'self\' blob:; connect-src \'self\' https://localhost:5000 mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net; script-src \'self\' \'unsafe-eval\'; font-src \'self\' netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data: *.app.officejs.com</string> </value>
<value> <string>default-src \'none\'; img-src \'self\' https://*.tile.openstreetmap.org data:; media-src \'self\' blob:; connect-src \'self\' https://localhost:5000 mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net; script-src \'self\' \'unsafe-eval\'; font-src \'self\' netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data: *.app.officejs.com; manifest-src \'self\'</string> </value>
</item>
<item>
<key> <string>configuration_default_view_action_reference</string> </key>
......@@ -670,7 +670,7 @@
</tuple>
<state>
<tuple>
<float>1549964409.02</float>
<float>1549964409.03</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -80,6 +80,7 @@
<string>my_source_title</string>
<string>my_creation_date</string>
<string>your_simulation_state</string>
<string>your_modification_date</string>
</list>
</value>
</item>
......
......@@ -226,6 +226,16 @@ Selenium.prototype.doVerifyImageMatchSnapshot = (
locator,
misMatchTolerance
) => {
if (window['ignoreSnapshotTest'].checked){
// calling getReferenceImageCounter has the side effect
// of increasing the counter, so if we enable / disable
// snapshot mid test the counter stays in sync.
var snapshotCounter = getReferenceImageCounter(
testFrame.getCurrentTestCase().pathname);
console.log("ignoring snapshot test " + snapshotCounter);
return;
}
var misMatchToleranceFloat = parseFloat(misMatchTolerance);
if (isNaN(misMatchToleranceFloat)) {
misMatchToleranceFloat = 0;
......@@ -263,7 +273,7 @@ Selenium.prototype.doVerifyImageMatchSnapshot = (
if (response.status === 200) {
return response.blob();
}
throw new Error('Feching reference failed ' + response.statusText);
throw new Error('Fetching reference failed ' + response.statusText);
})
.then(
blob => {
......
......@@ -223,7 +223,7 @@
if (!gadget.state.date_only) {
time = "T" + Math.floor(tmp_hour / 10) + tmp_hour % 10 + ":" +
Math.floor(tmp_minute / 10) + (tmp_minute % 10) + ":00";
Math.floor(tmp_minute / 10) + (tmp_minute % 10);
}
date = tmp_year + "-" + Math.floor(tmp_month / 10) +
(tmp_month % 10) + "-" +
......
......@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1609253131.45</float>
<float>1609253131.46</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -78,7 +78,7 @@
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='field_my_start_date']//div[@data-gadget-scope='field']//p[@data-date='2015-12-21T11:00:00']</td>
<td>//div[@data-gadget-scope='field_my_start_date']//div[@data-gadget-scope='field']//p[@data-date='2015-12-21T11:00']</td>
<td></td>
</tr>
......@@ -90,7 +90,7 @@
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='field_my_stop_date']//div[@data-gadget-scope='field']//p[@data-date='2016-12-21T12:00:00']</td>
<td>//div[@data-gadget-scope='field_my_stop_date']//div[@data-gadget-scope='field']//p[@data-date='2016-12-21T12:00']</td>
<td></td>
</tr>
......@@ -145,7 +145,7 @@
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='field_my_stop_date']//div[@data-gadget-scope='field']//p[@data-date='2016-12-21T12:00:00']</td>
<td>//div[@data-gadget-scope='field_my_stop_date']//div[@data-gadget-scope='field']//p[@data-date='2016-12-21T12:00']</td>
<td></td>
</tr>
......
......@@ -67,7 +67,7 @@
<tr>
<td>verifyValue</td>
<td>//div[@data-gadget-scope='field_my_stop_date']//input</td>
<td>2004-02-29T23:10:00</td>
<td>2004-02-29T23:10</td>
</tr>
<tr>
......
......@@ -123,9 +123,9 @@
</tal:block>
<tr>
<td>assertElementPresent</td>
<td>//input[@value='2017-02-22T22:22:00']</td>
<td></td>
<td>assertValue</td>
<td>//input[@name='field_my_start_date']</td>
<td>2017-02-22T22:22</td>
</tr>
<tr>
......
......@@ -78,7 +78,7 @@
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='field_my_start_date']//div[@data-gadget-scope='field']//p[@data-date='2015-12-21T11:00:00']</td>
<td>//div[@data-gadget-scope='field_my_start_date']//div[@data-gadget-scope='field']//p[@data-date='2015-12-21T11:00']</td>
<td></td>
</tr>
......@@ -89,13 +89,13 @@
<tr>
<td>verifyValue</td>
<td>//div[@data-gadget-scope='field_my_start_date']//input</td>
<td>2015-12-21T11:00:00</td>
<td>2015-12-21T11:00</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//div[@data-gadget-scope='field_my_stop_date']//input</td>
<td>2016-12-21T12:00:00</td>
<td>2016-12-21T12:00</td>
</tr>
<tr>
......
......@@ -73,7 +73,7 @@
<tr>
<td>verifyValue</td>
<td>//div[@data-gadget-scope='field_my_stop_date']//input</td>
<td>2016-12-21T12:00:00</td>
<td>2016-12-21T12:00</td>
</tr>
<tr>
......@@ -85,7 +85,7 @@
<tr>
<td>verifyValue</td>
<td>//div[@data-gadget-scope='field_my_start_date']//input</td>
<td>2022-12-21T09:00:00</td>
<td>2022-12-21T09:00</td>
</tr>
......
......@@ -233,6 +233,19 @@ class FunctionalTestRunner:
options.set_preference('dom.serviceWorkers.enabled', True)
# output javascript console and errors on stdout to help diagnosing failures
options.set_preference('devtools.console.stdout.content', True)
# Always download attachments and do not open PDF inline, otherwise the
# browser's active would tab lose the focus
download_dir = os.path.join(log_directory, 'downloads')
if not os.path.exists(download_dir):
os.mkdir(download_dir)
options.set_preference("browser.download.dir", download_dir)
options.set_preference("browser.helperApps.neverAsk.saveToDisk", "application/pdf")
options.set_preference("browser.download.folderList", 2)
options.set_preference("browser.download.manager.showWhenStarting", False)
options.set_preference("dom.block_download_insecure", False)
options.set_preference("pdfjs.disabled", True)
# always grant location
options.set_preference("permissions.default.geo", 1)
selenium_test_runner_configuration = {}
test_runner_configuration_file = os.environ.get('ERP5_TEST_RUNNER_CONFIGURATION')
......
......@@ -106,6 +106,9 @@ to work-around a bug in IE on Win2K whereby the HTA application doesn't function
<div class="executionOptions">
<input id="highlightOption" type="checkbox" name="highlightOption" value="0"/>
<label for="highlightOption">Highlight elements</label>
<br/>
<input id="ignoreSnapshotTest" type="checkbox" name="ignoreSnapshotTest" value="0"/>
<label for="ignoreSnapshotTest">Ignore snapshot tests</label>
</div>
</fieldset>
......
......@@ -356,7 +356,7 @@ function triggerEvent(element, eventType, canBubble, controlKeyDown, altKeyDown,
function getKeyCodeFromKeySequence(keySequence) {
var match = /^\\(\d{1,3})$/.exec(keySequence);
if (match != null) {
return match[1];
return parseInt(match[1], 10);
}
match = /^.$/.exec(keySequence);
if (match != null) {
......@@ -366,7 +366,7 @@ function getKeyCodeFromKeySequence(keySequence) {
// 1 digit ascii codes will break however because they are used for the digit chars
match = /^\d{2,3}$/.exec(keySequence);
if (match != null) {
return match[0];
return parseInt(match[0], 10);
}
throw new SeleniumError("invalid keySequence");
}
......@@ -390,7 +390,18 @@ function triggerKeyEvent(element, eventType, keySequence, canBubble, controlKeyD
}
else {
var evt;
if (window.KeyEvent) {
if (window.KeyboardEvent) {
evt = new KeyboardEvent(eventType, {
ctrlKey: controlKeyDown,
altKey: altKeyDown,
shiftKey: shiftKeyDown,
metaKey: metaKeyDown,
keyCode: keycode,
which: keycode,
cancelable: true,
bubbles: canBubble
});
} else if (window.KeyEvent) {
evt = document.createEvent('KeyEvents');
evt.initKeyEvent(eventType, true, true, window, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown, keycode, keycode);
} else {
......@@ -406,7 +417,23 @@ function triggerKeyEvent(element, eventType, keySequence, canBubble, controlKeyD
evt.which = keycode;
}
element.dispatchEvent(evt);
const dispatched = element.dispatchEvent(evt);
// perform "Implicit submission" of the form, as specified in
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#implicit-submission
if ( keycode === 13
&& dispatched
&& (eventType === "keypress" || eventType === "keyup")
&& (element.type === "text" || element.type === "password")
&& element.form
&& window.SubmitEvent ) {
const defaultButton = element.form.querySelector("input[type='submit']");
if (defaultButton && !defaultButton.disabled) {
defaultButton.click();
} else {
element.form.requestSubmit();
}
}
}
}
......
......@@ -117,18 +117,24 @@ Logger.prototype = {
},
debug: function(message) {
// debug is too verbose
// console.debug(new Date().toISOString(), message);
this.log("debug", message);
},
info: function(message) {
// selenium instructions are logged with level info, we try not to include passwords in logs.
console.info(new Date().toISOString(), message.toString().replace(/password.*/, '***password redacted***'));
this.log("info", message);
},
warn: function(message) {
console.warn(new Date().toISOString(), message);
this.log("warn", message);
},
error: function(message) {
console.error(new Date().toISOString(), message);
this.log("error", message);
},
......
......@@ -107,6 +107,9 @@ to work-around a bug in IE on Win2K whereby the HTA application doesn't function
<div class="executionOptions">
<input id="highlightOption" type="checkbox" name="highlightOption" value="0"/>
<label for="highlightOption">Highlight elements</label>
<br/>
<input id="ignoreSnapshotTest" type="checkbox" name="ignoreSnapshotTest" value="0"/>
<label for="ignoreSnapshotTest">Ignore snapshot tests</label>
</div>
</fieldset>
......
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