Skip to content

Commit

Permalink
Provide a reminder of the review date on the review date deletion con…
Browse files Browse the repository at this point in the history
…firmation screen
  • Loading branch information
ryanb-gds committed Dec 18, 2024
1 parent ea3c46d commit 690cfb3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/views/admin/review_reminders/confirm_destroy.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<div class="govuk-grid-row">
<section class="govuk-grid-column-two-thirds">
<p class="govuk-body"><span class="govuk-!-font-weight-bold">Review date:</span> <%= @review_reminder.review_at.strftime("%-d %B %Y") %></p>
<%= form_tag admin_document_review_reminder_path(@document, @review_reminder), method: :delete do %>
<p class="govuk-body govuk-!-margin-bottom-7">Are you sure you want to delete this review reminder?</p>

Expand Down
3 changes: 2 additions & 1 deletion features/review_reminder.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ Feature: Review reminders
And The delete review reminder feature flag is "enabled"
And a review reminder exists for "Standard Beard Lengths" with the date "2032-1-1"
When I click the link "Delete review date" on the edition summary page for "Standard Beard Lengths"
And I delete the review date
Then I should see the review date of "1 January 2032" on the deletion confirmation page
When I delete the review date
Then I should not see a review date on the edition summary page
4 changes: 4 additions & 0 deletions features/step_definitions/review_reminder_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
assert_selector ".app-view-summary__section .govuk-summary-list__row:nth-child(5) .govuk-summary-list__value", text: date
end

Then(/^I should see the review date of "([^"]*)" on the deletion confirmation page$/) do |date|
assert_selector ".govuk-body", text: "Review date: #{date}"
end

Then(/^I should not see a review date on the edition summary page$/) do
assert_selector ".app-view-summary__section .govuk-summary-list__row:nth-child(5) .govuk-summary-list__key", text: "Review date"
assert_selector ".app-view-summary__section .govuk-summary-list__row:nth-child(5) .govuk-summary-list__value", text: "Not set"
Expand Down

0 comments on commit 690cfb3

Please sign in to comment.