Fix all failing specs
This commit is contained in:
@@ -6,8 +6,8 @@ end
|
||||
step "the supplier fills in the new product category form selecting not available on tuesdays" do
|
||||
# default all days on, so click on tuesday deactivates it
|
||||
within '.modal' do
|
||||
find('.form-row.name input').set 'New product category'
|
||||
find('.form-row.tuesday label').click
|
||||
js_set_field '.form-row.name input', 'New product category'
|
||||
find('.form-row.tuesday .switch').click
|
||||
end
|
||||
end
|
||||
|
||||
@@ -32,9 +32,9 @@ end
|
||||
|
||||
step "the supplier fills in the new product form and submits it" do
|
||||
within ('.menu-product-new') do
|
||||
find('.name input').set "Delicious pie"
|
||||
find('.price input').set "4.75"
|
||||
find('.code input').set "P079"
|
||||
js_set_field '.name input', "Delicious pie"
|
||||
js_set_field '.price input', "4.75"
|
||||
js_set_field '.code input', "P079"
|
||||
find('.save-product-action').click
|
||||
sleep 0.5
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
step "I provide a new supplier email address" do
|
||||
find('.supplier-email').set 'new-supplier-mail@mozo.bar'
|
||||
js_set_field '.supplier-email', 'new-supplier-mail@mozo.bar'
|
||||
end
|
||||
|
||||
step "the supplier submits the supplier settings form" do
|
||||
@@ -28,7 +28,7 @@ step "an email should have been sent to the original supplier email with email c
|
||||
end
|
||||
|
||||
step "the supplier changes the name to :name in the settings page" do |new_name|
|
||||
page.find('input.supplier-name').set new_name
|
||||
js_set_field 'input.supplier-name', new_name
|
||||
end
|
||||
|
||||
step "the supplier clicks on the new email confirmation link" do
|
||||
|
||||
@@ -4,10 +4,10 @@ step "I visit the supplier signup path" do
|
||||
end
|
||||
|
||||
step "fill in the supplier signup form with new credentials" do
|
||||
find('#supplier_name').set 'Signup Supplier'
|
||||
find('#supplier_email').set 'signup_supplier@example.com'
|
||||
find('#supplier_password').set 'SignupSupplier'
|
||||
find('#supplier_password_confirmation').set 'SignupSupplier'
|
||||
js_set_field '#supplier_name', 'Signup Supplier'
|
||||
js_set_field '#supplier_email', 'signup_supplier@example.com'
|
||||
js_set_field '#supplier_password', 'SignupSupplier'
|
||||
js_set_field '#supplier_password_confirmation', 'SignupSupplier'
|
||||
end
|
||||
|
||||
step "click on the supplier signup submit button" do
|
||||
|
||||
@@ -9,7 +9,7 @@ end
|
||||
|
||||
step "the supplier fills in the new table form selecting the first section" do
|
||||
within '.modal' do
|
||||
find('.number input').set '7'
|
||||
js_set_field '.number input', 7
|
||||
find('.section select').find(%|option[value="#{@sections.first.id}"]|).select_option
|
||||
end
|
||||
end
|
||||
@@ -33,7 +33,7 @@ end
|
||||
|
||||
step "the supplier changes the table number to :number and section to the last section" do |number|
|
||||
within '.modal' do
|
||||
find('.number input').set number
|
||||
js_set_field '.number input', number
|
||||
find('.section select').find(%|option[value="#{@sections.last.id}"]|).select_option
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user