Acceptance tests for user

This commit is contained in:
2015-09-17 17:46:33 +02:00
parent 8e931cabd4
commit cb744943bd
35 changed files with 91 additions and 49 deletions
@@ -16,12 +16,16 @@ end
step "another user scans the QR code on the table" do
step 'there is another signed in user user'
visit user_root_path
user_visit '/'
when_ember_is_ready do
page.execute_script "App.__container__.lookup('route:application').transitionTo('table','#{@table.id}')"
page.execute_script "MozoUser.__container__.lookup('route:application').transitionTo('table','#{@table.id}')"
end
end
step "the original user should see the other user added below the active list" do
page.evaluate_script(%|$('.list-user-total-container').length()|).should eq 2
end
step "the original user approves the other user's join request" do
find('.join-request-approve').click
end
@@ -67,5 +71,5 @@ end
step "the other user should be redirected to active list it just joined" do
Capybara.session_name = :other_user
ember_route_should_be '/active_list'
ember_route_should_be '/active-list'
end