Commit 7bd4fc4b authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Update test after deploy skins were included on master

parent 71fe3317
...@@ -33,6 +33,10 @@ import difflib ...@@ -33,6 +33,10 @@ import difflib
class TestSlaposSkinSelection(SlapOSTestCaseMixin): class TestSlaposSkinSelection(SlapOSTestCaseMixin):
run_all_test = 1 run_all_test = 1
# Ignore these bt5 as they might be present on development instances
# but not present on the test.
ignore_list = ["slapos_ui_test"]
def getTitle(self): def getTitle(self):
return "Slapos Skin Selection" return "Slapos Skin Selection"
...@@ -54,6 +58,7 @@ class TestSlaposSkinSelection(SlapOSTestCaseMixin): ...@@ -54,6 +58,7 @@ class TestSlaposSkinSelection(SlapOSTestCaseMixin):
self.assertSameSet( self.assertSameSet(
[x[0] for x in portal.portal_skins.getSkinPaths()], [x[0] for x in portal.portal_skins.getSkinPaths()],
[ [
'Deploy',
'Download', 'Download',
'Hal', 'Hal',
'HalRestricted', 'HalRestricted',
...@@ -79,8 +84,10 @@ class TestSlaposSkinSelection(SlapOSTestCaseMixin): ...@@ -79,8 +84,10 @@ class TestSlaposSkinSelection(SlapOSTestCaseMixin):
self.portal.portal_skins.getSkinPath(skin_name) self.portal.portal_skins.getSkinPath(skin_name)
selection_string_list = selection_string_list.split('\n') selection_string_list = selection_string_list.split('\n')
installed_selection_string_list = \ installed_selection_string_list = \
installed_selection_string_list.split(',') [ i for i in installed_selection_string_list.split(',')
if i not in self.ignore_list]
if selection_string_list != installed_selection_string_list: if selection_string_list != installed_selection_string_list:
message = '\nSkin "%s" is different from production server:\n' % skin_name message = '\nSkin "%s" is different from production server:\n' % skin_name
for line in difflib.unified_diff( for line in difflib.unified_diff(
...@@ -100,6 +107,115 @@ class TestSlaposSkinSelection(SlapOSTestCaseMixin): ...@@ -100,6 +107,115 @@ class TestSlaposSkinSelection(SlapOSTestCaseMixin):
message += '\t + %s\n' % i message += '\t + %s\n' % i
self.fail(message) self.fail(message)
def test_09_Deploy_selection(self, quiet=0, run=run_all_test):
"""
Check the skin folder order
"""
if not run: return
skin_name = 'Deploy'
selection_string_list = \
"""
custom
erp5_font
slapos_deploy_theme
erp5_web_hal_json
erp5_web_renderjs_ui
slapos_ecoallocation
slapos_erp5
slapos_upgrader
slapos_contract
slapos_trial
slapos_crm_monitoring
slapos_accounting
slapos_administration
slapos_cloud
slapos_consumption
slapos_core
slapos_crm
slapos_payzen
slapos_pdm
slapos_simulation
slapos_slap_tool
slapos_configurator
erp5_km
erp5_knowledge_pad
erp5_simulation
erp5_dms_base
erp5_dms_web
erp5_accounting_l10n_fr
erp5_item
erp5_item_trade
erp5_upgrader
erp5_access_tab
erp5_access_token
erp5_accounting
erp5_ace_editor
erp5_administration
erp5_auto_logout
erp5_base
erp5_bearer_token
erp5_ckeditor
erp5_code_mirror
erp5_commerce
erp5_commerce_widget_library
erp5_computer_immobilisation
erp5_configurator
erp5_configurator_wizard
erp5_content_translation
erp5_core
erp5_core_proxy_field_legacy
erp5_credential
erp5_credential_oauth2
erp5_crm
erp5_data_set
erp5_dhtml_style
erp5_dms
erp5_fckeditor
erp5_forge
erp5_forge_release
erp5_gadget
erp5_glossary
erp5_ingestion
erp5_ingestion_test
erp5_integration
erp5_invoicing
erp5_jquery_sheet_editor
erp5_oauth
erp5_oauth_facebook_login
erp5_oauth_google_login
erp5_ods_core
erp5_odt_core
erp5_ooo_import
erp5_open_trade
erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
erp5_svg_editor
erp5_system_event
erp5_toolbox
erp5_trade
erp5_ui_test_core
erp5_vcs
erp5_web
erp5_web_crm
erp5_web_minimal_theme
erp5_web_renderjs
erp5_web_service
erp5_web_widget_library
erp5_workflow
external_method
Images
activity
"""
self.assertSameSkinSelection(skin_name, selection_string_list)
def test_08_View_selection(self, quiet=0, run=run_all_test): def test_08_View_selection(self, quiet=0, run=run_all_test):
""" """
Check the skin folder order Check the skin folder order
......
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