Commit cb455d91 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Dont overwrite renderjs_runner

    Use another website for handle OSS (administrative) operations rather them overwrite properties on renderjs_runner itself
parent 015add27
...@@ -35,7 +35,7 @@ class TestSlapOSHostingJSPrecacheManifestList(SlapOSTestCaseMixinWithAbort): ...@@ -35,7 +35,7 @@ class TestSlapOSHostingJSPrecacheManifestList(SlapOSTestCaseMixinWithAbort):
return self.portal.restrictedTraverse(reference, None) is not None return self.portal.restrictedTraverse(reference, None) is not None
def test(self): def test(self):
self.web_site = self.portal.web_site_module.renderjs_runner self.web_site = self.portal.web_site_module.renderjs_oss
self.changeSkin('Hal') self.changeSkin('Hal')
manifest_script = getattr(self.web_site, self.manifest_script_id) manifest_script = getattr(self.web_site, self.manifest_script_id)
failure_list = [] failure_list = []
......
...@@ -6,24 +6,6 @@ ...@@ -6,24 +6,6 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
<string>Reviewer</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>_Add_portal_content_Permission</string> </key> <key> <string>_Add_portal_content_Permission</string> </key>
<value> <value>
...@@ -67,24 +49,7 @@ ...@@ -67,24 +49,7 @@
<string>Assignee</string> <string>Assignee</string>
<string>Assignor</string> <string>Assignor</string>
<string>Manager</string> <string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string> <string>Owner</string>
<string>Reviewer</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -133,7 +98,7 @@ ...@@ -133,7 +98,7 @@
<key> <key>
<tuple> <tuple>
<int>99</int> <int>99</int>
<string>ERP5 Web Site/renderjs_runner</string> <string>ERP5 Web Site/renderjs_oss</string>
</tuple> </tuple>
</key> </key>
<value> <value>
...@@ -462,11 +427,11 @@ WebSection_getRenderJSRunnerAccessPagePrecacheManifestList</string> </value> ...@@ -462,11 +427,11 @@ WebSection_getRenderJSRunnerAccessPagePrecacheManifestList</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>RenderJS Gadget ERP5</string> </value> <value> <string>RenderJS Runner for OSS</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>renderjs_runner</string> </value> <value> <string>renderjs_oss</string> </value>
</item> </item>
<item> <item>
<key> <string>int_index</string> </key> <key> <string>int_index</string> </key>
...@@ -516,12 +481,18 @@ WebSection_getRenderJSRunnerAccessPagePrecacheManifestList</string> </value> ...@@ -516,12 +481,18 @@ WebSection_getRenderJSRunnerAccessPagePrecacheManifestList</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>RenderJS Runner</string> </value> <value> <string>RenderJS Runner for OSS</string> </value>
</item> </item>
<item> <item>
<key> <string>visible</string> </key> <key> <string>visible</string> </key>
<value> <int>1</int> </value> <value> <int>1</int> </value>
</item> </item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAg=</string> </persistent>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
...@@ -585,4 +556,154 @@ WebSection_getRenderJSRunnerAccessPagePrecacheManifestList</string> </value> ...@@ -585,4 +556,154 @@ WebSection_getRenderJSRunnerAccessPagePrecacheManifestList</string> </value>
<none/> <none/>
</pickle> </pickle>
</record> </record>
<record id="8" aka="AAAAAAAAAAg=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>category_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAk=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAo=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="9" aka="AAAAAAAAAAk=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671151441.91</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>embedded</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="10" aka="AAAAAAAAAAo=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1005.1964.2264.20343</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671151941.45</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -203,3 +203,5 @@ web_page_module/rjs_vkbeautify_js ...@@ -203,3 +203,5 @@ web_page_module/rjs_vkbeautify_js
web_page_module/slapos_admin_front_page web_page_module/slapos_admin_front_page
web_site_module/hostingjs web_site_module/hostingjs
web_site_module/hostingjs/** web_site_module/hostingjs/**
web_site_module/renderjs_oss
web_site_module/renderjs_oss/**
\ No newline at end of file
web_site_module/hateoas web_site_module/hateoas
web_site_module/hateoas/** web_site_module/hateoas/**
web_site_module/renderjs_runner
portal_types/ERP5 Form portal_types/ERP5 Form
portal_propery_sheets/SlapOSHateoasSystemPreference portal_propery_sheets/SlapOSHateoasSystemPreference
web_page_module/rjs_gadget_erp5_panel_shortcut_html web_page_module/rjs_gadget_erp5_panel_shortcut_html
......
...@@ -207,4 +207,5 @@ web_page_module/rjs_vkbeautify_js ...@@ -207,4 +207,5 @@ web_page_module/rjs_vkbeautify_js
web_page_module/slapos_admin_front_page web_page_module/slapos_admin_front_page
web_site_module/hostingjs web_site_module/hostingjs
web_site_module/hostingjs/** web_site_module/hostingjs/**
web_site_module/renderjs_runner web_site_module/renderjs_oss
\ No newline at end of file web_site_module/renderjs_oss/**
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>slapos_renderjs_runner_zuite</string> </value> <value> <string>slapos_renderjs_oss_zuite</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>testSlapOSJSRenderJSRunner0ServiceWorker</string> </value> <value> <string>testSlapOSJSRenderJSOSS0ServiceWorker</string> </value>
</item> </item>
<item> <item>
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<td rowspan="1" colspan="3">Test RenderJS UI</td> <td rowspan="1" colspan="3">Test RenderJS UI</td>
</tr> </tr>
</thead> </thead>
<tbody tal:define="web_site_id python: 'renderjs_runner'"> <tbody tal:define="web_site_id python: 'renderjs_oss'">
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/set_default_available_language"/> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/set_default_available_language"/>
<tr> <tr>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<tr> <tr>
<td>open</td> <td>open</td>
<td <td
tal:content="python: '${base_url}/web_site_module/renderjs_runner?ignore_layout:int=1&editable_mode:int=1'"> tal:content="python: '${base_url}/web_site_module/renderjs_oss?ignore_layout:int=1&editable_mode:int=1'">
</td> </td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>testSlapOSJSRenderJSRunnerBasicNavigation</string> </value> <value> <string>testSlapOSJSRenderJSOSSBasicNavigation</string> </value>
</item> </item>
<item> <item>
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tal:block tal:define="global web_site_id python: 'renderjs_runner'"> <tal:block tal:define="global web_site_id python: 'renderjs_oss'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_init_base" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_init_base" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/set_default_available_language"/> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/set_default_available_language"/>
<!-- Logout --> <!-- Logout -->
......
...@@ -29,18 +29,18 @@ import unittest ...@@ -29,18 +29,18 @@ import unittest
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctionalTestCase from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctionalTestCase
class TestSlapOSRenderJSRunnerUIHalStyle(SlapOSTestCaseMixin, ERP5TypeFunctionalTestCase): class TestSlapOSRenderJSOSSUIHalStyle(SlapOSTestCaseMixin, ERP5TypeFunctionalTestCase):
foreground = 0 foreground = 0
run_only = "slapos_renderjs_runner_zuite" run_only = "slapos_renderjs_oss_zuite"
def afterSetUp(self): def afterSetUp(self):
ERP5TypeFunctionalTestCase.afterSetUp(self) ERP5TypeFunctionalTestCase.afterSetUp(self)
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
# Ensuring the default available language is "en" for English UI test # Ensuring the default available language is "en" for English UI test
self.getPortalObject().web_site_module.renderjs_runner.setDefaultAvailableLanguage('en') self.getPortalObject().web_site_module.renderjs_oss.setDefaultAvailableLanguage('en')
self.tic() self.tic()
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestSlapOSRenderJSRunnerUIHalStyle)) suite.addTest(unittest.makeSuite(TestSlapOSRenderJSOSSUIHalStyle))
return suite return suite
...@@ -6,15 +6,9 @@ ...@@ -6,15 +6,9 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>testFunctionalSlapOSRenderJSRunnerUIHalStyle</string> </value> <value> <string>testFunctionalSlapOSRenderJSOSSUIHalStyle</string> </value>
</item> </item>
<item> <item>
<key> <string>default_source_reference</string> </key> <key> <string>default_source_reference</string> </key>
...@@ -30,7 +24,7 @@ ...@@ -30,7 +24,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>test.erp5.testFunctionalSlapOSRenderJSRunnerUIHalStyle</string> </value> <value> <string>test.erp5.testFunctionalSlapOSRenderJSOSSUIHalStyle</string> </value>
</item> </item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
...@@ -61,28 +55,13 @@ ...@@ -61,28 +55,13 @@
<item> <item>
<key> <string>workflow_history</string> </key> <key> <string>workflow_history</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="PersistentMapping" module="Persistence.mapping"/> <global name="PersistentMapping" module="Persistence.mapping"/>
</pickle> </pickle>
...@@ -95,7 +74,7 @@ ...@@ -95,7 +74,7 @@
<item> <item>
<key> <string>component_validation_workflow</string> </key> <key> <string>component_validation_workflow</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -104,7 +83,7 @@ ...@@ -104,7 +83,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle> </pickle>
......
portal_tests/slapos_renderjs_runner_zuite portal_tests/slapos_renderjs_oss_zuite
portal_tests/slapos_renderjs_runner_zuite/** portal_tests/slapos_renderjs_oss_zuite/**
portal_tests/slaposjs_zuite portal_tests/slaposjs_zuite
portal_tests/slaposjs_zuite/** 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_html
......
test.erp5.testFunctionalSlapOSUIHalStyle test.erp5.testFunctionalSlapOSUIHalStyle
test.erp5.testFunctionalSlapOSUIZHHalStyle test.erp5.testFunctionalSlapOSUIZHHalStyle
test.erp5.testFunctionalSlapOSRenderJSRunnerUIHalStyle test.erp5.testFunctionalSlapOSRenderJSOSSUIHalStyle
\ No newline at end of file \ No newline at end of file
...@@ -1074,7 +1074,7 @@ class TestBase_getTicketUrl(TestRSSSyleSkinsMixin): ...@@ -1074,7 +1074,7 @@ class TestBase_getTicketUrl(TestRSSSyleSkinsMixin):
self.assertIn("%s/#/" % self.portal.absolute_url(), self.assertIn("%s/#/" % self.portal.absolute_url(),
ticket.Base_getTicketUrl()) ticket.Base_getTicketUrl())
web_site = self.portal.web_site_module.renderjs_runner web_site = self.portal.web_site_module.renderjs_oss
self.assertIn("%s/#/" % web_site.absolute_url(), self.assertIn("%s/#/" % web_site.absolute_url(),
web_site.support_request_module[ticket.getId()].Base_getTicketUrl()) web_site.support_request_module[ticket.getId()].Base_getTicketUrl())
...@@ -1105,7 +1105,7 @@ class TestSlapOSSaleInvoiceTransaction_getRSSTitleAndDescription(TestRSSSyleSkin ...@@ -1105,7 +1105,7 @@ class TestSlapOSSaleInvoiceTransaction_getRSSTitleAndDescription(TestRSSSyleSkin
invoice.SaleInvoiceTransaction_getRSSDescription()) invoice.SaleInvoiceTransaction_getRSSDescription())
invoice_via_website = \ invoice_via_website = \
self.portal.web_site_module.renderjs_runner.accounting_module[invoice.getId()] self.portal.web_site_module.renderjs_oss.accounting_module[invoice.getId()]
self.assertEqual( self.assertEqual(
invoice_via_website.SaleInvoiceTransaction_getRSSTitle(), invoice_via_website.SaleInvoiceTransaction_getRSSTitle(),
"[RenderJS Runner] %s %s" % (text, invoice.getReference())) "[RenderJS Runner] %s %s" % (text, invoice.getReference()))
......
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