diff --git a/app/controllers/concerns/work_streamable.rb b/app/controllers/concerns/work_streamable.rb
index bc7fbbc8b..44dca9af9 100644
--- a/app/controllers/concerns/work_streamable.rb
+++ b/app/controllers/concerns/work_streamable.rb
@@ -39,10 +39,6 @@ def require_app_work_stream
end
def work_stream_filter
- if FeatureFlags.work_stream.enabled?
- [current_work_stream]
- else
- WorkStream.all
- end
+ [current_work_stream]
end
end
diff --git a/app/models/concerns/user_competence.rb b/app/models/concerns/user_competence.rb
index 5f8784d55..db629a4ac 100644
--- a/app/models/concerns/user_competence.rb
+++ b/app/models/concerns/user_competence.rb
@@ -10,7 +10,6 @@ def work_streams
def competencies
return Types::CompetencyType.values if supervisor?
return [] if data_analyst?
- return Types::CompetencyType.values unless FeatureFlags.work_stream.enabled?
@competencies ||= Allocating.user_competencies(id)
end
diff --git a/app/views/casework/assigned_applications/_crime_application.html.erb b/app/views/casework/assigned_applications/_crime_application.html.erb
index fdbfe2631..e0a196b6b 100644
--- a/app/views/casework/assigned_applications/_crime_application.html.erb
+++ b/app/views/casework/assigned_applications/_crime_application.html.erb
@@ -7,11 +7,9 @@
<%= crime_application.reference %>
|
- <% if FeatureFlags.work_stream.enabled? %>
-
- <%= label_text(crime_application.work_stream) %>
- |
- <% end %>
+
+ <%= label_text(crime_application.work_stream) %>
+ |
<%= l(crime_application.submitted_at) %>
|
diff --git a/app/views/casework/assigned_applications/index.html.erb b/app/views/casework/assigned_applications/index.html.erb
index 9bb96b376..7e6c4d161 100644
--- a/app/views/casework/assigned_applications/index.html.erb
+++ b/app/views/casework/assigned_applications/index.html.erb
@@ -31,7 +31,7 @@
head.with_row do |row|
row.with_cell(colname: :applicant_name)
row.with_cell(colname: :reference)
- row.with_cell(colname: :work_stream) if FeatureFlags.work_stream.enabled?
+ row.with_cell(colname: :work_stream)
row.with_cell(colname: :submitted_at)
row.with_cell(colname: :submitted_at, text: sanitize(thead_text(:time_passed)))
end
diff --git a/app/views/casework/crime_applications/index.html.erb b/app/views/casework/crime_applications/index.html.erb
index 1719c5aa7..d68aca169 100644
--- a/app/views/casework/crime_applications/index.html.erb
+++ b/app/views/casework/crime_applications/index.html.erb
@@ -4,23 +4,18 @@
<%= t("casework.crime_applications.index.#{action_name}_heading") %>
-<% if FeatureFlags.work_stream.enabled? %>
-
-
- <% current_user.work_streams.each do |work_stream| %>
- <% css_class = %w[govuk-tabs__list-item govuk-tabs__list-item--selected] %>
- <%= content_tag(:li, class: work_stream == current_work_stream ? css_class : css_class.first) do %>
- <%= link_to(work_stream.label, url_for(work_stream:), class: 'govuk-tabs__tab') %>
- <% end %>
+
+
+ <% current_user.work_streams.each do |work_stream| %>
+ <% css_class = %w[govuk-tabs__list-item govuk-tabs__list-item--selected] %>
+ <%= content_tag(:li, class: work_stream == current_work_stream ? css_class : css_class.first) do %>
+ <%= link_to(work_stream.label, url_for(work_stream:), class: 'govuk-tabs__tab') %>
<% end %>
-
+ <% end %>
+
-
- <%= render partial: 'open_closed_applications',
- locals: { action_name: action_name, search: @search, report_type: @report_type } %>
-
+
+ <%= render partial: 'open_closed_applications',
+ locals: { action_name: action_name, search: @search, report_type: @report_type } %>
-<% else %>
- <%= render partial: 'open_closed_applications',
- locals: { action_name: action_name, search: @search, report_type: @report_type } %>
-<% end %>
+
diff --git a/config/settings.yml b/config/settings.yml
index 25aea7bf2..866b1ce55 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -7,10 +7,6 @@ feature_flags:
local: false
staging: true
production: false # user managers should not access the service in production
- work_stream:
- local: true
- staging: true
- production: true
means_journey:
local: true
staging: true
diff --git a/spec/models/concerns/user_competence_spec.rb b/spec/models/concerns/user_competence_spec.rb
index b04487b54..c1684ef2c 100644
--- a/spec/models/concerns/user_competence_spec.rb
+++ b/spec/models/concerns/user_competence_spec.rb
@@ -56,18 +56,6 @@
expect(competencies).to be_empty
end
end
-
- context 'when work stream feature flag is disabled' do
- before do
- allow(FeatureFlags).to receive(:work_stream) {
- instance_double(FeatureFlags::EnabledFeature, enabled?: false)
- }
- end
-
- it 'returns all work_streams regardless of competencies' do
- expect(competencies).to eq %w[criminal_applications_team criminal_applications_team_2 extradition]
- end
- end
end
end
end
diff --git a/spec/requests/authorisation_spec.rb b/spec/requests/authorisation_spec.rb
index 940b2fc3e..7d32c368d 100644
--- a/spec/requests/authorisation_spec.rb
+++ b/spec/requests/authorisation_spec.rb
@@ -104,12 +104,6 @@
include Devise::Test::IntegrationHelpers
- before do
- allow(FeatureFlags).to receive(:work_stream) {
- instance_double(FeatureFlags::EnabledFeature, enabled?: false)
- }
- end
-
def expected_status(route_name)
case route_name
when 'users_auth_failure', 'forbidden'
diff --git a/spec/system/casework/assigning/viewing_your_assigned_applications_spec.rb b/spec/system/casework/assigning/viewing_your_assigned_applications_spec.rb
index 4bf13b800..501de764b 100644
--- a/spec/system/casework/assigning/viewing_your_assigned_applications_spec.rb
+++ b/spec/system/casework/assigning/viewing_your_assigned_applications_spec.rb
@@ -93,20 +93,6 @@
expect(page).to have_content 'Open applications'
expect(page).to have_current_path '/applications/open'
end
-
- context 'when work stream feature flag in is not enabled' do
- before do
- allow(FeatureFlags).to receive(:work_stream) {
- instance_double(FeatureFlags::EnabledFeature, enabled?: false)
- }
- visit '/'
- end
-
- it 'takes you to open applications path when you click "open applications"' do
- click_on('Open applications')
- expect(page).to have_current_path '/applications/open'
- end
- end
end
context 'when an assigned application is not found on the datastore' do
diff --git a/spec/system/casework/closed_applications_dashboard_spec.rb b/spec/system/casework/closed_applications_dashboard_spec.rb
index d40855e81..3596b2c9b 100644
--- a/spec/system/casework/closed_applications_dashboard_spec.rb
+++ b/spec/system/casework/closed_applications_dashboard_spec.rb
@@ -21,18 +21,12 @@
]
end
- let(:work_stream_flag_enabled) { true }
-
let(:user_id) { current_user_id }
before do
visit '/'
click_on 'open applications'
- allow(FeatureFlags).to receive(:work_stream) {
- instance_double(FeatureFlags::EnabledFeature, enabled?: work_stream_flag_enabled)
- }
-
return_details = ReturnDetails.new(
reason: ReturnDetails::RETURN_REASONS.first,
details: 'Detailed reason'
@@ -47,18 +41,6 @@
click_on 'Closed applications'
end
- context 'when work stream feature flag disabled' do
- let(:work_stream_flag_enabled) { false }
-
- it 'shows only closed applications' do
- expect_datastore_to_have_been_searched_with(
- { review_status: Types::REVIEW_STATUS_GROUPS['closed'],
- work_stream: %w[criminal_applications_team criminal_applications_team_2 extradition] },
- sorting: ApplicationSearchSorting.new(sort_by: 'reviewed_at', sort_direction: 'descending')
- )
- end
- end
-
it 'includes the page title' do
expect(page).to have_content I18n.t('casework.crime_applications.index.closed_title')
end
@@ -104,40 +86,36 @@
end
context 'when work stream feature flag is enabled' do
- let(:work_stream_flag_enabled) { true }
-
it 'includes tabs for work streams' do
tabs = find(:xpath, "//div[@class='govuk-tabs']")
expect(tabs).to have_content 'CAT 1 CAT 2 Extradition'
end
- context 'when viewing closed applications by work stream' do
- it 'searches for extradition closed applications' do
- click_on 'Extradition'
- expect_datastore_to_have_been_searched_with(
- { review_status: Types::REVIEW_STATUS_GROUPS['closed'], work_stream: %w[extradition] },
- sorting: ApplicationSearchSorting.new(sort_by: 'reviewed_at', sort_direction: 'descending')
- )
- end
-
- it 'searches for CAT 2 closed applications' do
- click_on 'CAT 2'
- expect_datastore_to_have_been_searched_with(
- { review_status: Types::REVIEW_STATUS_GROUPS['closed'], work_stream: %w[criminal_applications_team_2] },
- sorting: ApplicationSearchSorting.new(sort_by: 'reviewed_at', sort_direction: 'descending')
- )
- end
-
- it 'searches for CAT 1 closed applications' do
- click_on 'CAT 1'
- expect_datastore_to_have_been_searched_with(
- { review_status: Types::REVIEW_STATUS_GROUPS['closed'],
- work_stream: %w[criminal_applications_team] },
- sorting: ApplicationSearchSorting.new(sort_by: 'reviewed_at', sort_direction: 'descending'),
- number_of_times: 2
- )
- end
+ it 'searches for extradition closed applications' do
+ click_on 'Extradition'
+ expect_datastore_to_have_been_searched_with(
+ { review_status: Types::REVIEW_STATUS_GROUPS['closed'], work_stream: %w[extradition] },
+ sorting: ApplicationSearchSorting.new(sort_by: 'reviewed_at', sort_direction: 'descending')
+ )
+ end
+
+ it 'searches for CAT 2 closed applications' do
+ click_on 'CAT 2'
+ expect_datastore_to_have_been_searched_with(
+ { review_status: Types::REVIEW_STATUS_GROUPS['closed'], work_stream: %w[criminal_applications_team_2] },
+ sorting: ApplicationSearchSorting.new(sort_by: 'reviewed_at', sort_direction: 'descending')
+ )
+ end
+
+ it 'searches for CAT 1 closed applications' do
+ click_on 'CAT 1'
+ expect_datastore_to_have_been_searched_with(
+ { review_status: Types::REVIEW_STATUS_GROUPS['closed'],
+ work_stream: %w[criminal_applications_team] },
+ sorting: ApplicationSearchSorting.new(sort_by: 'reviewed_at', sort_direction: 'descending'),
+ number_of_times: 2
+ )
end
end
end
diff --git a/spec/system/casework/no_competencies_spec.rb b/spec/system/casework/no_competencies_spec.rb
index 3a66ae001..cd9f56df5 100644
--- a/spec/system/casework/no_competencies_spec.rb
+++ b/spec/system/casework/no_competencies_spec.rb
@@ -16,10 +16,6 @@
before do
visit '/'
-
- allow(FeatureFlags).to receive(:work_stream) {
- instance_double(FeatureFlags::EnabledFeature, enabled?: true)
- }
end
context 'when navigating to application pages' do
diff --git a/spec/system/casework/open_applications_dashboard_spec.rb b/spec/system/casework/open_applications_dashboard_spec.rb
index 26db52a07..2c80c0e89 100644
--- a/spec/system/casework/open_applications_dashboard_spec.rb
+++ b/spec/system/casework/open_applications_dashboard_spec.rb
@@ -2,34 +2,16 @@
RSpec.describe 'Open Applications' do
include_context 'with stubbed search'
- let(:work_stream_flag_enabled) { true }
let(:report_turbo_link_work_stream_params) do
report_link = URI(page.find('turbo-frame#current_workload_report', visible: false)['src'])
CGI.parse(report_link.query)['work_streams[]']
end
before do
- allow(FeatureFlags).to receive(:work_stream) {
- instance_double(FeatureFlags::EnabledFeature, enabled?: work_stream_flag_enabled)
- }
-
visit '/'
click_on 'Open applications'
end
- context 'when work stream feature flag disabled' do
- let(:work_stream_flag_enabled) { false }
-
- it 'shows open applications from all streams' do
- expect_datastore_to_have_been_searched_with(
- { review_status: Types::REVIEW_STATUS_GROUPS['open'],
- work_stream: %w[criminal_applications_team criminal_applications_team_2 extradition] },
- sorting: ApplicationSearchSorting.new(sort_by: 'submitted_at', sort_direction: 'ascending')
- )
- expect(report_turbo_link_work_stream_params).to eq %w[cat_1 cat_2 extradition]
- end
- end
-
it 'includes the page title' do
expect(page).to have_content I18n.t('casework.crime_applications.index.open_title')
end
diff --git a/spec/system/casework/primary_nav_spec.rb b/spec/system/casework/primary_nav_spec.rb
index 9c3e369a3..4d5d86788 100644
--- a/spec/system/casework/primary_nav_spec.rb
+++ b/spec/system/casework/primary_nav_spec.rb
@@ -60,23 +60,4 @@
expect(heading_text).to eq('Closed applications')
expect(page).to have_current_path '/applications/closed'
end
-
- context 'when work stream feature flag in is not enabled' do
- before do
- allow(FeatureFlags).to receive(:work_stream) {
- instance_double(FeatureFlags::EnabledFeature, enabled?: false)
- }
- visit '/'
- end
-
- it 'takes you to the open applications path when you click "Open applications"' do
- click_on('Open applications')
- expect(page).to have_current_path '/applications/open'
- end
-
- it 'takes you to the closed applications path when you click "Closed applications"' do
- click_on('Closed applications')
- expect(page).to have_current_path '/applications/closed'
- end
- end
end