Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/product_drives/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</div>
<!-- /.card-body -->
<div class="card-footer">
<%= f.button :submit, :class => 'diaper-drive-submit btn btn-primary', :id => 'product_drive_submit' %>
<%= f.button :submit, :class => 'diaper-drive-submit btn btn-success', :id => 'product_drive_submit' %>
</div>
</div>
<!-- /.card -->
Expand Down
1 change: 0 additions & 1 deletion config/initializers/simple_form_bootstrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
# Default class for buttons
config.button_class = 'btn btn-default'

# Define the default class of the input wrapper of the boolean input.
config.boolean_label_class = 'form-check-label'
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ en:
issued_at: "Purchase date"
distribution:
issued_at: "Distribution date and time"
models:
product_drive: "Product Drive"
12 changes: 6 additions & 6 deletions spec/system/product_drive_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@
fill_in 'Name', with: 'Normal 1'
fill_in 'Start Date', with: Time.zone.today
fill_in 'End Date', with: Time.zone.today + 4.hours
click_button 'Create Product drive'
click_button 'Create Product Drive'
end.to change(ProductDrive, :count).by(1)
end

it 'must have correct attributes' do
fill_in 'Name', with: 'Normal 1'
fill_in 'Start Date', with: Time.zone.today
fill_in 'End Date', with: Time.zone.today + 1.day
click_button 'Create Product drive'
click_button 'Create Product Drive'

expect(ProductDrive.last).to have_attributes({ name: 'Normal 1', start_date: Time.zone.today, end_date: Time.zone.today + 1.day, virtual: false })
end
Expand All @@ -79,7 +79,7 @@
fill_in 'Name', with: 'Virtual 1'
fill_in 'Start Date', with: Time.zone.today
fill_in 'End Date', with: Time.zone.today + 4.hours
click_button 'Create Product drive'
click_button 'Create Product Drive'

expect(page.find('.alert')).to have_content('added')
end
Expand All @@ -96,7 +96,7 @@
fill_in 'Start Date', with: Time.zone.today
fill_in 'End Date', with: Time.zone.today + 4.hours
check 'virtual'
click_button 'Create Product drive'
click_button 'Create Product Drive'
end.to change(ProductDrive, :count).by(1)
end

Expand All @@ -105,7 +105,7 @@
fill_in 'Start Date', with: Time.zone.today
fill_in 'End Date', with: Time.zone.today + 1.day
check 'virtual'
click_button 'Create Product drive'
click_button 'Create Product Drive'

expect(ProductDrive.last).to have_attributes({ name: 'Virtual 1', start_date: Time.zone.today, end_date: Time.zone.today + 1.day, virtual: true })
end
Expand All @@ -115,7 +115,7 @@
fill_in 'Start Date', with: Time.zone.today
fill_in 'End Date', with: Time.zone.today + 4.hours
check 'virtual'
click_button 'Create Product drive'
click_button 'Create Product Drive'

expect(page.find('.alert')).to have_content('added')
end
Expand Down