trabajo-afectivo/test/browser/taskbar_session_test.rb

74 lines
1.4 KiB
Ruby
Raw Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
2013-06-07 22:31:41 +00:00
require 'browser_test_helper'
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(
browser: browser1,
username: 'agent1@example.com',
password: 'test',
url: browser_url,
2015-02-23 06:56:45 +00:00
)
browser2 = browser_instance
login(
browser: browser2,
username: 'agent1@example.com',
password: 'test',
url: browser_url,
2015-02-23 06:56:45 +00:00
)
sleep 8
match(
browser: browser1,
css: 'body',
value: 'Continue session',
2015-02-23 06:56:45 +00:00
)
match_not(
browser: browser2,
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(
browser: browser1,
2021-08-17 12:10:02 +00:00
username: 'admin@example.com',
password: 'test',
url: browser_url,
2015-02-23 06:56:45 +00:00
)
browser2 = browser_instance
login(
browser: browser2,
username: 'agent1@example.com',
password: 'test',
url: browser_url,
2015-02-23 06:56:45 +00:00
)
sleep 8
match_not(
browser: browser1,
css: 'body',
value: 'Continue session',
2015-02-23 06:56:45 +00:00
)
match_not(
browser: browser2,
css: 'body',
value: 'Continue session',
2015-02-23 06:56:45 +00:00
)
2013-06-07 22:31:41 +00:00
end
end