Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Commit

Permalink
Admin can mark an auction as delivered now
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Harris committed Sep 28, 2016
1 parent d094855 commit ce233cc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/auction_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def auction_params
:issue_url,
:notes,
:purchase_card,
:status,
:delivery_status,
:start_price,
:summary,
:title,
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/auctions/_work_in_progress.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= link_to I18n.t('statuses.admin_auction_status_presenter.work_in_progress.actions.mark_delivered'),
auction_path(status.auction, auction: { status: 'pending_acceptance' }),
admin_auction_path(status.auction, auction: { delivery_status: 'pending_acceptance' }),
method: :patch,
class: 'usa-button usa-button-outline action-button' %>
8 changes: 8 additions & 0 deletions features/admin_marks_auction_delivered.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ Feature: Admin marks auction as delivered
When I visit the admin auction page for that auction
Then I should see the work in progress status box for admins
And I should see a button to mark as delivered

Scenario: Admin marks the auction as delivered
Given I am an administrator
And I sign in
And there is an auction with work in progress
When I visit the admin auction page for that auction
And I click the mark as delivered button
Then I should see the admin status for an auction that is pending acceptance
5 changes: 5 additions & 0 deletions features/step_definitions/link_and_button_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
step("I should see a \"#{button}\" button")
end

When(/^I click the mark as delivered button$/) do
button = I18n.t('statuses.admin_auction_status_presenter.work_in_progress.actions.mark_delivered')
step("I click on the \"#{button}\" button")
end

When(/^I click on the add auction link$/) do
add_link = I18n.t('links_and_buttons.auctions.add')
step("I click on the \"#{add_link}\" link")
Expand Down

0 comments on commit ce233cc

Please sign in to comment.