diff --git a/app/views/admin/editions/_search_results.html.erb b/app/views/admin/editions/_search_results.html.erb
index 542d507757f..1d6e0cfdf38 100644
--- a/app/views/admin/editions/_search_results.html.erb
+++ b/app/views/admin/editions/_search_results.html.erb
@@ -6,8 +6,6 @@
<%= pluralize(number_with_delimiter(@filter.editions.total_count), "document") %>
<% end %>
-
-
+
<%= render "search_results", filter: @filter, paginator: @filter.editions, show_export: true %>
diff --git a/app/views/admin/featurable_editions/_search_results.html.erb b/app/views/admin/featurable_editions/_search_results.html.erb
index a2d7bb0d7ea..4e0eb797284 100644
--- a/app/views/admin/featurable_editions/_search_results.html.erb
+++ b/app/views/admin/featurable_editions/_search_results.html.erb
@@ -39,6 +39,7 @@
},
]
end,
+ first_cell_is_header: true,
} %>
<%= paginate(paginator, anchor: anchor, theme: "govuk_paginator") %>
diff --git a/app/views/admin/shared/_featurable_editions.html.erb b/app/views/admin/shared/_featurable_editions.html.erb
index f5e65889190..9f85b17a786 100644
--- a/app/views/admin/shared/_featurable_editions.html.erb
+++ b/app/views/admin/shared/_featurable_editions.html.erb
@@ -8,7 +8,7 @@
<%= render "admin/editions/filter_options", filter_by:, filter_action:, anchor: %>
-
+
<%= render "admin/featurable_editions/search_results", featurable_editions:, paginator:, anchor:, feature_path: %>
diff --git a/app/views/admin/statistics_announcements/_search_results.html.erb b/app/views/admin/statistics_announcements/_search_results.html.erb
index 73c26e69049..06fa5764697 100644
--- a/app/views/admin/statistics_announcements/_search_results.html.erb
+++ b/app/views/admin/statistics_announcements/_search_results.html.erb
@@ -49,6 +49,7 @@
},
]
end,
+ first_cell_is_header: true,
} %>
diff --git a/app/views/admin/statistics_announcements/index.html.erb b/app/views/admin/statistics_announcements/index.html.erb
index 8a8ad05202d..efc05791c32 100644
--- a/app/views/admin/statistics_announcements/index.html.erb
+++ b/app/views/admin/statistics_announcements/index.html.erb
@@ -28,7 +28,7 @@
<%= render "filter_options" %>
-
+
<%= render "search_results", filter: @filter, paginator: @statistics_announcements, show_export: true %>
diff --git a/test/functional/admin/editions_controller_test.rb b/test/functional/admin/editions_controller_test.rb
index 9e1e183e181..c0a00a4534f 100644
--- a/test/functional/admin/editions_controller_test.rb
+++ b/test/functional/admin/editions_controller_test.rb
@@ -164,7 +164,7 @@ class Admin::EditionsControllerTest < ActionController::TestCase
get :index, params: { state: :published, type: :publication }
assert_select ".govuk-table__row" do
- assert_select ".govuk-table__cell:nth-child(1)", text: publication.title
+ assert_select ".govuk-table__header:nth-child(1)", text: publication.title
assert_select ".govuk-table__cell:nth-child(3)", text: "Published"
end
end
@@ -174,7 +174,7 @@ class Admin::EditionsControllerTest < ActionController::TestCase
get :index, params: { state: :published, type: :publication }
assert_select ".govuk-table__row" do
- assert_select ".govuk-table__cell:nth-child(1)", text: publication.title
+ assert_select ".govuk-table__header:nth-child(1)", text: publication.title
assert_select ".govuk-table__cell:nth-child(3)", text: "Force published"
end
end
@@ -184,7 +184,7 @@ class Admin::EditionsControllerTest < ActionController::TestCase
get :index, params: { state: :force_published, type: :publication }
assert_select ".govuk-table__row" do
- assert_select ".govuk-table__cell:nth-child(1)", text: publication.title
+ assert_select ".govuk-table__header:nth-child(1)", text: publication.title
assert_select ".govuk-table__cell:nth-child(3)", text: "Force published"
end
end
@@ -198,25 +198,25 @@ class Admin::EditionsControllerTest < ActionController::TestCase
get :index, params: { state: :active }
assert_select ".govuk-table__row" do
- assert_select ".govuk-table__cell:nth-child(1)", text: draft_edition.title do |cell|
+ assert_select ".govuk-table__header:nth-child(1)", text: draft_edition.title do |cell|
cell.first.parent.xpath("td[3]").text.strip == "Draft"
end
end
assert_select ".govuk-table__row" do
- assert_select ".govuk-table__cell:nth-child(1)", text: submitted_edition.title do |cell|
+ assert_select ".govuk-table__header:nth-child(1)", text: submitted_edition.title do |cell|
cell.first.parent.xpath("td[3]").text.strip == "Submitted"
end
end
assert_select ".govuk-table__row" do
- assert_select ".govuk-table__cell:nth-child(1)", text: rejected_edition.title do |cell|
+ assert_select ".govuk-table__header:nth-child(1)", text: rejected_edition.title do |cell|
cell.first.parent.xpath("td[3]").text.strip == "Rejected"
end
end
assert_select ".govuk-table__row" do
- assert_select ".govuk-table__cell:nth-child(1)", text: published_edition.title do |cell|
+ assert_select ".govuk-table__header:nth-child(1)", text: published_edition.title do |cell|
cell.first.parent.xpath("td[3]").text.strip == "Published"
end
end
@@ -236,9 +236,9 @@ class Admin::EditionsControllerTest < ActionController::TestCase
get :index, params: { state: :active }
accessible.each do |edition|
- assert_select ".govuk-table__cell:nth-child(1)", text: edition.title
+ assert_select ".govuk-table__header:nth-child(1)", text: edition.title
end
- refute_select ".govuk-table__cell:nth-child(1)", text: inaccessible.title
+ refute_select ".govuk-table__header:nth-child(1)", text: inaccessible.title
end
view_test "index should indicate the protected status of limited access editions which I do have access to" do
@@ -249,7 +249,7 @@ class Admin::EditionsControllerTest < ActionController::TestCase
get :index, params: { state: :active }
assert_select ".govuk-table__row" do
- assert_select ".govuk-table__cell:nth-child(1)", text: publication.title
+ assert_select ".govuk-table__header:nth-child(1)", text: publication.title
assert_select ".govuk-table__cell:nth-child(3)", text: "Draft Limited access"
end
end