Files
mozo-backend/spec/acceptance_steps/global_user_steps.rb
T

43 lines
1.3 KiB
Ruby

step "the user scans a table QR code" do
step 'there is a table'
#page.execute_script "Quser.actions_for_table({table_id: '#{@table.id}'})"
page.execute_script "App.__container__.lookup('route:application').transitionTo('table','#{@table.id}')"
end
step "another user scans the QR code on the table" do
step 'there is another signed in user user'
visit user_root_path
#page.execute_script "Quser.actions_for_table({table_id: '#{@table.id}'})"
page.execute_script "App.__container__.lookup('route:application').transitionTo('table','#{@table.id}')"
end
step "I am on the user homepage" do
step "the user is on the homepage"
end
step "the user is on the homepage" do
visit user_root_path
end
step "the user should be redirected to the user order overview page" do
route_should_be 'user#active_list'
end
step "the user should be redirected to the archived list path" do
route_should_be 'user#history_list'
page.should have_selector ".order-row-#{@order.id}"
end
step 'there is another user' do
@other_user ||= create :user
end
step "the other user clicks the join table button" do
find('.join-table-button').click
end
step "the other user should be redirected to the user menu page" do
Capybara.session_name = :other_user
route_should_be 'user#list_products'
end