2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2017-09-24 21:51:55 +00:00
|
|
|
require 'browser_test_helper'
|
|
|
|
|
|
|
|
class UserSwitchCache < TestCase
|
|
|
|
def test_re_login
|
|
|
|
|
|
|
|
# login as agent and create one ticket
|
|
|
|
@browser = browser_instance
|
|
|
|
login(
|
|
|
|
username: 'agent1@example.com',
|
|
|
|
password: 'test',
|
2018-12-19 17:31:51 +00:00
|
|
|
url: browser_url,
|
2017-09-24 21:51:55 +00:00
|
|
|
)
|
2021-07-16 13:29:38 +00:00
|
|
|
tasks_close_all
|
2019-06-28 11:38:49 +00:00
|
|
|
ticket_create(
|
2017-09-24 21:51:55 +00:00
|
|
|
data: {
|
|
|
|
customer: 'nico',
|
2018-12-19 17:31:51 +00:00
|
|
|
group: 'Users',
|
|
|
|
title: 'some subject 123äöü - reply test',
|
|
|
|
body: 'some body 123äöü - reply test',
|
2017-09-24 21:51:55 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
|
2021-07-16 13:29:38 +00:00
|
|
|
logout
|
2017-09-24 21:51:55 +00:00
|
|
|
|
|
|
|
# login as customer and verify ticket create screen
|
|
|
|
login(
|
|
|
|
username: 'nicole.braun@zammad.org',
|
|
|
|
password: 'test',
|
2018-12-19 17:31:51 +00:00
|
|
|
url: browser_url,
|
2017-09-24 21:51:55 +00:00
|
|
|
)
|
2018-03-06 05:30:12 +00:00
|
|
|
click(css: 'a[href="#new"]', only_if_exists: true)
|
2017-09-24 21:51:55 +00:00
|
|
|
click(css: 'a[href="#customer_ticket_new"]')
|
|
|
|
sleep 4
|
|
|
|
|
|
|
|
match(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: '#content',
|
|
|
|
value: 'Priority',
|
2017-09-24 21:51:55 +00:00
|
|
|
should_not_match: true,
|
|
|
|
)
|
|
|
|
|
|
|
|
match(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: '#content',
|
|
|
|
value: 'Owner',
|
2017-09-24 21:51:55 +00:00
|
|
|
should_not_match: true,
|
|
|
|
)
|
|
|
|
|
|
|
|
match(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: '#content',
|
2017-09-24 21:51:55 +00:00
|
|
|
value: 'State',
|
|
|
|
)
|
|
|
|
|
2021-07-16 13:29:38 +00:00
|
|
|
logout
|
2017-09-24 21:51:55 +00:00
|
|
|
|
|
|
|
# login again as customer and verify ticket create screen
|
|
|
|
login(
|
|
|
|
username: 'nicole.braun@zammad.org',
|
|
|
|
password: 'test',
|
2018-12-19 17:31:51 +00:00
|
|
|
url: browser_url,
|
2017-09-24 21:51:55 +00:00
|
|
|
)
|
2018-03-06 05:30:12 +00:00
|
|
|
click(css: 'a[href="#new"]', only_if_exists: true)
|
2017-09-24 21:51:55 +00:00
|
|
|
click(css: 'a[href="#customer_ticket_new"]')
|
|
|
|
sleep 4
|
|
|
|
|
|
|
|
match(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: '#content',
|
|
|
|
value: 'Priority',
|
2017-09-24 21:51:55 +00:00
|
|
|
should_not_match: true,
|
|
|
|
)
|
|
|
|
|
|
|
|
match(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: '#content',
|
|
|
|
value: 'Owner',
|
2017-09-24 21:51:55 +00:00
|
|
|
should_not_match: true,
|
|
|
|
)
|
|
|
|
|
|
|
|
match(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: '#content',
|
2017-09-24 21:51:55 +00:00
|
|
|
value: 'State',
|
|
|
|
)
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|