Merge pull request #7435 from betagouv/remove-procedure-estimated-fill-time-feature-flag
Technique : activation de l'estimation de la durée de remplissage pour toutes les démarches, et suppression du feature-flag `procedure-estimated-fill-time`
This commit is contained in:
commit
e44a6ddeea
6 changed files with 18 additions and 34 deletions
|
@ -32,11 +32,7 @@ module Administrateurs
|
|||
end
|
||||
|
||||
def estimate_fill_duration
|
||||
estimate = if @procedure.feature_enabled?(:procedure_estimated_fill_duration)
|
||||
@procedure.draft_revision.estimated_fill_duration
|
||||
else
|
||||
0
|
||||
end
|
||||
estimate = @procedure.draft_revision.estimated_fill_duration
|
||||
render json: { estimated_fill_duration: estimate }
|
||||
end
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ module ProcedureHelper
|
|||
baseUrl: admin_procedure_types_de_champ_path(procedure),
|
||||
directUploadUrl: rails_direct_uploads_url,
|
||||
continuerUrl: admin_procedure_path(procedure),
|
||||
estimatedFillDuration: procedure.feature_enabled?(:procedure_estimated_fill_duration) ? procedure.draft_revision.estimated_fill_duration : 0
|
||||
estimatedFillDuration: procedure.draft_revision.estimated_fill_duration
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
%h1.procedure-title
|
||||
= procedure.libelle
|
||||
|
||||
- if procedure.persisted? && procedure.feature_enabled?(:procedure_estimated_fill_duration)
|
||||
- if procedure.persisted?
|
||||
%p.procedure-configuration.procedure-configuration--fill-duration
|
||||
%span.icon.clock
|
||||
= t('shared.procedure_description.estimated_fill_duration', estimated_minutes: estimated_fill_duration_minutes(procedure))
|
||||
|
|
|
@ -26,7 +26,6 @@ features = [
|
|||
:hide_instructeur_email,
|
||||
:procedure_revisions,
|
||||
:procedure_routage_api,
|
||||
:procedure_estimated_fill_duration,
|
||||
:procedure_process_expired_dossiers_termine
|
||||
]
|
||||
|
||||
|
|
|
@ -144,10 +144,6 @@ describe 'As an administrateur I can edit types de champ', js: true do
|
|||
expect(page).to have_content('Un menu')
|
||||
end
|
||||
|
||||
context "when the estimated fill duration is enabled" do
|
||||
before { Flipper.enable(:procedure_estimated_fill_duration) }
|
||||
after { Flipper.disable(:procedure_estimated_fill_duration) }
|
||||
|
||||
scenario "displaying the estimated fill duration" do
|
||||
# It doesn't display anything when there are no champs
|
||||
expect(page).not_to have_content('Durée de remplissage estimé')
|
||||
|
@ -168,4 +164,3 @@ describe 'As an administrateur I can edit types de champ', js: true do
|
|||
expect(page).not_to have_content('Durée de remplissage estimée')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,6 +8,7 @@ describe 'shared/_procedure_description.html.haml', type: :view do
|
|||
expect(rendered).to have_selector('.procedure-logos')
|
||||
expect(rendered).to have_text(procedure.libelle)
|
||||
expect(rendered).to have_text(procedure.description)
|
||||
expect(rendered).to have_text('Temps de remplissage estimé')
|
||||
end
|
||||
|
||||
it 'does not show empty date limite' do
|
||||
|
@ -22,11 +23,4 @@ describe 'shared/_procedure_description.html.haml', type: :view do
|
|||
expect(rendered).to have_text('Date limite')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the procedure_estimated_fill_duration feature is enabled' do
|
||||
before { Flipper.enable(:procedure_estimated_fill_duration) }
|
||||
after { Flipper.disable(:procedure_estimated_fill_duration) }
|
||||
|
||||
it { is_expected.to have_text('Temps de remplissage estimé') }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue