Skip to content

Commit

Permalink
Merge pull request #2027 from unboxed/fix-default-search-filter
Browse files Browse the repository at this point in the history
Don't exclude pre-review applications for reviewers
  • Loading branch information
benjamineskola authored Nov 12, 2024
2 parents a53d9e5 + 01a47b7 commit 4a8f07f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
7 changes: 1 addition & 6 deletions app/services/planning_application_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class PlanningApplicationSearch
include ActiveModel::Attributes

STATUSES = %w[not_started invalidated in_assessment awaiting_determination to_be_reviewed].freeze
REVIEWER_STATUSES = %w[awaiting_determination to_be_reviewed].freeze

APPLICATION_TYPES = ApplicationType::NAME_ORDER

Expand Down Expand Up @@ -46,11 +45,7 @@ def call
end

def statuses
if reviewer? && exclude_others?
REVIEWER_STATUSES
else
STATUSES
end
STATUSES
end

def application_types
Expand Down
2 changes: 1 addition & 1 deletion spec/system/filter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
expect(page).to have_content("Your live applications")
expect(page).to have_content(other_awaiting_determination_planning_application.reference)
expect(page).to have_content(other_to_be_reviewed_planning_application.reference)
expect(page).not_to have_content(in_assessment_planning_application.reference)
expect(page).to have_content(in_assessment_planning_application.reference)
expect(page).not_to have_content(closed_planning_application.reference)
expect(page).not_to have_content(other_closed_planning_application.reference)

Expand Down
13 changes: 0 additions & 13 deletions spec/system/planning_applications/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -675,19 +675,6 @@
end
end

it "Only Planning Applications that are awaiting_determination are present in this tab" do
find("span", text: "Filters").click
uncheck "To be reviewed"
click_button "Apply filters"

within(selected_govuk_tab) do
expect(page).to have_link(reviewer_planning_application_started.reference)
expect(page).not_to have_link(planning_application_1.reference)
expect(page).not_to have_link(planning_application_2.reference)
expect(page).not_to have_link(planning_application_completed.reference)
end
end

it "Only Planning Applications that are determined are present in this tab" do
click_link "Closed"

Expand Down

0 comments on commit 4a8f07f

Please sign in to comment.