diff --git a/script/build/test_slice_tests.sh b/script/build/test_slice_tests.sh index dd79296ab..11e68e141 100755 --- a/script/build/test_slice_tests.sh +++ b/script/build/test_slice_tests.sh @@ -50,7 +50,6 @@ if [ "$LEVEL" == '1' ]; then rm test/browser/first_steps_test.rb rm test/browser/integration_test.rb rm test/browser/keyboard_shortcuts_test.rb - # test/browser/maintenance_app_version_test.rb # test/browser/maintenance_session_message_test.rb # test/browser/manage_test.rb # test/browser/monitoring_test.rb @@ -108,7 +107,6 @@ elif [ "$LEVEL" == '2' ]; then rm test/browser/first_steps_test.rb rm test/browser/integration_test.rb rm test/browser/keyboard_shortcuts_test.rb - rm test/browser/maintenance_app_version_test.rb rm test/browser/maintenance_session_message_test.rb rm test/browser/manage_test.rb rm test/browser/monitoring_test.rb @@ -166,7 +164,6 @@ elif [ "$LEVEL" == '3' ]; then rm test/browser/first_steps_test.rb rm test/browser/integration_test.rb rm test/browser/keyboard_shortcuts_test.rb - rm test/browser/maintenance_app_version_test.rb rm test/browser/maintenance_session_message_test.rb rm test/browser/manage_test.rb rm test/browser/monitoring_test.rb @@ -224,7 +221,6 @@ elif [ "$LEVEL" == '4' ]; then rm test/browser/first_steps_test.rb rm test/browser/integration_test.rb rm test/browser/keyboard_shortcuts_test.rb - rm test/browser/maintenance_app_version_test.rb rm test/browser/maintenance_session_message_test.rb rm test/browser/manage_test.rb rm test/browser/monitoring_test.rb @@ -281,7 +277,6 @@ elif [ "$LEVEL" == '5' ]; then rm test/browser/first_steps_test.rb rm test/browser/integration_test.rb rm test/browser/keyboard_shortcuts_test.rb - rm test/browser/maintenance_app_version_test.rb rm test/browser/maintenance_session_message_test.rb rm test/browser/manage_test.rb rm test/browser/monitoring_test.rb @@ -341,7 +336,6 @@ elif [ "$LEVEL" == '6' ]; then # test/browser/first_steps_test.rb # test/browser/integration_test.rb # test/browser/keyboard_shortcuts_test.rb - rm test/browser/maintenance_app_version_test.rb rm test/browser/maintenance_session_message_test.rb rm test/browser/manage_test.rb rm test/browser/monitoring_test.rb diff --git a/spec/system/maintenance_app_version_spec.rb b/spec/system/maintenance_app_version_spec.rb new file mode 100644 index 000000000..35561f4e0 --- /dev/null +++ b/spec/system/maintenance_app_version_spec.rb @@ -0,0 +1,15 @@ +# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/ + +require 'rails_helper' + +RSpec.describe 'Maintenance App Version', type: :system do + it 'check that new version is present' do + page.execute_script 'App.Event.trigger("maintenance", {type:"app_version", app_version:"1234:false"} )' + + expect(page).to have_no_text('new version') + + page.execute_script 'App.Event.trigger("maintenance", {type:"app_version", app_version:"1234:true"} )' + + expect(page).to have_text('new version') + end +end diff --git a/test/browser/maintenance_app_version_test.rb b/test/browser/maintenance_app_version_test.rb deleted file mode 100644 index d745681b3..000000000 --- a/test/browser/maintenance_app_version_test.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/ - -require 'browser_test_helper' - -class MaintenanceAppVersionTest < TestCase - - def test_app_version - @browser = browser_instance - login( - username: 'admin@example.com', - password: 'test', - url: browser_url, - ) - - sleep 8 - - execute( - js: 'App.Event.trigger("maintenance", {type:"app_version", app_version:"1234:false"} )', - ) - sleep 8 - - match_not( - css: 'body', - value: 'new version', - ) - - execute( - js: 'App.Event.trigger("maintenance", {type:"app_version", app_version:"1235:true"}) ', - ) - sleep 5 - - match( - css: 'body', - value: 'new version', - ) - end - -end