Passing spec for user product information

This commit is contained in:
2014-04-23 17:06:46 +02:00
parent ea498cb9c5
commit 546e4499ea
42 changed files with 190 additions and 482 deletions
@@ -3,10 +3,6 @@ step "there is another table" do
@other_table = create :table, number: 89, section: @section, supplier: @supplier
end
step "the user scans a QR code of another not occupied table" do
page.execute_script "Quser.actions_for_table({table_id: '#{@other_table.id}'})"
end
step "the user should see a popup asking the user if he would like to change table" do
move_table_body = page.evaluate_script "t('move_table.confirmation_body')"
move_table_body.should be_present
@@ -35,6 +31,10 @@ step "there is another table with an active list of another user" do
end
step "the user scans a QR code of another not occupied table" do
page.execute_script "Quser.actions_for_table({table_id: '#{@other_table.id}'})"
end
step "the user scans a QR code of another occupied table" do
# same as not, since this is just a scan action. Whether the table
# is occupied is a responsibility of other steps
@@ -32,3 +32,7 @@ step "the user clicks on the more info button for the product with name :product
product = @product && @product.name == product_name ? @product : Product.find_by_name(product_name)
find(".order-product-#{product.id} .show-product-description").click
end
step "the user page should have product information :product_description" do |product_description|
page.should have_content product_description
end