Skip to content

Commit

Permalink
Remove unused tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtrussler committed Sep 9, 2024
1 parent 2bf3886 commit 0e1c898
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions test/integration/root_overview_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,11 @@ class RootOverviewTest < IntegrationTest
assert page.has_content?("YYY")
assert page.has_content?("ZZZ")

# TODO: Do we want to keep Nobody as an option in the new design?
# filter_by_user("Nobody")

# assert page.has_no_content?("XXX")
# assert page.has_no_content?("YYY")
# assert page.has_content?("ZZZ")

filter_by_user("Charlie")

assert page.has_no_content?("XXX")
assert page.has_content?("YYY")
assert page.has_no_content?("ZZZ")

# TODO: This is functionality still to be added
# visit "/"

# Should remember last selection in session
# assert_equal charlie.uid, page.find_field("Assigned to").value

# click_on "Drafts"
# assert page.has_no_content?("XXX")
# assert page.has_content?("YYY")
# assert page.has_no_content?("ZZZ")
end

should "filter by title content" do
Expand Down Expand Up @@ -141,8 +123,6 @@ class RootOverviewTest < IntegrationTest
assert page.has_no_xpath?(select_box.path + "/option[text() = '#{disabled_user.name}']")
end

# TODO: we now default ordering to most recent first, was oldest - is this correct?
# TODO: we no longer allow columns to be resorted - is this correct?
should "display publications in review correctly ordered" do
FactoryBot.create(:user, :govuk_editor)
FactoryBot.create(
Expand Down Expand Up @@ -179,25 +159,8 @@ class RootOverviewTest < IntegrationTest

find(".publications-table tr:nth-child(3) details").click
assert page.has_css?(".publications-table tr:nth-child(3) details .govuk-summary-list__row:nth-child(3) .govuk-summary-list__value", text: "4 days")

# click_on "Awaiting review"

# assert page.has_css?("#publication-list-container table tbody tr:first-child td:nth-child(5)", text: "20 minutes")
# assert page.has_css?("#publication-list-container table tbody tr:nth-child(2) td:nth-child(5)", text: "2 days")
# assert page.has_css?("#publication-list-container table tbody tr:nth-child(3) td:nth-child(5)", text: "4 days")
end

# TODO: This link is no longer displayed - is that correct?
# should "Show link to Collections Publisher when reviewing in review documents" do
# FactoryBot.create(:user, :govuk_editor)

# visit "/"
# filter_by_user("All")
# filter_by_status("In review")

# assert page.has_link?("Check Collections publisher", href: "#{Plek.find('collections-publisher', external: true)}/step-by-step-pages?status=submitted_for_2i&order_by=updated_at")
# end

should "allow a user to claim 2i" do
stub_linkables
stub_holidays_used_by_fact_check
Expand Down Expand Up @@ -325,18 +288,6 @@ class RootOverviewTest < IntegrationTest
assert_not page.has_button?("Claim 2i")
end

# TODO: we do not display slug links as was the case - is this correct?
# should "show a table with an edition with a slug as a link when filtering by published" do
# FactoryBot.create(:user, :govuk_editor)
# FactoryBot.create(:guide_edition, state: "published", title: "Test", slug: "test-slug")

# visit "/"
# filter_by_user("All")
# filter_by_status("Published")

# assert page.has_link?("/test-slug", href: "#{Plek.website_root}/test-slug")
# end

should "not render popular links edition" do
FactoryBot.create(:user, :govuk_editor)
FactoryBot.create(:guide_edition, title: "Draft guide")
Expand Down

0 comments on commit 0e1c898

Please sign in to comment.