Skip to content

Commit

Permalink
Add Course start date to qualification summary component
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpattinson committed Sep 25, 2024
1 parent 8fb778a commit 8eee375
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ def itt_rows
}
},
{ key: { text: "Age range" }, value: { text: details.age_range&.description } },
{
key: {
text: "Course start date"
},
value: {
text: details.start_date&.to_date&.to_fs(:long_uk)
}
},
{
key: {
text: "Course end date"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,16 @@
expect(rows[4].text).to include(qualification.details.age_range&.description)
end

it "renders the qualification status" do
expect(rows[5].text).to include(Date.parse(qualification.details.start_date).to_fs(:long_uk))
end

it "renders the qualification course end date" do
expect(rows[5].text).to include(Date.parse(qualification.details.end_date).to_fs(:long_uk))
expect(rows[6].text).to include(Date.parse(qualification.details.end_date).to_fs(:long_uk))
end

it "renders the qualification status" do
expect(rows[6].text).to include(qualification.details.result)
expect(rows[7].text).to include(qualification.details.result)
end

it "omits rows with no value" do
Expand Down

0 comments on commit 8eee375

Please sign in to comment.