Better user specs for joining tables

This commit is contained in:
2013-12-09 10:01:06 +01:00
parent afb30556bd
commit 087cfa639d
15 changed files with 159 additions and 16 deletions
@@ -3,7 +3,20 @@ step "the user scans a table QR code" do
page.execute_script "Quser.actions_for_table({table_id: '#{@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}'})"
end
step 'there is a table' do
step 'there is a section'
@table ||= create :table, section: @section, supplier: @supplier
end
step "the other user should see a join table waiting message" do
#waiting_text = I18n.t('') #TODO: make better user client translation system, similar to supplier
waiting_text = page.evaluate_script(%|t('join_request.requestor.waiting_for_confirmation')|)
page.should have_content waiting_text
end