VRFS-2001 debug

This commit is contained in:
Anthony Davis 2014-09-11 16:09:36 -05:00
parent 926add8d65
commit 1651f5e2cb
2 changed files with 5 additions and 4 deletions

View File

@ -48,9 +48,10 @@ describe "Deployed site at #{www}", :js => true, :type => :feature, :capybara_fe
end
it "is possible for #{user1} to sign in and not get disconnected within 30 seconds" do
as_monitor(user1) do
puts "[monitor] Waiting a bit for other connections to close..."; sleep 10 # www and the fakeJamClient really don't like going fast here
sign_in_poltergeist(user1)
puts "Waiting for 15 whole seconds before checking websocket connection"; sleep 15 # www and the fakeJamClient really don't like going fast here
repeat_for(30.seconds) do
expect(page).to_not have_selector('.no-websocket-connection') #looks for reconnect dialog every 1 second
end
@ -89,11 +90,11 @@ describe "Deployed site at #{www}", :js => true, :type => :feature, :capybara_fe
find('h1', text: 'conversation with ' + user2.name)
find('.previous-message-text', text: test_message)
find('#text-message-dialog .btn-close-dialog', text: 'CLOSE').trigger(:click)
sign_out_poltergeist
sign_out_poltergeist(validate: true)
end
as_monitor(user2) do
sign_out_poltergeist
sign_out_poltergeist(validate: true)
end
end

View File

@ -53,7 +53,7 @@ def as_monitor(name)
session_name = name.class == JamRuby::User ? name.id : name
Capybara.session_name = mapped_session_name(session_name)
page.driver.headers = { 'User-Agent' => 'monitor' }
puts "\n *** #{name}'s client *** \n"
puts "\n[monitor] #{name}'s client *** \n"
yield
end