Renaming and split of test files.

This commit is contained in:
Martin Edenhofer 2016-09-05 15:18:22 +02:00
parent c8a475f356
commit 703ccd150f
24 changed files with 951 additions and 870 deletions

View file

@ -18,18 +18,21 @@ if [ "$LEVEL" == '1' ]; then
rm test/browser/admin_object_manager_test.rb
rm test/browser/admin_overview_test.rb
# test/browser/agent_navigation_and_title_test.rb
rm test/browser/agent_ticket_actions_level0_test.rb
rm test/browser/agent_ticket_actions_level1_test.rb
rm test/browser/agent_ticket_actions_level2_test.rb
rm test/browser/agent_ticket_actions_level3_test.rb
rm test/browser/agent_ticket_actions_level4_test.rb
rm test/browser/agent_ticket_actions_level5_test.rb
rm test/browser/agent_ticket_actions_level6_test.rb
rm test/browser/agent_ticket_actions_level7_test.rb
rm test/browser/agent_ticket_actions_level8_test.rb
rm test/browser/agent_ticket_actions_level9_test.rb
rm test/browser/agent_ticket_attachment_test.rb
rm test/browser/agent_ticket_email_reply_keep_body_test.rb
rm test/browser/agent_ticket_email_signature_test.rb
rm test/browser/agent_ticket_link_test.rb
rm test/browser/agent_ticket_macro_test.rb
rm test/browser/agent_ticket_merge_test.rb
rm test/browser/agent_ticket_online_notification_test.rb
rm test/browser/agent_ticket_overview_level0_test.rb
rm test/browser/agent_ticket_overview_level1_test.rb
rm test/browser/agent_ticket_tag_test.rb
rm test/browser/agent_ticket_text_module_test.rb
rm test/browser/agent_ticket_update1_test.rb
rm test/browser/agent_ticket_update2_test.rb
rm test/browser/agent_ticket_update3_test.rb
rm test/browser/agent_ticket_update_and_reload_test.rb
rm test/browser/agent_user_manage_test.rb
rm test/browser/agent_user_profile_test.rb
# test/browser/auth_test.rb
@ -39,8 +42,13 @@ if [ "$LEVEL" == '1' ]; then
# test/browser/form_test.rb
rm test/browser/integration_test.rb
rm test/browser/keyboard_shortcuts_test.rb
# test/browser/maintenance_test.rb
rm test/browser/preferences_test.rb
# test/browser/maintenance_app_version_test.rb
# test/browser/maintenance_login_message_test.rb
# test/browser/maintenance_mode_test.rb
# test/browser/maintenance_session_message_test.rb
rm test/browser/preferences_language_test.rb
rm test/browser/preferences_permission_check_test.rb
rm test/browser/preferences_token_access_test.rb
rm test/browser/setting_test.rb
# test/browser/signup_password_change_and_reset_test.rb
# test/browser/swich_to_user_test.rb
@ -62,18 +70,21 @@ elif [ "$LEVEL" == '2' ]; then
rm test/browser/admin_overview_test.rb
rm test/browser/agent_navigation_and_title_test.rb
rm test/browser/agent_organization_profile_test.rb
# test/browser/agent_ticket_actions_level0_test.rb
# test/browser/agent_ticket_actions_level1_test.rb
# test/browser/agent_ticket_actions_level2_test.rb
# test/browser/agent_ticket_actions_level3_test.rb
# test/browser/agent_ticket_actions_level4_test.rb
rm test/browser/agent_ticket_actions_level5_test.rb
rm test/browser/agent_ticket_actions_level6_test.rb
rm test/browser/agent_ticket_actions_level7_test.rb
rm test/browser/agent_ticket_actions_level8_test.rb
rm test/browser/agent_ticket_actions_level9_test.rb
rm test/browser/agent_ticket_attachment_test.rb
rm test/browser/agent_ticket_email_reply_keep_body_test.rb
rm test/browser/agent_ticket_email_signature_test.rb
rm test/browser/agent_ticket_link_test.rb
rm test/browser/agent_ticket_macro_test.rb
# test/browser/agent_ticket_merge_test.rb
rm test/browser/agent_ticket_online_notification_test.rb
rm test/browser/agent_ticket_overview_level0_test.rb
rm test/browser/agent_ticket_overview_level1_test.rb
rm test/browser/agent_ticket_tag_test.rb
# test/browser/agent_ticket_text_module_test.rb
# test/browser/agent_ticket_update1_test.rb
# test/browser/agent_ticket_update2_test.rb
# test/browser/agent_ticket_update3_test.rb
# test/browser/agent_ticket_update_and_reload_test.rb
rm test/browser/agent_user_manage_test.rb
rm test/browser/agent_user_profile_test.rb
rm test/browser/auth_test.rb
@ -83,9 +94,14 @@ elif [ "$LEVEL" == '2' ]; then
rm test/browser/form_test.rb
rm test/browser/integration_test.rb
rm test/browser/keyboard_shortcuts_test.rb
rm test/browser/maintenance_test.rb
rm test/browser/maintenance_app_version_test.rb
rm test/browser/maintenance_login_message_test.rb
rm test/browser/maintenance_mode_test.rb
rm test/browser/maintenance_session_message_test.rb
rm test/browser/manage_test.rb
rm test/browser/preferences_test.rb
rm test/browser/preferences_language_test.rb
rm test/browser/preferences_permission_check_test.rb
rm test/browser/preferences_token_access_test.rb
rm test/browser/setting_test.rb
rm test/browser/signup_password_change_and_reset_test.rb
rm test/browser/switch_to_user_test.rb
@ -107,18 +123,21 @@ elif [ "$LEVEL" == '3' ]; then
rm test/browser/admin_overview_test.rb
rm test/browser/agent_navigation_and_title_test.rb
rm test/browser/agent_organization_profile_test.rb
rm test/browser/agent_ticket_actions_level0_test.rb
rm test/browser/agent_ticket_actions_level1_test.rb
rm test/browser/agent_ticket_actions_level2_test.rb
rm test/browser/agent_ticket_actions_level3_test.rb
rm test/browser/agent_ticket_actions_level4_test.rb
# test/browser/agent_ticket_actions_level5_test.rb
# test/browser/agent_ticket_actions_level6_test.rb
# test/browser/agent_ticket_actions_level7_test.rb
# test/browser/agent_ticket_actions_level8_test.rb
rm test/browser/agent_ticket_actions_level9_test.rb
# test/browser/agent_ticket_attachment_test.rb
# test/browser/agent_ticket_email_reply_keep_body_test.rb
# test/browser/agent_ticket_email_signature_test.rb
# test/browser/agent_ticket_link_test.rb
# test/browser/agent_ticket_macro_test.rb
rm test/browser/agent_ticket_merge_test.rb
rm test/browser/agent_ticket_online_notification_test.rb
rm test/browser/agent_ticket_overview_level0_test.rb
rm test/browser/agent_ticket_overview_level1_test.rb
# test/browser/agent_ticket_tag_test.rb
rm test/browser/agent_ticket_text_module_test.rb
rm test/browser/agent_ticket_update1_test.rb
rm test/browser/agent_ticket_update2_test.rb
rm test/browser/agent_ticket_update3_test.rb
rm test/browser/agent_ticket_update_and_reload_test.rb
rm test/browser/agent_user_manage_test.rb
rm test/browser/agent_user_profile_test.rb
rm test/browser/auth_test.rb
@ -128,9 +147,14 @@ elif [ "$LEVEL" == '3' ]; then
rm test/browser/form_test.rb
rm test/browser/integration_test.rb
rm test/browser/keyboard_shortcuts_test.rb
rm test/browser/maintenance_test.rb
rm test/browser/maintenance_app_version_test.rb
rm test/browser/maintenance_login_message_test.rb
rm test/browser/maintenance_mode_test.rb
rm test/browser/maintenance_session_message_test.rb
rm test/browser/manage_test.rb
rm test/browser/preferences_test.rb
rm test/browser/preferences_language_test.rb
rm test/browser/preferences_permission_check_test.rb
rm test/browser/preferences_token_access_test.rb
rm test/browser/setting_test.rb
rm test/browser/signup_password_change_and_reset_test.rb
rm test/browser/switch_to_user_test.rb
@ -152,18 +176,21 @@ elif [ "$LEVEL" == '4' ]; then
rm test/browser/admin_overview_test.rb
rm test/browser/agent_navigation_and_title_test.rb
rm test/browser/agent_organization_profile_test.rb
rm test/browser/agent_ticket_actions_level0_test.rb
rm test/browser/agent_ticket_actions_level1_test.rb
rm test/browser/agent_ticket_actions_level2_test.rb
rm test/browser/agent_ticket_actions_level3_test.rb
rm test/browser/agent_ticket_actions_level4_test.rb
rm test/browser/agent_ticket_actions_level5_test.rb
rm test/browser/agent_ticket_actions_level6_test.rb
rm test/browser/agent_ticket_actions_level7_test.rb
rm test/browser/agent_ticket_actions_level8_test.rb
# test/browser/agent_ticket_actions_level9_test.rb
rm test/browser/agent_ticket_attachment_test.rb
rm test/browser/agent_ticket_email_reply_keep_body_test.rb
rm test/browser/agent_ticket_email_signature_test.rb
rm test/browser/agent_ticket_link_test.rb
rm test/browser/agent_ticket_macro_test.rb
rm test/browser/agent_ticket_merge_test.rb
# test/browser/agent_ticket_online_notification_test.rb
# test/browser/agent_ticket_overview_level0_test.rb
# test/browser/agent_ticket_overview_level1_test.rb
rm test/browser/agent_ticket_tag_test.rb
rm test/browser/agent_ticket_text_module_test.rb
rm test/browser/agent_ticket_update1_test.rb
rm test/browser/agent_ticket_update2_test.rb
rm test/browser/agent_ticket_update3_test.rb
rm test/browser/agent_ticket_update_and_reload_test.rb
rm test/browser/agent_user_manage_test.rb
rm test/browser/agent_user_profile_test.rb
rm test/browser/auth_test.rb
@ -173,9 +200,14 @@ elif [ "$LEVEL" == '4' ]; then
rm test/browser/form_test.rb
rm test/browser/integration_test.rb
rm test/browser/keyboard_shortcuts_test.rb
rm test/browser/maintenance_test.rb
rm test/browser/maintenance_app_version_test.rb
rm test/browser/maintenance_login_message_test.rb
rm test/browser/maintenance_mode_test.rb
rm test/browser/maintenance_session_message_test.rb
rm test/browser/manage_test.rb
rm test/browser/preferences_test.rb
rm test/browser/preferences_language_test.rb
rm test/browser/preferences_permission_check_test.rb
rm test/browser/preferences_token_access_test.rb
rm test/browser/setting_test.rb
rm test/browser/signup_password_change_and_reset_test.rb
rm test/browser/switch_to_user_test.rb
@ -196,18 +228,21 @@ elif [ "$LEVEL" == '5' ]; then
# test/browser/admin_overview_test.rb
rm test/browser/agent_navigation_and_title_test.rb
# test/browser/agent_organization_profile_test.rb
rm test/browser/agent_ticket_actions_level0_test.rb
rm test/browser/agent_ticket_actions_level1_test.rb
rm test/browser/agent_ticket_actions_level2_test.rb
rm test/browser/agent_ticket_actions_level3_test.rb
rm test/browser/agent_ticket_actions_level4_test.rb
rm test/browser/agent_ticket_actions_level5_test.rb
rm test/browser/agent_ticket_actions_level6_test.rb
rm test/browser/agent_ticket_actions_level7_test.rb
rm test/browser/agent_ticket_actions_level8_test.rb
rm test/browser/agent_ticket_actions_level9_test.rb
rm test/browser/agent_ticket_attachment_test.rb
rm test/browser/agent_ticket_email_reply_keep_body_test.rb
rm test/browser/agent_ticket_email_signature_test.rb
rm test/browser/agent_ticket_link_test.rb
rm test/browser/agent_ticket_macro_test.rb
rm test/browser/agent_ticket_merge_test.rb
rm test/browser/agent_ticket_online_notification_test.rb
rm test/browser/agent_ticket_overview_level0_test.rb
rm test/browser/agent_ticket_overview_level1_test.rb
rm test/browser/agent_ticket_tag_test.rb
rm test/browser/agent_ticket_text_module_test.rb
rm test/browser/agent_ticket_update1_test.rb
rm test/browser/agent_ticket_update2_test.rb
rm test/browser/agent_ticket_update3_test.rb
rm test/browser/agent_ticket_update_and_reload_test.rb
# test/browser/agent_user_manage_test.rb
# test/browser/agent_user_profile_test.rb
rm test/browser/auth_test.rb
@ -217,9 +252,14 @@ elif [ "$LEVEL" == '5' ]; then
rm test/browser/form_test.rb
rm test/browser/integration_test.rb
rm test/browser/keyboard_shortcuts_test.rb
rm test/browser/maintenance_*.rb
rm test/browser/maintenance_app_version_test.rb
rm test/browser/maintenance_login_message_test.rb
rm test/browser/maintenance_mode_test.rb
rm test/browser/maintenance_session_message_test.rb
rm test/browser/manage_test.rb
rm test/browser/preferences_test.rb
rm test/browser/preferences_language_test.rb
rm test/browser/preferences_permission_check_test.rb
rm test/browser/preferences_token_access_test.rb
rm test/browser/setting_test.rb
rm test/browser/signup_password_change_and_reset_test.rb
rm test/browser/switch_to_user_test.rb
@ -243,18 +283,21 @@ elif [ "$LEVEL" == '6' ]; then
rm test/browser/admin_overview_test.rb
rm test/browser/agent_navigation_and_title_test.rb
rm test/browser/agent_organization_profile_test.rb
rm test/browser/agent_ticket_actions_level0_test.rb
rm test/browser/agent_ticket_actions_level1_test.rb
rm test/browser/agent_ticket_actions_level2_test.rb
rm test/browser/agent_ticket_actions_level3_test.rb
rm test/browser/agent_ticket_actions_level4_test.rb
rm test/browser/agent_ticket_actions_level5_test.rb
rm test/browser/agent_ticket_actions_level6_test.rb
rm test/browser/agent_ticket_actions_level7_test.rb
rm test/browser/agent_ticket_actions_level8_test.rb
rm test/browser/agent_ticket_actions_level9_test.rb
rm test/browser/agent_ticket_attachment_test.rb
rm test/browser/agent_ticket_email_reply_keep_body_test.rb
rm test/browser/agent_ticket_email_signature_test.rb
rm test/browser/agent_ticket_link_test.rb
rm test/browser/agent_ticket_macro_test.rb
rm test/browser/agent_ticket_merge_test.rb
rm test/browser/agent_ticket_online_notification_test.rb
rm test/browser/agent_ticket_overview_level0_test.rb
rm test/browser/agent_ticket_overview_level1_test.rb
rm test/browser/agent_ticket_tag_test.rb
rm test/browser/agent_ticket_text_module_test.rb
rm test/browser/agent_ticket_update1_test.rb
rm test/browser/agent_ticket_update2_test.rb
rm test/browser/agent_ticket_update3_test.rb
rm test/browser/agent_ticket_update_and_reload_test.rb
rm test/browser/agent_user_manage_test.rb
rm test/browser/agent_user_profile_test.rb
rm test/browser/auth_test.rb
@ -264,9 +307,14 @@ elif [ "$LEVEL" == '6' ]; then
rm test/browser/form_test.rb
# test/browser/integration_test.rb
# test/browser/keyboard_shortcuts_test.rb
rm test/browser/maintenance_*.rb
rm test/browser/maintenance_app_version_test.rb
rm test/browser/maintenance_login_message_test.rb
rm test/browser/maintenance_mode_test.rb
rm test/browser/maintenance_session_message_test.rb
rm test/browser/manage_test.rb
# test/browser/preferences_test.rb
# test/browser/preferences_language_test.rb
# test/browser/preferences_permission_check_test.rb
# test/browser/preferences_token_access_test.rb
# test/browser/setting_test.rb
rm test/browser/signup_password_change_and_reset_test.rb
rm test/browser/switch_to_user_test.rb

View file

@ -1,7 +1,7 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketActionLevel6Test < TestCase
class AgentTicketAttachmentTest < TestCase
def test_ticket
@browser = browser_instance

View file

@ -1,7 +1,7 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketActionLevel7Test < TestCase
class AgentTicketEmailReplyKeepBodyTest < TestCase
def test_reply_message_keep_body
# merge ticket with closed tab

View file

@ -1,7 +1,7 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketActionLevel5Test < TestCase
class AgentTicketEmailSignatureTest < TestCase
def test_agent_signature_check
suffix = rand(99_999_999_999_999_999).to_s

View file

@ -0,0 +1,106 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketLinkTest < TestCase
def test_c_link
@browser = browser_instance
login(
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
tasks_close_all()
ticket1 = ticket_create(
data: {
customer: 'nico',
group: 'Users',
title: 'some subject - link#1',
body: 'some body - link#1',
},
)
ticket2 = ticket_create(
data: {
customer: 'nico',
group: 'Users',
title: 'some subject - link#2',
body: 'some body - link#2',
},
)
# verify changes in second browser
browser2 = browser_instance
login(
browser: browser2,
username: 'master@example.com',
password: 'test',
url: browser_url,
)
ticket_open_by_search(
browser: browser2,
number: ticket1[:number],
)
click(
css: '.content.active .links .js-add',
)
sleep 2
set(
css: '.content.active .modal-body [name="ticket_number"]',
value: ticket1[:number],
)
select(
css: '.content.active .modal-body [name="link_type"]',
value: 'Normal',
)
click(
css: '.content.active .modal-footer .js-submit',
)
watch_for(
css: '.content.active .ticketLinks',
value: ticket1[:title],
)
watch_for(
browser: browser2,
css: '.content.active .ticketLinks',
value: ticket2[:title],
)
reload()
watch_for(
css: '.content.active .ticketLinks',
value: ticket1[:title],
)
click(
css: '.content.active .ticketLinks .js-delete'
)
watch_for_disappear(
css: '.content.active .ticketLinks',
value: ticket1[:title],
)
watch_for_disappear(
browser: browser2,
css: '.content.active .ticketLinks',
value: ticket2[:title],
)
reload()
watch_for_disappear(
css: '.content.active .ticketLinks',
value: ticket1[:title],
)
watch_for_disappear(
browser: browser2,
css: '.content.active .ticketLinks',
value: ticket2[:title],
)
end
end

View file

@ -0,0 +1,34 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketMacroTest < TestCase
def test_macro
@browser = browser_instance
login(
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
tasks_close_all()
ticket1 = ticket_create(
data: {
customer: 'nico',
group: 'Users',
title: 'some subject - macro#1',
body: 'some body - macro#1',
},
)
click(css: '.active.content .js-submitDropdown .js-openDropdownMacro')
click(css: '.active.content .js-submitDropdown .js-dropdownActionMacro')
# verify tags
tags_verify(
tags: {
'spam' => true,
'tag1' => false,
}
)
end
end

View file

@ -1,7 +1,7 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketActionLevel1Test < TestCase
class AgentTicketMergeTest < TestCase
def test_agent_ticket_merge_closed_tab
# merge ticket with closed tab

View file

@ -1,7 +1,7 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketActionLevel9Test < TestCase
class AgentTicketOnlineNotificationTest < TestCase
def test_online_notifications

View file

@ -1,9 +1,8 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketActionLevel8Test < TestCase
class AgentTicketTagTest < TestCase
def test_a_tags
@browser = browser_instance
login(
username: 'agent1@example.com',
@ -344,7 +343,6 @@ class AgentTicketActionLevel8Test < TestCase
'TAGXX' => true,
}
)
end
def test_b_tags
@ -511,140 +509,5 @@ class AgentTicketActionLevel8Test < TestCase
css: '#content .js-newTagSetting',
type: 'on',
)
end
def test_c_link
@browser = browser_instance
login(
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
tasks_close_all()
ticket1 = ticket_create(
data: {
customer: 'nico',
group: 'Users',
title: 'some subject - link#1',
body: 'some body - link#1',
},
)
ticket2 = ticket_create(
data: {
customer: 'nico',
group: 'Users',
title: 'some subject - link#2',
body: 'some body - link#2',
},
)
# verify changes in second browser
browser2 = browser_instance
login(
browser: browser2,
username: 'master@example.com',
password: 'test',
url: browser_url,
)
ticket_open_by_search(
browser: browser2,
number: ticket1[:number],
)
click(
css: '.content.active .links .js-add',
)
sleep 2
set(
css: '.content.active .modal-body [name="ticket_number"]',
value: ticket1[:number],
)
select(
css: '.content.active .modal-body [name="link_type"]',
value: 'Normal',
)
click(
css: '.content.active .modal-footer .js-submit',
)
watch_for(
css: '.content.active .ticketLinks',
value: ticket1[:title],
)
watch_for(
browser: browser2,
css: '.content.active .ticketLinks',
value: ticket2[:title],
)
reload()
watch_for(
css: '.content.active .ticketLinks',
value: ticket1[:title],
)
click(
css: '.content.active .ticketLinks .js-delete'
)
watch_for_disappear(
css: '.content.active .ticketLinks',
value: ticket1[:title],
)
watch_for_disappear(
browser: browser2,
css: '.content.active .ticketLinks',
value: ticket2[:title],
)
reload()
watch_for_disappear(
css: '.content.active .ticketLinks',
value: ticket1[:title],
)
watch_for_disappear(
browser: browser2,
css: '.content.active .ticketLinks',
value: ticket2[:title],
)
end
def test_d_macro
@browser = browser_instance
login(
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
tasks_close_all()
ticket1 = ticket_create(
data: {
customer: 'nico',
group: 'Users',
title: 'some subject - macro#1',
body: 'some body - macro#1',
},
)
click(css: '.active.content .js-submitDropdown .js-openDropdownMacro')
click(css: '.active.content .js-submitDropdown .js-dropdownActionMacro')
# verify tags
tags_verify(
tags: {
'spam' => true,
'tag1' => false,
}
)
end
end

View file

@ -1,7 +1,7 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketActionLevel0Test < TestCase
class AgentTicketTextModuleTest < TestCase
def test_text_modules
random = 'text_module_test_' + rand(99_999_999).to_s
random2 = 'text_module_test_' + rand(99_999_999).to_s

View file

@ -0,0 +1,54 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketUpdate1Test < TestCase
def test_check_changes
@browser = browser_instance
login(
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
tasks_close_all()
# confirm on create
ticket_create(
data: {
customer: 'nico',
group: 'Users',
title: 'some changes',
body: 'some body 123äöü - changes',
},
do_not_submit: true,
)
close_task(
data: {
title: 'some changes',
},
discard_changes: true,
)
sleep 1
# confirm on zoom
ticket1 = ticket_create(
data: {
customer: 'nico',
group: 'Users',
title: 'some changes',
body: 'some body 123äöü - changes',
},
)
ticket_update(
data: {
body: 'some note',
},
do_not_submit: true,
)
close_task(
data: {
title: 'some changes',
},
discard_changes: true,
)
end
end

View file

@ -1,60 +1,8 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketActionsLevel3Test < TestCase
def test_check_changes
@browser = browser_instance
login(
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
tasks_close_all()
# confirm on create
ticket_create(
data: {
customer: 'nico',
group: 'Users',
title: 'some changes',
body: 'some body 123äöü - changes',
},
do_not_submit: true,
)
close_task(
data: {
title: 'some changes',
},
discard_changes: true,
)
sleep 1
# confirm on zoom
ticket1 = ticket_create(
data: {
customer: 'nico',
group: 'Users',
title: 'some changes',
body: 'some body 123äöü - changes',
},
)
ticket_update(
data: {
body: 'some note',
},
do_not_submit: true,
)
close_task(
data: {
title: 'some changes',
},
discard_changes: true,
)
end
class AgentTicketUpdate2Test < TestCase
def test_work_with_two_browser_on_same_ticket_edit
browser1 = browser_instance
login(
browser: browser1,

View file

@ -1,11 +1,10 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketActionsLevel2Test < TestCase
class AgentTicketUpdate3Test < TestCase
def test_work_with_two_browser_on_same_ticket
# work on one ticket with two browsers
browser1 = browser_instance
login(
browser: browser1,

View file

@ -1,7 +1,7 @@
# encoding: utf-8
require 'browser_test_helper'
class AgentTicketActionLevel4Test < TestCase
class AgentTicketUpdateAndReloadTest < TestCase
def test_agent_ticket_create_with_reload
@browser = browser_instance

View file

@ -0,0 +1,37 @@
# encoding: utf-8
require 'browser_test_helper'
class MaintenanceAppVersionTest < TestCase
def test_app_version
@browser = browser_instance
login(
username: 'master@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

View file

@ -0,0 +1,70 @@
# encoding: utf-8
require 'browser_test_helper'
class MaintenanceLoginMessageTest < TestCase
def test_login_message
browser1 = browser_instance
login(
browser: browser1,
username: 'master@example.com',
password: 'test',
url: browser_url,
)
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
string = rand(99_999_999_999_999_999).to_s
message = "test <b>#{string}</b>"
set(
browser: browser1,
css: '#content .js-loginPreview [data-name="message"]',
value: message,
)
click(
browser: browser1,
css: '#global-search',
)
browser2 = browser_instance
location(
browser: browser2,
url: browser_url,
)
exists_not(
browser: browser2,
css: '.js-maintenanceLogin',
)
switch(
browser: browser1,
css: '#content .js-loginSetting',
type: 'on',
)
watch_for(
browser: browser2,
css: '.js-maintenanceLogin',
value: message
)
switch(
browser: browser1,
css: '#content .js-loginSetting',
type: 'off',
)
watch_for_disappear(
browser: browser2,
css: '.js-maintenanceLogin',
)
end
end

View file

@ -0,0 +1,161 @@
# encoding: utf-8
require 'browser_test_helper'
class MaintenanceModeTest < TestCase
def test_mode
browser1 = browser_instance
login(
browser: browser1,
username: 'master@example.com',
password: 'test',
url: browser_url,
)
browser2 = browser_instance
location(
browser: browser2,
url: browser_url,
)
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
exists_not(
browser: browser2,
css: '.js-maintenanceMode',
)
switch(
browser: browser1,
css: '#content .js-modeSetting',
type: 'on',
no_check: true,
)
# check warning
watch_for(
browser: browser1,
css: '#content .modal .modal-header',
value: 'confirm',
)
click(
browser: browser1,
css: '#content .modal .js-submit',
)
watch_for(
browser: browser2,
css: '.js-maintenanceMode',
)
# try to logon with normal agent, should not work
login(
browser: browser2,
username: 'agent1@example.com',
password: 'test',
url: browser_url,
success: false,
)
login(
browser: browser2,
username: 'nicole.braun@zammad.org',
password: 'test',
url: browser_url,
success: false,
)
# logout with admin and logon again
logout(
browser: browser1,
)
sleep 4
login(
browser: browser1,
username: 'master@example.com',
password: 'test',
url: browser_url,
)
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
switch(
browser: browser1,
css: '#content .js-modeSetting',
type: 'off',
)
watch_for_disappear(
browser: browser2,
css: '.js-maintenanceMode',
)
# try to logon with normal agent, should work again
login(
browser: browser2,
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
logout(
browser: browser2,
)
sleep 4
login(
browser: browser2,
username: 'nicole.braun@zammad.org',
password: 'test',
url: browser_url,
)
switch(
browser: browser1,
css: '#content .js-modeSetting',
type: 'on',
no_check: true,
)
# check warning
watch_for(
browser: browser1,
css: '#content .modal .modal-header',
value: 'confirm',
)
click(
browser: browser1,
css: '#content .modal .js-submit',
)
watch_for(
browser: browser2,
css: '#login',
)
watch_for(
browser: browser2,
css: '.js-maintenanceMode',
)
switch(
browser: browser1,
css: '#content .js-modeSetting',
type: 'off',
)
watch_for_disappear(
browser: browser2,
css: '.js-maintenanceMode',
)
end
end

View file

@ -0,0 +1,175 @@
# encoding: utf-8
require 'browser_test_helper'
class MaintenanceSessionMessageTest < TestCase
def test_message
string = rand(99_999_999_999_999_999).to_s
title_html = "test <b>#{string}</b>"
title_text = "test <b>#{string}<\/b>"
message_html = "message <b>1äöüß</b> #{string}\n\n\nhttp://zammad.org"
message_text = "message <b>1äöüß</b> #{string}\n\n\nhttp://zammad.org"
# check #1
browser1 = browser_instance
login(
browser: browser1,
username: 'master@example.com',
password: 'test',
url: browser_url,
)
browser2 = browser_instance
login(
browser: browser2,
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
set(
browser: browser1,
css: '#content .js-Message input[name="head"]',
value: title_html,
)
set(
browser: browser1,
css: '#content .js-Message .js-textarea[data-name="message"]',
value: message_html,
)
click(
browser: browser1,
css: '#content .js-Message button.js-submit',
)
watch_for(
browser: browser2,
css: '.modal',
value: title_text,
)
watch_for(
browser: browser2,
css: '.modal',
value: message_text,
)
match_not(
browser: browser1,
css: 'body',
value: message_text,
)
click(
browser: browser2,
css: 'div.modal-header .js-close',
)
# check #2
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
set(
browser: browser1,
css: '#content .js-Message input[name="head"]',
value: title_html + ' #2',
)
set(
browser: browser1,
css: '#content .js-Message .js-textarea[data-name="message"]',
value: message_html + ' #2',
)
click(
browser: browser1,
css: '#content .js-Message button.js-submit',
)
watch_for(
browser: browser2,
css: '.modal',
value: title_text + ' #2',
)
watch_for(
browser: browser2,
css: '.modal',
value: message_text + ' #2',
)
match_not(
browser: browser1,
css: 'body',
value: message_text,
)
click(
browser: browser2,
css: 'div.modal-header .js-close',
)
# check #3
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
set(
browser: browser1,
css: '#content .js-Message input[name="head"]',
value: title_html + ' #3',
)
set(
browser: browser1,
css: '#content .js-Message .js-textarea[data-name="message"]',
value: message_html + ' #3',
)
click(
browser: browser1,
css: '#content .js-Message input[name="reload"] + .icon-checkbox.icon-unchecked',
)
click(
browser: browser1,
css: '#content .js-Message button.js-submit',
)
watch_for(
browser: browser2,
css: '.modal',
value: title_text + ' #3',
)
watch_for(
browser: browser2,
css: '.modal',
value: message_text + ' #3',
)
watch_for(
browser: browser2,
css: '.modal',
value: 'Continue session',
)
match_not(
browser: browser1,
css: 'body',
value: message_text,
)
end
end

View file

@ -1,426 +0,0 @@
# encoding: utf-8
require 'browser_test_helper'
class MaintenanceTest < TestCase
def test_message
string = rand(99_999_999_999_999_999).to_s
title_html = "test <b>#{string}</b>"
title_text = "test <b>#{string}<\/b>"
message_html = "message <b>1äöüß</b> #{string}\n\n\nhttp://zammad.org"
message_text = "message <b>1äöüß</b> #{string}\n\n\nhttp://zammad.org"
# check #1
browser1 = browser_instance
login(
browser: browser1,
username: 'master@example.com',
password: 'test',
url: browser_url,
)
browser2 = browser_instance
login(
browser: browser2,
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
set(
browser: browser1,
css: '#content .js-Message input[name="head"]',
value: title_html,
)
set(
browser: browser1,
css: '#content .js-Message .js-textarea[data-name="message"]',
value: message_html,
)
click(
browser: browser1,
css: '#content .js-Message button.js-submit',
)
watch_for(
browser: browser2,
css: '.modal',
value: title_text,
)
watch_for(
browser: browser2,
css: '.modal',
value: message_text,
)
match_not(
browser: browser1,
css: 'body',
value: message_text,
)
click(
browser: browser2,
css: 'div.modal-header .js-close',
)
# check #2
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
set(
browser: browser1,
css: '#content .js-Message input[name="head"]',
value: title_html + ' #2',
)
set(
browser: browser1,
css: '#content .js-Message .js-textarea[data-name="message"]',
value: message_html + ' #2',
)
click(
browser: browser1,
css: '#content .js-Message button.js-submit',
)
watch_for(
browser: browser2,
css: '.modal',
value: title_text + ' #2',
)
watch_for(
browser: browser2,
css: '.modal',
value: message_text + ' #2',
)
match_not(
browser: browser1,
css: 'body',
value: message_text,
)
click(
browser: browser2,
css: 'div.modal-header .js-close',
)
# check #3
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
set(
browser: browser1,
css: '#content .js-Message input[name="head"]',
value: title_html + ' #3',
)
set(
browser: browser1,
css: '#content .js-Message .js-textarea[data-name="message"]',
value: message_html + ' #3',
)
click(
browser: browser1,
css: '#content .js-Message input[name="reload"] + .icon-checkbox.icon-unchecked',
)
click(
browser: browser1,
css: '#content .js-Message button.js-submit',
)
watch_for(
browser: browser2,
css: '.modal',
value: title_text + ' #3',
)
watch_for(
browser: browser2,
css: '.modal',
value: message_text + ' #3',
)
watch_for(
browser: browser2,
css: '.modal',
value: 'Continue session',
)
match_not(
browser: browser1,
css: 'body',
value: message_text,
)
end
def test_login_message
browser1 = browser_instance
login(
browser: browser1,
username: 'master@example.com',
password: 'test',
url: browser_url,
)
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
string = rand(99_999_999_999_999_999).to_s
message = "test <b>#{string}</b>"
set(
browser: browser1,
css: '#content .js-loginPreview [data-name="message"]',
value: message,
)
click(
browser: browser1,
css: '#global-search',
)
browser2 = browser_instance
location(
browser: browser2,
url: browser_url,
)
exists_not(
browser: browser2,
css: '.js-maintenanceLogin',
)
switch(
browser: browser1,
css: '#content .js-loginSetting',
type: 'on',
)
watch_for(
browser: browser2,
css: '.js-maintenanceLogin',
value: message
)
switch(
browser: browser1,
css: '#content .js-loginSetting',
type: 'off',
)
watch_for_disappear(
browser: browser2,
css: '.js-maintenanceLogin',
)
end
def test_mode
browser1 = browser_instance
login(
browser: browser1,
username: 'master@example.com',
password: 'test',
url: browser_url,
)
browser2 = browser_instance
location(
browser: browser2,
url: browser_url,
)
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
exists_not(
browser: browser2,
css: '.js-maintenanceMode',
)
switch(
browser: browser1,
css: '#content .js-modeSetting',
type: 'on',
no_check: true,
)
# check warning
watch_for(
browser: browser1,
css: '#content .modal .modal-header',
value: 'confirm',
)
click(
browser: browser1,
css: '#content .modal .js-submit',
)
watch_for(
browser: browser2,
css: '.js-maintenanceMode',
)
# try to logon with normal agent, should not work
login(
browser: browser2,
username: 'agent1@example.com',
password: 'test',
url: browser_url,
success: false,
)
login(
browser: browser2,
username: 'nicole.braun@zammad.org',
password: 'test',
url: browser_url,
success: false,
)
# logout with admin and logon again
logout(
browser: browser1,
)
sleep 4
login(
browser: browser1,
username: 'master@example.com',
password: 'test',
url: browser_url,
)
click(
browser: browser1,
css: 'a[href="#manage"]',
)
click(
browser: browser1,
css: 'a[href="#system/maintenance"]',
)
switch(
browser: browser1,
css: '#content .js-modeSetting',
type: 'off',
)
watch_for_disappear(
browser: browser2,
css: '.js-maintenanceMode',
)
# try to logon with normal agent, should work again
login(
browser: browser2,
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
logout(
browser: browser2,
)
sleep 4
login(
browser: browser2,
username: 'nicole.braun@zammad.org',
password: 'test',
url: browser_url,
)
switch(
browser: browser1,
css: '#content .js-modeSetting',
type: 'on',
no_check: true,
)
# check warning
watch_for(
browser: browser1,
css: '#content .modal .modal-header',
value: 'confirm',
)
click(
browser: browser1,
css: '#content .modal .js-submit',
)
watch_for(
browser: browser2,
css: '#login',
)
watch_for(
browser: browser2,
css: '.js-maintenanceMode',
)
switch(
browser: browser1,
css: '#content .js-modeSetting',
type: 'off',
)
watch_for_disappear(
browser: browser2,
css: '.js-maintenanceMode',
)
end
def test_app_version
@browser = browser_instance
login(
username: 'master@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

View file

@ -3,7 +3,7 @@ require 'browser_test_helper'
class ManageTest < TestCase
def test_user
random = 'manage-test-' + rand(999_999).to_s
random = "manage-test-#{rand(999_999)}"
user_email = random + '@example.com'
# user management
@ -14,37 +14,37 @@ class ManageTest < TestCase
url: browser_url,
)
click( css: 'a[href="#manage"]' )
click( css: 'a[href="#manage/users"]' )
click(css: 'a[href="#manage"]')
click(css: 'a[href="#manage/users"]')
user_create(
data: {
login: 'some login' + random,
firstname: 'Manage Firstname' + random,
lastname: 'Manage Lastname' + random,
login: "some login#{random}",
firstname: "Manage Firstname#{random}",
lastname: "Manage Lastname#{random}",
email: user_email,
password: 'some-pass',
}
)
click( css: '.table-overview tr:last-child td' )
click(css: '.table-overview tr:last-child td')
sleep 2
set(
css: '.modal input[name="lastname"]',
value: '2Manage Lastname' + random,
value: "2Manage Lastname#{random}",
)
click( css: '.modal button.js-submit' )
click(css: '.modal button.js-submit')
watch_for(
css: 'body',
value: '2Manage Lastname' + random,
value: "2Manage Lastname#{random}",
)
# sla
sla_create(
data: {
name: 'some sla' + random,
name: "some sla#{random}",
first_response_time_in_text: '1:01'
}
)
@ -54,52 +54,52 @@ class ManageTest < TestCase
)
sleep 1
click( css: '.content:not(.hide) .action:last-child .js-edit' )
click(css: '.content:not(.hide) .action:last-child .js-edit')
sleep 1
set(
css: '.modal input[name=name]',
value: 'some sla update ' + random,
value: "some sla update #{random}",
)
set(
css: '.modal input[name="first_response_time_in_text"]',
value: '2:01',
)
click( css: '.modal button.js-submit' )
click(css: '.modal button.js-submit')
watch_for(
css: 'body',
value: 'some sla update ' + random,
value: "some sla update #{random}",
)
sleep 4
click( css: '.content:not(.hide) .action:last-child .js-delete' )
click(css: '.content:not(.hide) .action:last-child .js-delete')
sleep 2
click( css: '.modal button.js-submit' )
click(css: '.modal button.js-submit')
sleep 4
match_not(
css: 'body',
value: 'some sla update ' + random,
value: "some sla update #{random}",
)
click( css: 'a[href="#manage"]' )
click( css: 'a[href="#manage/slas"]' )
click(css: 'a[href="#manage"]')
click(css: 'a[href="#manage/slas"]')
sleep 2
match_not(
css: 'body',
value: 'some sla update ' + random,
value: "some sla update #{random}",
)
reload()
sleep 2
click( css: 'a[href="#manage"]' )
click( css: 'a[href="#manage/slas"]' )
click(css: 'a[href="#manage"]')
click(css: 'a[href="#manage/slas"]')
sleep 2
match_not(
css: 'body',
value: 'some sla update ' + random,
value: "some sla update #{random}",
)
end
end

View file

@ -1,69 +1,7 @@
# encoding: utf-8
require 'browser_test_helper'
class PreferencesTest < TestCase
def test_permission_agent
@browser = browser_instance
login(
username: 'master@example.com',
password: 'test',
url: browser_url,
)
click(css: 'a[href="#current_user"]')
click(css: 'a[href="#profile"]')
match(
css: '.content .NavBarProfile',
value: 'Password',
)
match(
css: '.content .NavBarProfile',
value: 'Language',
)
match(
css: '.content .NavBarProfile',
value: 'Notifications',
)
match(
css: '.content .NavBarProfile',
value: 'Calendar',
)
match(
css: '.content .NavBarProfile',
value: 'Token Access',
)
end
def test_permission_customer
@browser = browser_instance
login(
username: 'nicole.braun@zammad.org',
password: 'test',
url: browser_url,
)
click(css: 'a[href="#current_user"]')
click(css: 'a[href="#profile"]')
match(
css: '.content .NavBarProfile',
value: 'Password',
)
match(
css: '.content .NavBarProfile',
value: 'Language',
)
match_not(
css: '.content .NavBarProfile',
value: 'Notifications',
)
match_not(
css: '.content .NavBarProfile',
value: 'Calendar',
)
match_not(
css: '.content .NavBarProfile',
value: 'Token Access',
)
end
class PreferencesLanguageTest < TestCase
def test_lang_change
@browser = browser_instance
@ -395,83 +333,4 @@ class PreferencesTest < TestCase
end
def test_token_access
@browser = browser_instance
login(
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
tasks_close_all()
click(css: 'a[href="#current_user"]')
click(css: 'a[href="#profile"]')
click(css: 'a[href="#profile/token_access"]')
click(css: '#content .js-create')
watch_for(
css: '.modal .modal-title',
value: 'Add a Personal Access Token'
)
set(
css: '#content .modal .js-input',
value: 'Some App#1',
)
set(
css: '#content .modal .js-datepicker',
value: '05/15/2022',
)
sendkey(value: :tab)
click(css: '#content .modal input[value="ticket.agent"] ~ .label-text')
click(css: '#content .modal .js-submit')
watch_for(
css: '.modal .modal-title',
value: 'Your New Personal Access Token'
)
click(css: '.modal .js-submit')
watch_for(
css: '#content .js-tokenList',
value: 'Some App#1'
)
watch_for(
css: '#content .js-tokenList',
value: '05/15/2022'
)
click(css: '#content .js-create')
watch_for(
css: '.modal .modal-title',
value: 'Add a Personal Access Token'
)
set(
css: '#content .modal .js-input',
value: 'Some App#2',
)
click(css: '#content .modal input[value="ticket.agent"] ~ .label-text')
click(css: '#content .modal .js-submit')
watch_for(
css: '.modal .modal-title',
value: 'Your New Personal Access Token'
)
click(css: '.modal .js-submit')
watch_for(
css: '#content .js-tokenList',
value: 'Some App#2'
)
click(css: '#content .js-tokenList a')
watch_for(
css: '#content .modal .modal-header',
value: 'confirm',
)
click(
css: '#content .modal .js-submit',
)
watch_for_disappear(
css: '#content .js-tokenList',
value: 'Some App#2'
)
end
end

View file

@ -0,0 +1,68 @@
# encoding: utf-8
require 'browser_test_helper'
class PreferencesPermissionCheckTest < TestCase
def test_permission_agent
@browser = browser_instance
login(
username: 'master@example.com',
password: 'test',
url: browser_url,
)
click(css: 'a[href="#current_user"]')
click(css: 'a[href="#profile"]')
match(
css: '.content .NavBarProfile',
value: 'Password',
)
match(
css: '.content .NavBarProfile',
value: 'Language',
)
match(
css: '.content .NavBarProfile',
value: 'Notifications',
)
match(
css: '.content .NavBarProfile',
value: 'Calendar',
)
match(
css: '.content .NavBarProfile',
value: 'Token Access',
)
end
def test_permission_customer
@browser = browser_instance
login(
username: 'nicole.braun@zammad.org',
password: 'test',
url: browser_url,
)
click(css: 'a[href="#current_user"]')
click(css: 'a[href="#profile"]')
match(
css: '.content .NavBarProfile',
value: 'Password',
)
match(
css: '.content .NavBarProfile',
value: 'Language',
)
match_not(
css: '.content .NavBarProfile',
value: 'Notifications',
)
match_not(
css: '.content .NavBarProfile',
value: 'Calendar',
)
match_not(
css: '.content .NavBarProfile',
value: 'Token Access',
)
end
end

View file

@ -0,0 +1,85 @@
# encoding: utf-8
require 'browser_test_helper'
class PreferencesTokenAccessTest < TestCase
def test_token_access
@browser = browser_instance
login(
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
tasks_close_all()
click(css: 'a[href="#current_user"]')
click(css: 'a[href="#profile"]')
click(css: 'a[href="#profile/token_access"]')
click(css: '#content .js-create')
watch_for(
css: '.modal .modal-title',
value: 'Add a Personal Access Token'
)
set(
css: '#content .modal .js-input',
value: 'Some App#1',
)
set(
css: '#content .modal .js-datepicker',
value: '05/15/2022',
)
sendkey(value: :tab)
click(css: '#content .modal input[value="ticket.agent"] ~ .label-text')
click(css: '#content .modal .js-submit')
watch_for(
css: '.modal .modal-title',
value: 'Your New Personal Access Token'
)
click(css: '.modal .js-submit')
watch_for(
css: '#content .js-tokenList',
value: 'Some App#1'
)
watch_for(
css: '#content .js-tokenList',
value: '05/15/2022'
)
click(css: '#content .js-create')
watch_for(
css: '.modal .modal-title',
value: 'Add a Personal Access Token'
)
set(
css: '#content .modal .js-input',
value: 'Some App#2',
)
click(css: '#content .modal input[value="ticket.agent"] ~ .label-text')
click(css: '#content .modal .js-submit')
watch_for(
css: '.modal .modal-title',
value: 'Your New Personal Access Token'
)
click(css: '.modal .js-submit')
watch_for(
css: '#content .js-tokenList',
value: 'Some App#2'
)
click(css: '#content .js-tokenList a')
watch_for(
css: '#content .modal .modal-header',
value: 'confirm',
)
click(
css: '#content .modal .js-submit',
)
watch_for_disappear(
css: '#content .js-tokenList',
value: 'Some App#2'
)
end
end

View file

@ -11,8 +11,8 @@ class SwitchToUserTest < TestCase
)
tasks_close_all()
click( css: 'a[href="#manage"]' )
click( css: 'a[href="#manage/users"]' )
click(css: 'a[href="#manage"]')
click(css: 'a[href="#manage/users"]')
set(
css: '#content .js-search',
@ -20,7 +20,7 @@ class SwitchToUserTest < TestCase
)
sleep 3
@browser.mouse.move_to( @browser.find_elements( { css: '#content .table-overview tbody tr:first-child' } )[0] )
@browser.mouse.move_to(@browser.find_elements({ css: '#content .table-overview tbody tr:first-child' } )[0])
sleep 0.5
click(
css: '#content .icon-switchView',
@ -35,12 +35,12 @@ class SwitchToUserTest < TestCase
css: '.switchBackToUser',
value: 'Nicole',
)
login = @browser.find_elements( { css: '.user-menu .user a' } )[0].attribute('title')
login = @browser.find_elements({ css: '.user-menu .user a' })[0].attribute('title')
assert_equal(login, 'nicole.braun@zammad.org')
click( css: '.switchBackToUser .js-close' )
click(css: '.switchBackToUser .js-close')
sleep 5
login = @browser.find_elements( { css: '.user-menu .user a' } )[0].attribute('title')
login = @browser.find_elements({ css: '.user-menu .user a' })[0].attribute('title')
assert_equal(login, 'master@example.com')
end