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
|
|
|
|
2013-06-07 22:31:41 +00:00
|
|
|
require 'browser_test_helper'
|
|
|
|
|
2013-06-08 22:35:18 +00:00
|
|
|
class TaskbarSessionTest < TestCase
|
2013-06-07 22:31:41 +00:00
|
|
|
def test_current_session_a_same_agent
|
2015-02-23 06:56:45 +00:00
|
|
|
|
|
|
|
# check taken over session block screen with same user
|
|
|
|
browser1 = browser_instance
|
|
|
|
login(
|
2018-12-19 17:31:51 +00:00
|
|
|
browser: browser1,
|
2015-04-27 13:42:53 +00:00
|
|
|
username: 'agent1@example.com',
|
|
|
|
password: 'test',
|
2018-12-19 17:31:51 +00:00
|
|
|
url: browser_url,
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
browser2 = browser_instance
|
|
|
|
login(
|
2018-12-19 17:31:51 +00:00
|
|
|
browser: browser2,
|
2015-04-27 13:42:53 +00:00
|
|
|
username: 'agent1@example.com',
|
|
|
|
password: 'test',
|
2018-12-19 17:31:51 +00:00
|
|
|
url: browser_url,
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
sleep 8
|
|
|
|
|
|
|
|
match(
|
2015-04-27 13:42:53 +00:00
|
|
|
browser: browser1,
|
2018-12-19 17:31:51 +00:00
|
|
|
css: 'body',
|
|
|
|
value: 'Continue session',
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
match_not(
|
2015-04-27 13:42:53 +00:00
|
|
|
browser: browser2,
|
2018-12-19 17:31:51 +00:00
|
|
|
css: 'body',
|
|
|
|
value: 'Continue session',
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
|
2013-06-07 22:31:41 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def test_current_session_b_different_agent
|
2015-02-23 06:56:45 +00:00
|
|
|
|
|
|
|
# check taken over session block screen with same user
|
|
|
|
browser1 = browser_instance
|
|
|
|
login(
|
2018-12-19 17:31:51 +00:00
|
|
|
browser: browser1,
|
2021-08-17 12:10:02 +00:00
|
|
|
username: 'admin@example.com',
|
2015-04-27 13:42:53 +00:00
|
|
|
password: 'test',
|
2018-12-19 17:31:51 +00:00
|
|
|
url: browser_url,
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
browser2 = browser_instance
|
|
|
|
login(
|
2018-12-19 17:31:51 +00:00
|
|
|
browser: browser2,
|
2015-04-27 13:42:53 +00:00
|
|
|
username: 'agent1@example.com',
|
|
|
|
password: 'test',
|
2018-12-19 17:31:51 +00:00
|
|
|
url: browser_url,
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
sleep 8
|
|
|
|
|
|
|
|
match_not(
|
2015-04-27 13:42:53 +00:00
|
|
|
browser: browser1,
|
2018-12-19 17:31:51 +00:00
|
|
|
css: 'body',
|
|
|
|
value: 'Continue session',
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
match_not(
|
2015-04-27 13:42:53 +00:00
|
|
|
browser: browser2,
|
2018-12-19 17:31:51 +00:00
|
|
|
css: 'body',
|
|
|
|
value: 'Continue session',
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
2013-06-07 22:31:41 +00:00
|
|
|
end
|
|
|
|
|
2015-04-27 14:15:29 +00:00
|
|
|
end
|