trabajo-afectivo/test/browser/taskbar_session_test.rb

72 lines
1.5 KiB
Ruby
Raw Normal View History

2013-06-07 22:31:41 +00:00
# encoding: utf-8
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,
)
browser2 = browser_instance
login(
:browser => browser2,
:username => 'agent1@example.com',
:password => 'test',
:url => browser_url,
)
sleep 8
match(
:browser => browser1,
:css => 'body',
:value => 'Reload application',
)
match_not(
:browser => browser2,
:css => 'body',
:value => 'Reload application',
)
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,
:username => 'master@example.com',
:password => 'test',
:url => browser_url,
)
browser2 = browser_instance
login(
:browser => browser2,
:username => 'agent1@example.com',
:password => 'test',
:url => browser_url,
)
sleep 8
match_not(
:browser => browser1,
:css => 'body',
:value => 'Reload application',
)
match_not(
:browser => browser2,
:css => 'body',
:value => 'Reload application',
)
2013-06-07 22:31:41 +00:00
end
2015-02-23 06:56:45 +00:00
end