Refactoring: Removed old browser tests which are now covered by Capybara.

This commit is contained in:
Thorsten Eckel 2020-09-14 09:08:24 +02:00
parent 6885ae9e6b
commit d41643a568
5 changed files with 7 additions and 392 deletions

View file

@ -10,9 +10,6 @@ if [ "$LEVEL" == '1' ]; then
rm test/browser/aaa_getting_started_test.rb rm test/browser/aaa_getting_started_test.rb
cp contrib/auto_wizard_test.json auto_wizard.json cp contrib/auto_wizard_test.json auto_wizard.json
cp test/integration/aaa_auto_wizard_base_setup_test.rb test/browser/aaa_auto_wizard_base_setup_test.rb cp test/integration/aaa_auto_wizard_base_setup_test.rb test/browser/aaa_auto_wizard_base_setup_test.rb
# test/browser/aab_basic_urls_test.rb
# test/browser/aab_unit_test.rb
# test/browser/aac_basic_richtext_test.rb
rm test/browser/abb_one_group_test.rb rm test/browser/abb_one_group_test.rb
rm test/browser/admin_channel_email_test.rb rm test/browser/admin_channel_email_test.rb
rm test/browser/admin_calendar_sla_test.rb rm test/browser/admin_calendar_sla_test.rb
@ -90,9 +87,6 @@ elif [ "$LEVEL" == '2' ]; then
# only ticket action 2/3 # only ticket action 2/3
# test/browser/aaa_getting_started_test.rb # test/browser/aaa_getting_started_test.rb
rm test/browser/aab_basic_urls_test.rb
rm test/browser/aab_unit_test.rb
rm test/browser/aac_basic_richtext_test.rb
# test/browser/abb_one_group_test.rb # test/browser/abb_one_group_test.rb
rm test/browser/admin_channel_email_test.rb rm test/browser/admin_channel_email_test.rb
rm test/browser/admin_calendar_sla_test.rb rm test/browser/admin_calendar_sla_test.rb
@ -170,9 +164,6 @@ elif [ "$LEVEL" == '3' ]; then
# only ticket action 2/3 # only ticket action 2/3
# test/browser/aaa_getting_started_test.rb # test/browser/aaa_getting_started_test.rb
rm test/browser/aab_basic_urls_test.rb
rm test/browser/aab_unit_test.rb
rm test/browser/aac_basic_richtext_test.rb
# test/browser/abb_one_group_test.rb # test/browser/abb_one_group_test.rb
rm test/browser/admin_channel_email_test.rb rm test/browser/admin_channel_email_test.rb
rm test/browser/admin_calendar_sla_test.rb rm test/browser/admin_calendar_sla_test.rb
@ -250,9 +241,6 @@ elif [ "$LEVEL" == '4' ]; then
# only ticket action 3/3 # only ticket action 3/3
# test/browser/aaa_getting_started_test.rb # test/browser/aaa_getting_started_test.rb
rm test/browser/aab_basic_urls_test.rb
rm test/browser/aab_unit_test.rb
rm test/browser/aac_basic_richtext_test.rb
# test/browser/abb_one_group_test.rb # test/browser/abb_one_group_test.rb
rm test/browser/admin_channel_email_test.rb rm test/browser/admin_channel_email_test.rb
rm test/browser/admin_calendar_sla_test.rb rm test/browser/admin_calendar_sla_test.rb
@ -329,9 +317,6 @@ elif [ "$LEVEL" == '5' ]; then
echo "slicing level 5" echo "slicing level 5"
# only profile action & admin # only profile action & admin
rm test/browser/aab_basic_urls_test.rb
rm test/browser/aab_unit_test.rb
rm test/browser/aac_basic_richtext_test.rb
# test/browser/abb_one_group_test.rb # test/browser/abb_one_group_test.rb
# test/browser/admin_channel_email_test.rb # test/browser/admin_channel_email_test.rb
# test/browser/admin_calendar_sla_test.rb # test/browser/admin_calendar_sla_test.rb
@ -411,9 +396,6 @@ elif [ "$LEVEL" == '6' ]; then
rm test/browser/aaa_getting_started_test.rb rm test/browser/aaa_getting_started_test.rb
cp contrib/auto_wizard_test.json auto_wizard.json cp contrib/auto_wizard_test.json auto_wizard.json
cp test/integration/aaa_auto_wizard_base_setup_test.rb test/browser/aaa_auto_wizard_base_setup_test.rb cp test/integration/aaa_auto_wizard_base_setup_test.rb test/browser/aaa_auto_wizard_base_setup_test.rb
rm test/browser/aab_basic_urls_test.rb
rm test/browser/aab_unit_test.rb
rm test/browser/aac_basic_richtext_test.rb
rm test/browser/abb_one_group_test.rb rm test/browser/abb_one_group_test.rb
rm test/browser/admin_channel_email_test.rb rm test/browser/admin_channel_email_test.rb
rm test/browser/admin_calendar_sla_test.rb rm test/browser/admin_calendar_sla_test.rb

View file

@ -1,55 +0,0 @@
require 'browser_test_helper'
class AABBasicUrlsTest < TestCase
def test_logout
@browser = browser_instance
location(
url: "#{browser_url}/#logout",
)
location_check(
url: "#{browser_url}/#login",
)
end
def test_session
@browser = browser_instance
location(
url: "#{browser_url}/#system/sessions",
)
location_check(
url: "#{browser_url}/#login",
)
end
def test_profile
@browser = browser_instance
location(
url: "#{browser_url}/#profile/linked",
)
location_check(
url: "#{browser_url}/#login",
)
end
def test_ticket
@browser = browser_instance
location(
url: "#{browser_url}/#ticket/zoom/1",
)
location_check(
url: "#{browser_url}/#login",
)
end
def test_not_existing
@browser = browser_instance
location(
url: "#{browser_url}/#not_existing",
)
location_check(
url: "#{browser_url}/#not_existing",
)
end
end

View file

@ -1,252 +0,0 @@
require 'browser_test_helper'
class AAbUnitTest < TestCase
def test_core
@browser = browser_instance
location(url: browser_url + '/tests_core')
sleep 5
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 4,
)
match(
css: '.result .failed',
value: '0',
)
end
def test_ui
@browser = browser_instance
location(url: browser_url + '/tests_session')
sleep 5
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_ui')
sleep 5
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_model')
sleep 5
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 3,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_model_binding')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_model_ui')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_ticket_selector')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
end
def test_form
@browser = browser_instance
location(url: browser_url + '/tests_form')
sleep 5
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 2,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_form_trim')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_form_find')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_form_timer')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_form_extended')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_form_searchable_select')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_form_ticket_perform_action')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_form_tree_select')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_form_column_select')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_form_validation')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
end
def test_table
@browser = browser_instance
location(url: browser_url + '/tests_table')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_table_extended')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_html_utils')
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 8,
)
match(
css: '.result .failed',
value: '0',
)
location(url: browser_url + '/tests_taskbar')
sleep 5
watch_for(
css: '.result',
value: 'Tests completed',
timeout: 3,
)
match(
css: '.result .failed',
value: '0',
)
end
end

View file

@ -1,67 +0,0 @@
require 'browser_test_helper'
class AACBasicRichtextTest < TestCase
def test_richtext
@browser = browser_instance
login(
username: 'master@example.com',
password: 'test',
url: browser_url,
)
click(css: 'a[href="#current_user"]')
click(css: 'a[href="#layout_ref"]')
click(css: 'a[href="#layout_ref/richtext"]')
click(css: 'a[href="#current_user"]')
# richtext single line
set(
css: '#content .text-1',
value: 'some test for browser ',
slow: true,
)
sleep 1
sendkey(value: :enter)
sendkey(value: 'and some other for browser')
sleep 1
match(
css: '#content .text-1',
value: 'some test for browser and some other for browser',
)
# text multi line
set(
css: '#content .text-3',
value: 'some test for browser ',
slow: true,
)
sleep 1
sendkey(value: :enter)
sendkey(value: 'and some other for browser')
sleep 1
match(
css: '#content .text-3',
value: "some test for browser\nand some other for browser",
cleanup: true,
)
# richtext multi line
set(
css: '#content .text-5',
value: 'some test for browser ',
slow: true,
)
sleep 1
sendkey(value: :enter)
sendkey(value: 'and some other for browser2')
sleep 1
match(
css: '#content .text-5',
value: "some test for browser\nand some other for browser2",
cleanup: true,
)
end
end

View file

@ -10,6 +10,13 @@ class AgentNavigationAndTitleTest < TestCase
) )
tasks_close_all() tasks_close_all()
# since we run the basic functionality tests via Capybara the clues are shown
# and skipped after the login. This removes the 'is-active' class from the
# dashboard link causing the following tests to fail. As the browser tests are
# deprecated and there is no easy fix to change that we refresh the page as
# a workaround. This will cause the 'is-active' class to be set on the menu item again
reload()
# dashboard after login # dashboard after login
verify_title(value: 'dashboard') verify_title(value: 'dashboard')
exists(css: '#navigation .js-menu .js-dashboardMenuItem.is-active') exists(css: '#navigation .js-menu .js-dashboardMenuItem.is-active')