VRFS-2001 use separate user for websocket test

This commit is contained in:
Anthony Davis 2014-09-11 17:02:43 -05:00
parent 606c2031fb
commit eabd58add7
1 changed files with 5 additions and 9 deletions

View File

@ -41,18 +41,17 @@ describe "Deployed site at #{www}", :js => true, :type => :feature, :capybara_fe
# use staging accounts
user1 = TestUser.new({ email: 'anthony+jim@jamkazam.com', password: 'j4m!t3st3r', first_name: 'Jim', last_name: 'Smith', id: '43fb60a7-7b6a-4aa6-af3c-59b1e58a842b' })
user2 = TestUser.new({ email: 'anthony+john@jamkazam.com', password: 'j4m!t3st3r', first_name: 'John', last_name: 'Jones', id: '54c5d5c1-aa44-4db8-9bac-922ead64162e' })
user3 = TestUser.new({ email: 'anthony+jesse@jamkazam.com', password: 'j4m!t3st3r', first_name: 'Jesse', last_name: 'Smith', id: '8208b467-ef59-4601-a4e1-1198180ffe82' })
else
# use production accounts
user1 = TestUser.new({ email: 'anthony+jim@jamkazam.com', password: 'j4m!t3st3r', first_name: 'Jim', last_name: 'Smith', id: '68e8eea2-140d-44c1-b711-10d07ce70f96' })
user2 = TestUser.new({ email: 'anthony+john@jamkazam.com', password: 'j4m!t3st3r', first_name: 'John', last_name: 'Jones', id: '5bbcf689-2f73-452d-815a-c4f44e9e7f3e' })
user3 = TestUser.new({ email: 'anthony+jesse@jamkazam.com', password: 'j4m!t3st3r', first_name: 'Jesse', last_name: 'Smith', id: 'e8342f87-04ac-432f-8af4-abf485fddb9e' })
end
it "is possible for #{user1} to sign in and not get disconnected within 30 seconds" do
as_monitor(user1) do
sign_in_poltergeist(user1)
puts "[monitor] Waiting a bit after sign-in..."
sleep 10 # www and the fakeJamClient really don't like going too fast here
it "is possible for #{user3} to sign in and not get disconnected within 30 seconds" do
as_monitor(user3) do
sign_in_poltergeist(user3)
repeat_for(30.seconds) do
expect(page).to_not have_selector('.no-websocket-connection') #looks for reconnect dialog every 1 second
end
@ -97,9 +96,6 @@ describe "Deployed site at #{www}", :js => true, :type => :feature, :capybara_fe
as_monitor(user2) do
sign_out_poltergeist(validate: true)
end
puts "[monitor] Waiting a bit to clean up connections..."
sleep 11 #to clean up user sessions on server
end
let(:queue_limit) { 5 }