2013-02-21 21:56:32 +00:00
|
|
|
# encoding: utf-8
|
|
|
|
require 'browser_test_helper'
|
|
|
|
|
2016-09-05 13:18:22 +00:00
|
|
|
class PreferencesLanguageTest < TestCase
|
2016-02-16 19:34:37 +00:00
|
|
|
|
2016-07-28 10:09:32 +00:00
|
|
|
def test_lang_change
|
2015-02-22 22:20:05 +00:00
|
|
|
@browser = browser_instance
|
|
|
|
login(
|
2015-04-27 13:42:53 +00:00
|
|
|
username: 'master@example.com',
|
|
|
|
password: 'test',
|
|
|
|
url: browser_url,
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2015-03-02 13:39:27 +00:00
|
|
|
tasks_close_all()
|
|
|
|
|
|
|
|
# start ticket create
|
|
|
|
ticket_create(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
customer: 'nicole',
|
|
|
|
group: 'Users',
|
|
|
|
title: 'preferences lang check #1',
|
|
|
|
body: 'preferences lang check #1',
|
2015-03-02 13:39:27 +00:00
|
|
|
},
|
2015-04-27 13:42:53 +00:00
|
|
|
do_not_submit: true,
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# start ticket zoom
|
2015-04-27 19:56:07 +00:00
|
|
|
ticket_create(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
customer: 'nicole',
|
|
|
|
group: 'Users',
|
|
|
|
title: 'preferences lang check #2',
|
|
|
|
body: 'preferences lang check #2',
|
2015-03-02 13:39:27 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
# start user profile
|
|
|
|
user_open_by_search(
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'Nicole',
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# start organization profile
|
|
|
|
organization_open_by_search(
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'Zammad Foundation',
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: 'a[href="#current_user"]')
|
|
|
|
click(css: 'a[href="#profile"]')
|
|
|
|
click(css: 'a[href="#profile/language"]')
|
2015-02-22 22:20:05 +00:00
|
|
|
select(
|
2016-02-09 20:02:57 +00:00
|
|
|
css: '.language_item [name="locale"]',
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'Deutsch',
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: '.content button[type="submit"]')
|
2015-02-22 22:20:05 +00:00
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: 'body',
|
|
|
|
value: 'Sprache',
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2015-03-02 13:39:27 +00:00
|
|
|
|
|
|
|
# check language in navbar
|
|
|
|
watch_for(
|
2015-10-07 12:40:03 +00:00
|
|
|
css: '.js-menu',
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'Übersicht'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in dashboard
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: '.js-menu a[href="#dashboard"]')
|
2015-03-02 13:39:27 +00:00
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
2015-06-23 17:50:11 +00:00
|
|
|
value: 'Meine Statistik'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in overview
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: '.js-menu a[href="#ticket/view"]')
|
2015-03-02 13:39:27 +00:00
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'Meine'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
verify_title(
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'Meine zugewiesenen',
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in ticket create
|
2015-03-08 21:34:14 +00:00
|
|
|
open_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'Anruf',
|
2015-03-08 21:34:14 +00:00
|
|
|
}
|
|
|
|
)
|
2015-03-02 13:39:27 +00:00
|
|
|
verify_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'Anruf',
|
2015-03-02 13:39:27 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
open_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'preferences lang check #1',
|
2015-03-02 13:39:27 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'kunde'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'priorität'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active [data-name="body"]',
|
|
|
|
value: 'preferences lang check #1'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
verify_title(
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'anruf',
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in ticket zoom
|
2015-03-08 21:34:14 +00:00
|
|
|
open_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'preferences lang check #2',
|
2015-03-08 21:34:14 +00:00
|
|
|
}
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'erstellt'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'priorität'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in user profile
|
|
|
|
open_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'Nicole',
|
2015-03-02 13:39:27 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'notiz'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'e-mail'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'aktion'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in organization profile
|
|
|
|
open_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'Zammad',
|
2015-03-02 13:39:27 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'notiz'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: 'a[href="#current_user"]')
|
|
|
|
click(css: 'a[href="#profile"]')
|
|
|
|
click(css: 'a[href="#profile/language"]')
|
2015-02-22 22:20:05 +00:00
|
|
|
select(
|
2016-02-09 20:02:57 +00:00
|
|
|
css: '.language_item [name="locale"]',
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'English (United States)',
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: '.content button[type="submit"]')
|
2015-02-28 10:40:23 +00:00
|
|
|
sleep 2
|
2015-02-22 22:20:05 +00:00
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: 'body',
|
|
|
|
value: 'Language',
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2015-03-02 13:39:27 +00:00
|
|
|
|
|
|
|
# check language in navbar
|
|
|
|
watch_for(
|
2015-10-07 12:40:03 +00:00
|
|
|
css: '.js-menu',
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'Overview'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in dashboard
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: '.js-menu a[href="#dashboard"]')
|
2015-03-02 13:39:27 +00:00
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
2015-06-23 17:50:11 +00:00
|
|
|
value: 'My Stats'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in overview
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: '.js-menu a[href="#ticket/view"]')
|
2015-03-02 13:39:27 +00:00
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'My'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
verify_title(
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'My assig',
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in ticket create
|
2015-03-08 21:34:14 +00:00
|
|
|
open_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'Call',
|
2015-03-08 21:34:14 +00:00
|
|
|
}
|
|
|
|
)
|
2015-03-02 13:39:27 +00:00
|
|
|
verify_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'Call',
|
2015-03-02 13:39:27 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
open_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'preferences lang check #1',
|
2015-03-02 13:39:27 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'customer'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'priority'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active [data-name="body"]',
|
|
|
|
value: 'preferences lang check #1'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
verify_title(
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'call',
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in ticket zoom
|
2015-03-08 21:34:14 +00:00
|
|
|
open_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'preferences lang check #2',
|
2015-03-08 21:34:14 +00:00
|
|
|
}
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'create'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'priority'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in user profile
|
|
|
|
open_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'Nicole',
|
2015-03-02 13:39:27 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'note'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'email'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in organization profile
|
|
|
|
open_task(
|
2015-04-27 13:42:53 +00:00
|
|
|
data: {
|
|
|
|
title: 'Zammad',
|
2015-03-02 13:39:27 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'note'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'action'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# switch to de again
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: 'a[href="#current_user"]')
|
|
|
|
click(css: 'a[href="#profile"]')
|
|
|
|
click(css: 'a[href="#profile/language"]')
|
2015-11-30 12:13:27 +00:00
|
|
|
sleep 4
|
2015-02-22 22:20:05 +00:00
|
|
|
select(
|
2016-02-09 20:02:57 +00:00
|
|
|
css: '.language_item [name="locale"]',
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'Deutsch',
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: '.content button[type="submit"]')
|
2015-03-21 14:55:50 +00:00
|
|
|
sleep 4
|
2015-02-22 22:20:05 +00:00
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: 'body',
|
|
|
|
value: 'Sprache',
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2015-11-30 12:13:27 +00:00
|
|
|
sleep 6
|
2015-03-02 13:39:27 +00:00
|
|
|
|
|
|
|
# check if language is still used after reload
|
2015-02-22 22:20:05 +00:00
|
|
|
reload()
|
2015-11-30 12:13:27 +00:00
|
|
|
sleep 2
|
2015-03-05 10:40:36 +00:00
|
|
|
|
2015-02-22 22:20:05 +00:00
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: 'body',
|
|
|
|
value: 'Sprache',
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2015-03-02 13:39:27 +00:00
|
|
|
|
|
|
|
# check language in navbar
|
|
|
|
watch_for(
|
2015-10-07 12:40:03 +00:00
|
|
|
css: '.js-menu',
|
2015-04-27 13:42:53 +00:00
|
|
|
value: 'Übersicht'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in dashboard
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: '.js-menu a[href="#dashboard"]')
|
2015-03-02 13:39:27 +00:00
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
2015-06-23 17:50:11 +00:00
|
|
|
value: 'Meine Statistik'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# check language in overview
|
2016-02-25 20:42:33 +00:00
|
|
|
click(css: '.js-menu a[href="#ticket/view"]')
|
2015-03-02 13:39:27 +00:00
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.content.active',
|
|
|
|
value: 'Meine'
|
2015-03-02 13:39:27 +00:00
|
|
|
)
|
2016-07-28 11:00:35 +00:00
|
|
|
|
|
|
|
# switch to en again
|
|
|
|
click(css: 'a[href="#current_user"]')
|
|
|
|
click(css: 'a[href="#profile"]')
|
|
|
|
click(css: 'a[href="#profile/language"]')
|
|
|
|
select(
|
|
|
|
css: '.language_item [name="locale"]',
|
|
|
|
value: 'English (United States)',
|
|
|
|
)
|
|
|
|
click(css: '.content button[type="submit"]')
|
|
|
|
sleep 2
|
|
|
|
watch_for(
|
|
|
|
css: 'body',
|
|
|
|
value: 'Language',
|
|
|
|
)
|
|
|
|
|
2013-02-21 21:56:32 +00:00
|
|
|
end
|
2016-07-28 10:09:32 +00:00
|
|
|
|
2015-04-27 14:15:29 +00:00
|
|
|
end
|