Finish join request spec
This commit is contained in:
@@ -28,10 +28,12 @@ Feature: Joining an occupied table
|
|||||||
And the other user should not be added to the active list
|
And the other user should not be added to the active list
|
||||||
And the other user should see a join reject message
|
And the other user should see a join reject message
|
||||||
|
|
||||||
#@javascript
|
@javascript
|
||||||
#Scenario: The other user just wants to see the table menu
|
Scenario: The other user just wants to see the table menu
|
||||||
#Given There is an open supplier with a menu
|
Given There is an open supplier with a menu
|
||||||
#And there is a signed in user with an active order
|
And there is a signed in user with an active order
|
||||||
#And I am on the user homepage
|
And I am on the user homepage
|
||||||
#When another user scans the QR code on the table
|
When another user scans the QR code on the table
|
||||||
#And the other user clicks the show me the menu button
|
And the other user clicks the show me the menu button
|
||||||
|
Then the other user sees the table menu
|
||||||
|
And the other user does not see order buttons
|
||||||
|
|||||||
@@ -20,3 +20,13 @@ step "the other user should see a join table waiting message" do
|
|||||||
waiting_text = page.evaluate_script(%|t('join_request.requestor.waiting_for_confirmation')|)
|
waiting_text = page.evaluate_script(%|t('join_request.requestor.waiting_for_confirmation')|)
|
||||||
page.should have_content waiting_text
|
page.should have_content waiting_text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
step "the other user sees the table menu" do
|
||||||
|
Capybara.session_name = :other_user
|
||||||
|
route_should_be 'user#list_products_for_table'
|
||||||
|
find('.table-number').text.should == @table.number.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
step "the other user does not see order buttons" do
|
||||||
|
page.should_not have_selector '.order-product-button'
|
||||||
|
end
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ step 'there is another signed in user user' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
step "I should be redirected to the user home" do
|
step "I should be redirected to the user home" do
|
||||||
page.current_path.should == user_root_path
|
route_should_be 'user#index'
|
||||||
end
|
end
|
||||||
|
|
||||||
step "the newly created user info should be stored in the local storage" do
|
step "the newly created user info should be stored in the local storage" do
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ step "the original user rejects the other user's join request" do
|
|||||||
find('.reject-join-request-button').click
|
find('.reject-join-request-button').click
|
||||||
end
|
end
|
||||||
|
|
||||||
|
step "the other user clicks the show me the menu button" do
|
||||||
|
find('.show-menu-button').click
|
||||||
|
end
|
||||||
|
|
||||||
step "the other user should see a join reject message" do
|
step "the other user should see a join reject message" do
|
||||||
Capybara.session_name = :other_user
|
Capybara.session_name = :other_user
|
||||||
reject_text = I18n.t('messages.join_request_rejected')
|
reject_text = I18n.t('messages.join_request_rejected')
|
||||||
|
|||||||
Reference in New Issue
Block a user