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(
|
2015-04-27 13:42:53 +00:00
|
|
|
browser: browser1,
|
|
|
|
username: 'agent1@example.com',
|
|
|
|
password: 'test',
|
|
|
|
url: browser_url,
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
browser2 = browser_instance
|
|
|
|
login(
|
2015-04-27 13:42:53 +00:00
|
|
|
browser: browser2,
|
|
|
|
username: 'agent1@example.com',
|
|
|
|
password: 'test',
|
|
|
|
url: browser_url,
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
sleep 8
|
|
|
|
|
|
|
|
match(
|
2015-04-27 13:42:53 +00:00
|
|
|
browser: browser1,
|
|
|
|
css: 'body',
|
2015-06-12 06:30:11 +00:00
|
|
|
value: 'Continue session',
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
match_not(
|
2015-04-27 13:42:53 +00:00
|
|
|
browser: browser2,
|
|
|
|
css: 'body',
|
2015-06-12 06:30:11 +00:00
|
|
|
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(
|
2015-04-27 13:42:53 +00:00
|
|
|
browser: browser1,
|
|
|
|
username: 'master@example.com',
|
|
|
|
password: 'test',
|
|
|
|
url: browser_url,
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
browser2 = browser_instance
|
|
|
|
login(
|
2015-04-27 13:42:53 +00:00
|
|
|
browser: browser2,
|
|
|
|
username: 'agent1@example.com',
|
|
|
|
password: 'test',
|
|
|
|
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,
|
|
|
|
css: 'body',
|
2015-06-12 06:30:11 +00:00
|
|
|
value: 'Continue session',
|
2015-02-23 06:56:45 +00:00
|
|
|
)
|
|
|
|
match_not(
|
2015-04-27 13:42:53 +00:00
|
|
|
browser: browser2,
|
|
|
|
css: 'body',
|
2015-06-12 06:30:11 +00:00
|
|
|
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
|