Commit 59659499 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio_ui_test: Test Access page and service worker on renderjs_runner

parent 625cc164
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Zuite" module="Products.Zelenium.zuite"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>slapos_renderjs_runner_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></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>testSlapOSJSRenderJSRunnerBasicNavigation</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></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>est RenderJS Front Page</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test RenderJS Front Page</td>
</tr>
</thead>
<tbody>
<tal:block tal:define="global web_site_id python: 'renderjs_runner'">
<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"/>
<!-- Logout -->
<tr>
<td>open</td>
<td tal:content="python:'${base_url}/web_site_module/%s/WebSite_logout' % web_site_id">.../WebSite_logout</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b> Login as demo_manager_functional_user</b></td>
</tr>
<tr>
<td>open</td>
<td tal:content="python:'${base_url}/web_site_module/%s/' % web_site_id"></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>__ac_name</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>__ac_name</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>__ac_name</td>
<td>demo_manager_functional_user</td>
</tr>
<tr>
<td>type</td>
<td>__ac_password</td>
<td>czz4yt36mshT*</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td tal:content="python: '//input[@value=\'%s\']' % (here.Base_translateString('Login', lang=lang))"></td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td tal:content="python: '//input[@value=\'%s\']' % (here.Base_translateString('Login', lang=lang))"></td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td tal:content="python: '//input[@value=\'%s\']' % (here.Base_translateString('Login', lang=lang))"></td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_app_loaded" />
<tr>
<td>waitForElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_page_slapos_access.html\')]//h1[contains(text(), \'%s\')]' % here.web_page_module.slapos_admin_front_page.getTitle()"></td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_page_slapos_access.html\')]//h1[contains(text(), \'%s\')]' % here.web_page_module.slapos_admin_front_page.getTitle()"></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_panel.html\')]//a[text()=\'Ticket Activity\']'"></td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_panel.html\')]//a[text()=\'Ticket Activity\']'"></td>
<td></td>
</tr>
</tal:block>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
<?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>testSlapOSRenderJSRunner0ServiceWorker</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></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>Test RenderJS UI</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr>
<td rowspan="1" colspan="3">Test RenderJS UI</td>
</tr>
</thead>
<tbody tal:define="web_site_id python: 'renderjs_runner'">
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/set_default_available_language"/>
<tr>
<td colspan="3"><b tal:content="python: 'Clone web site'"></b></td>
</tr>
<tr>
<td>open</td>
<td
tal:content="python: '${base_url}/web_site_module/renderjs_runner?ignore_layout:int=1&editable_mode:int=1'">
</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>name=Base_createCloneDocument:method</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>name=Base_createCloneDocument:method</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_createCloneDocument:method</td>
<td></td>
</tr>
<tr tal:define="portal_type_translation python: here.Base_translateString('Web Site', lang=lang);
dummy python: context.REQUEST.set('mapping', {'portal_type': portal_type_translation})">
<td>verifyTextPresent</td>
<td tal:content="python: '%s' % (here.Base_translateString('Created Clone ${portal_type}.', mapping=context.REQUEST.get('mapping', {}), lang=lang))"></td>
<td></td>
</tr>
<tr>
<td>storeValue</td>
<td>name=field_my_id</td>
<td>install_url</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/${install_url}/#/?page=test_service_worker</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_app_loaded" />
<tr>
<td>assertTextPresent</td>
<td>Has SW: false</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Has SW: true</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Has SW: true</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
##############################################################################
#
# Copyright (c) 2022 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
import unittest
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctionalTestCase
class TestSlapOSRenderJSRunnerUIHalStyle(SlapOSTestCaseMixin, ERP5TypeFunctionalTestCase):
foreground = 0
run_only = "slapos_renderjs_runner_zuite"
def afterSetUp(self):
ERP5TypeFunctionalTestCase.afterSetUp(self)
SlapOSTestCaseMixin.afterSetUp(self)
# Ensuring the default available language is "en" for English UI test
self.getPortalObject().web_site_module.renderjs_runner.setDefaultAvailableLanguage('en')
self.tic()
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestSlapOSRenderJSRunnerUIHalStyle))
return suite
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testFunctionalSlapOSRenderJSRunnerUIHalStyle</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testFunctionalSlapOSRenderJSRunnerUIHalStyle</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<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>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<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>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal_tests/slapos_renderjs_runner_zuite
portal_tests/slapos_renderjs_runner_zuite/**
portal_tests/slaposjs_zuite
portal_tests/slaposjs_zuite/**
web_page_module/rjs_gadget_slapos_erp5_page_test_service_worker_html
......
test.erp5.testFunctionalSlapOSUIHalStyle
test.erp5.testFunctionalSlapOSUIZHHalStyle
\ No newline at end of file
test.erp5.testFunctionalSlapOSUIZHHalStyle
test.erp5.testFunctionalSlapOSRenderJSRunnerUIHalStyle
\ 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