Skip to content

Commit

Permalink
Merge pull request #1287 from DFE-Digital/fix/152458-sponsored-suppor…
Browse files Browse the repository at this point in the history
…t-grant-task-is-not-completable

(Fix) The Sponsored support grant task is not completable
  • Loading branch information
Laura Porter authored Jan 11, 2024
2 parents 34747e5 + f190ab7 commit feaebc5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix Conversion project incoming sharepoint link edit view to not display
outgoing trust sharepoint link field.
- Fix statistics page to show accurate data for Transfer's `by region` table.
- The Sponsored support grant task in Conversions was not completable - fixed

### Added

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class Conversion::Task::SponsoredSupportGrantTaskForm < BaseOptionalTaskForm
attribute :eligibility, :boolean
attribute :payment_amount, :boolean
attribute :payment_form, :boolean
attribute :send_information, :boolean
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RemoveEligibilityFromSponsoredSupportGrantTask < ActiveRecord::Migration[7.0]
def change
remove_column :conversion_tasks_data, :sponsored_support_grant_eligibility, :boolean
end
end
3 changes: 1 addition & 2 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,25 @@

expect(project.reload.tasks_data.sponsored_support_grant_type).to eq "full_sponsored"
end

scenario "the task can be completed" do
choose "Full sponsored"
page.find_all(".govuk-checkboxes__input").each { |checkbox| checkbox.click }
# uncheck the Not applicable box
page.find(".govuk-checkboxes__label", text: "Not applicable").click
click_on I18n.t("task_list.continue_button.text")

table_row = page.find("li.app-task-list__item", text: I18n.t("conversion.task.sponsored_support_grant.title"))
expect(table_row).to have_content("Completed")
end

scenario "the task can be marked as Not applicable" do
page.find(".govuk-checkboxes__label", text: "Not applicable").click
click_on I18n.t("task_list.continue_button.text")

table_row = page.find("li.app-task-list__item", text: I18n.t("conversion.task.sponsored_support_grant.title"))
expect(table_row).to have_content("Not applicable")
end
end

describe "the confirm all conditions met task" do
Expand Down

0 comments on commit feaebc5

Please sign in to comment.