Skip to content

Commit

Permalink
Update test to work with design system upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Ana Botto committed Jul 2, 2024
1 parent 57c2253 commit 30caa67
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/integration/homepage_popular_links_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class HomepagePopularLinksTest < JavascriptIntegrationTest
assert page.has_text?("Edition")
assert page.has_text?(@popular_links.version_number)
assert page.has_text?("Status")
assert page.has_text?("PUBLISHED")
assert page.has_text?("Published")
assert page.has_css?(".govuk-tag--green")
end

Expand All @@ -42,7 +42,7 @@ class HomepagePopularLinksTest < JavascriptIntegrationTest
should "render new draft popular links with edit option when 'Create new edition' button is clicked" do
click_button("Create new edition")
within(:css, ".govuk-tag--yellow") do
assert page.has_content?("DRAFT")
assert page.has_content?("Draft")
end
end
end
Expand All @@ -54,7 +54,7 @@ class HomepagePopularLinksTest < JavascriptIntegrationTest
assert page.has_text?("Edition")
assert page.has_text?(@popular_links.version_number)
assert page.has_text?("Status")
assert page.has_text?("DRAFT")
assert page.has_text?("Draft")
assert page.has_css?(".govuk-tag--yellow")
assert page.has_text?("Edit popular links")
end
Expand All @@ -64,15 +64,15 @@ class HomepagePopularLinksTest < JavascriptIntegrationTest
assert row[0].has_text?("Edition")
assert row[0].has_text?("1")
assert row[1].has_text?("Status")
assert row[1].has_text?("PUBLISHED")
assert row[1].has_text?("Published")

click_button("Create new edition")

row = find_all(".govuk-summary-list__row")
assert row[0].has_text?("Edition")
assert row[0].has_text?("2")
assert row[1].has_text?("Status")
assert row[1].has_text?("DRAFT")
assert row[1].has_text?("Draft")
end
end

Expand Down

0 comments on commit 30caa67

Please sign in to comment.