Commit a89c7e9e authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Jérome Perrin

erp5_monaco_editor: Add Precache Manifest script

   Probably there are missing files but it is a start.
parent 8424dbe2
url_list = [
"monaco-editor.gadget.html",
"monaco-editor.gadget.js",
"jslint.js",
"monaco-editor/prettier@2.0.5/parser-babel.js",
"monaco-editor/prettier@2.0.5/standalone.js",
"monaco-editor/app.bundle.min.js",
"monaco-editor/editor.worker.bundle.min.js",
"monaco-editor/3703.bundle.min.js"
]
return url_list
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>REQUEST=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_getMonacoEditorPrecacheManifestList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testTextEditorCacheManifest</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Text Editor Cache Manifest</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title tal:content="template/title_and_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3" tal:content="template/title_and_id"></td>
</tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/foo_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b>Set prefered text editor</b></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/portal_preferences/erp5_ui_test_preference/Preference_viewHtmlStyle</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//input[@name="field_my_preferred_text_editor" and @value="monaco"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@name='Base_edit:method']</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b>Make a new web site using our cache manifest</b></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/?ignore_layout:int=1&editable_mode:int=1</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_createCloneDocument:method</td>
<td></td>
</tr>
<tr>
<td>assertPortalStatusMessage</td>
<td>Created Clone Web Site.</td>
<td></td>
</tr>
<tr>
<td>storeValue</td>
<td>name=field_my_id</td>
<td>new_web_site_id</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Layout Configuration</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>field_my_configuration_precache_manifest_script_list</td>
<td><br/>WebSection_getMonacoEditorPrecacheManifestList</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_edit:method</td>
<td></td>
</tr>
<tr>
<td>assertPortalStatusMessage</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b>Switch to renderjs UI and check the manifest is loaded</b></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_site_module/${new_web_site_id}/#/web_page_module?editable=true</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>waitForCondition</td>
<td>selenium.browserbot.currentWindow.navigator.serviceWorker.controller !== null</td>
<td>180000</td>
</tr>
</tbody>
</table>
</body>
</html>
\ 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