diff --git a/master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJS0ServiceWorker.xml b/master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJS0ServiceWorker.xml new file mode 100644 index 0000000000000000000000000000000000000000..42868954332f94636835ede5054ac56830624035 --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJS0ServiceWorker.xml @@ -0,0 +1,58 @@ + + + + + + + + + + _bind_names + + + + + + + + + + _asgns + + + + name_subpath + traverse_subpath + + + + + + + + + + + content_type + text/html + + + expand + 0 + + + id + testSlapOSJS0ServiceWorker + + + output_encoding + utf-8 + + + title + + + + + + diff --git a/master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJS0ServiceWorker.zpt b/master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJS0ServiceWorker.zpt new file mode 100644 index 0000000000000000000000000000000000000000..b232070a8081742daaa6df135bfbea7fddafe096 --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJS0ServiceWorker.zpt @@ -0,0 +1,81 @@ + + + + + Test RenderJS UI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Test RenderJS UI
open +
waitForElementPresentname=Base_createCloneDocument:method
clickAndWaitname=Base_createCloneDocument:method
verifyTextPresentCreated Clone Web Site
storeValuename=field_my_idinstall_url
open${base_url}/web_site_module/${install_url}/#/?page=test_service_worker
setTimeout450000
assertTextPresentHas SW: false
waitForTextPresentHas SW: true
assertTextPresentHas SW: true
+ + + \ No newline at end of file diff --git a/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_html.html b/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_html.html new file mode 100644 index 0000000000000000000000000000000000000000..00a06a55dd00e05dfb9c064d21a00b1ca92d8d0c --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_html.html @@ -0,0 +1,22 @@ + + + + + + SlapOS Test Service Worker + + + + + + + + + + + + + + + + diff --git a/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_html.xml b/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_html.xml new file mode 100644 index 0000000000000000000000000000000000000000..3710ece02062dc2b77622cc8c2e49b57520a7f26 --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_html.xml @@ -0,0 +1,336 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + + + + + _Add_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _Change_local_roles_Permission + + + Assignor + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _View_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + + + + + content_md5 + + + + + + content_type + text/html + + + default_reference + gadget_erp5_page_test_service_worker.html + + + description + + + + + + id + rjs_gadget_slapos_erp5_page_test_service_worker_html + + + language + 001 + + + portal_type + Web Page + + + short_title + + + + + + title + SlapOS Version of Service workers Test + + + version + en + + + workflow_history + + AAAAAAAAAAI= + + + + + + + + + + + + + data + + + + document_publication_workflow + + AAAAAAAAAAM= + + + + edit_workflow + + AAAAAAAAAAQ= + + + + processing_status_workflow + + AAAAAAAAAAU= + + + + + + + + + + + + + + + + _log + + + + + action + publish_alive + + + actor + zope + + + comment + + + + error_message + + + + time + + + + + + + + + + + 1593318187.31 + UTC + + + + + + + validation_state + published_alive + + + + + + + + + + + + + + + + _log + + + + + action + edit + + + actor + zope + + + comment + + + + + + error_message + + + + serial + 984.56523.10961.53162 + + + state + current + + + time + + + + + + + + + + + 1593318513.65 + UTC + + + + + + + + + + + + + + + + + + + + _log + + + + + action + + + + + + actor + zope + + + comment + + + + error_message + + + + external_processing_state + empty + + + serial + 0.0.0.0 + + + time + + + + + + + + + + + 1593318073.16 + UTC + + + + + + + + + + + + + diff --git a/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_js.js b/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_js.js new file mode 100644 index 0000000000000000000000000000000000000000..ac20615b673ff340861f5ec2aa402a7b26183eb9 --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_js.js @@ -0,0 +1,73 @@ +/*global window, rJS, RSVP, domsugar, navigator, promiseEventListener, jIO */ +/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */ +(function (window, rJS, RSVP, domsugar, navigator, promiseEventListener, jIO) { + "use strict"; + + rJS(window) + .declareAcquiredMethod("getUrlFor", "getUrlFor") + .declareAcquiredMethod("getUrlForList", "getUrlForList") + + .declareAcquiredMethod("updateHeader", "updateHeader") + + .declareMethod('render', function () { + var gadget = this; + // Wait a bit a allow the header loader to be displayed + return new RSVP.Queue(RSVP.delay(200)) + .push(function () { + return gadget.getUrlForList([ + // Home page + {command: 'display'}, + // Soft reload the gadget + {command: 'change'} + ]); + }) + .push(function (url_list) { + gadget.checkServiceWorkerStatus(); + return gadget.updateHeader({ + page_title: 'Test Service Worker', + front_url: url_list[0], + tab_url: url_list[1], + submit_action: true + }); + }); + }) + + .declareMethod("triggerSubmit", function () { + var gadget = this; + return new RSVP.Queue(jIO.util.ajax({ + type: 'POST', + url: './Base_changeModificationDateForTest' + })) + .push(function () { + domsugar(gadget.element, { + text: "SW changed on server" + }); + }); + }) + + .declareJob("checkServiceWorkerStatus", function () { + var gadget = this, + has_service_worker = (navigator.serviceWorker.controller !== null); + + domsugar(gadget.element, { + text: "Has SW: " + has_service_worker.toString() + }); + return new RSVP.Queue(navigator.serviceWorker.ready) + .push(function (worker_container) { + domsugar(gadget.element, { + text: "Has SW: true" + }); + return promiseEventListener(worker_container.active, 'statechange'); + }) + .push(function () { + // Wait a bit until the message is propagated + return RSVP.delay(2000); + }) + .push(function () { + domsugar(gadget.element, { + text: "New SW ready" + }); + }); + }); + +}(window, rJS, RSVP, domsugar, navigator, promiseEventListener, jIO)); \ No newline at end of file diff --git a/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_js.xml b/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_js.xml new file mode 100644 index 0000000000000000000000000000000000000000..ea92462d44c420a24214d97f7e751e43e1b5cfec --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/PathTemplateItem/web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_js.xml @@ -0,0 +1,336 @@ + + + + + + + + + + _Access_contents_information_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + + + + + _Add_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _Change_local_roles_Permission + + + Assignor + Manager + + + + + _Modify_portal_content_Permission + + + Assignee + Assignor + Manager + + + + + _View_Permission + + + Anonymous + Assignee + Assignor + Associate + Auditor + Manager + + + + + content_md5 + + + + + + content_type + application/javascript + + + default_reference + gadget_erp5_page_test_service_worker.js + + + description + + + + + + id + rjs_gadget_slapos_erp5_page_test_service_worker_js + + + language + en + + + portal_type + Web Script + + + short_title + + + + + + title + SlapOS Version of Service workers Test + + + version + 001 + + + workflow_history + + AAAAAAAAAAI= + + + + + + + + + + + + + data + + + + document_publication_workflow + + AAAAAAAAAAM= + + + + edit_workflow + + AAAAAAAAAAQ= + + + + processing_status_workflow + + AAAAAAAAAAU= + + + + + + + + + + + + + + + + _log + + + + + action + publish_alive + + + actor + zope + + + comment + + + + error_message + + + + time + + + + + + + + + + + 1593318348.46 + UTC + + + + + + + validation_state + published_alive + + + + + + + + + + + + + + + + _log + + + + + action + edit + + + actor + zope + + + comment + + + + + + error_message + + + + serial + 984.56521.63704.42956 + + + state + current + + + time + + + + + + + + + + + 1593318442.11 + UTC + + + + + + + + + + + + + + + + + + + + _log + + + + + action + + + + + + actor + zope + + + comment + + + + error_message + + + + external_processing_state + empty + + + serial + 0.0.0.0 + + + time + + + + + + + + + + + 1593318253.26 + UTC + + + + + + + + + + + + + diff --git a/master/bt5/slapos_jio_ui_test/bt/template_keep_last_workflow_history_only_path_list b/master/bt5/slapos_jio_ui_test/bt/template_keep_last_workflow_history_only_path_list new file mode 100644 index 0000000000000000000000000000000000000000..338b769374ea88649f5bcd8cb5a9ff5ce4e2db54 --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/bt/template_keep_last_workflow_history_only_path_list @@ -0,0 +1,2 @@ +web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_html +web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_js \ No newline at end of file diff --git a/master/bt5/slapos_jio_ui_test/bt/template_path_list b/master/bt5/slapos_jio_ui_test/bt/template_path_list index 56feae9a2c6a02e5ff76dca3c4da260b45f0c928..58849eda018ee32c43ca2997d08362b2ebb27f08 100644 --- a/master/bt5/slapos_jio_ui_test/bt/template_path_list +++ b/master/bt5/slapos_jio_ui_test/bt/template_path_list @@ -1,2 +1,4 @@ portal_tests/slaposjs_zuite -portal_tests/slaposjs_zuite/** \ No newline at end of file +portal_tests/slaposjs_zuite/** +web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_html +web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_js \ No newline at end of file