Merge pull request #8920 from tchak/fix-dossier-state-display

ETQ instructeur, je veux voir l'état des dossiers affiché sur une seule ligne
This commit is contained in:
Paul Chavard 2023-04-19 10:36:31 +00:00 committed by GitHub
commit d584bb5a83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 20 deletions

View file

@ -1921,12 +1921,12 @@ enum DossierState {
accepte accepte
""" """
En construction En construction
""" """
en_construction en_construction
""" """
En instruction En instruction
""" """
en_instruction en_instruction
@ -1936,7 +1936,7 @@ enum DossierState {
refuse refuse
""" """
Classé sans suite Classé sans suite
""" """
sans_suite sans_suite
} }

View file

@ -10,11 +10,11 @@ en:
state: "State" state: "State"
dossier/state: &state dossier/state: &state
brouillon: "Draft" brouillon: "Draft"
en_construction: "In progress" en_construction: "In progress"
en_instruction: "Processing" en_instruction: "Processing"
accepte: "Accepted" accepte: "Accepted"
refuse: "Refused" refuse: "Refused"
sans_suite: "No further action" sans_suite: "No further action"
traitement: traitement:
state: "State" state: "State"
traitement/state: traitement/state:

View file

@ -14,11 +14,11 @@ fr:
autorisation_donnees: Acceptation des CGU autorisation_donnees: Acceptation des CGU
dossier/state: &state dossier/state: &state
brouillon: "Brouillon" brouillon: "Brouillon"
en_construction: "En construction" en_construction: "En construction"
en_instruction: "En instruction" en_instruction: "En instruction"
accepte: "Accepté" accepte: "Accepté"
refuse: "Refusé" refuse: "Refusé"
sans_suite: "Classé sans suite" sans_suite: "Classé sans suite"
traitement: traitement:
state: "État" state: "État"
traitement/state: traitement/state:

View file

@ -1072,7 +1072,7 @@ describe API::V2::GraphqlController do
it "should fail" do it "should fail" do
expect(gql_errors).to eq(nil) expect(gql_errors).to eq(nil)
expect(gql_data).to eq(dossierPasserEnInstruction: { expect(gql_data).to eq(dossierPasserEnInstruction: {
errors: [{ message: "Le dossier est déjà en instruction" }], errors: [{ message: "Le dossier est déjà en instruction" }],
dossier: nil dossier: nil
}) })
end end
@ -1289,7 +1289,7 @@ describe API::V2::GraphqlController do
it "should fail" do it "should fail" do
expect(gql_errors).to eq(nil) expect(gql_errors).to eq(nil)
expect(gql_data).to eq(dossierRefuser: { expect(gql_data).to eq(dossierRefuser: {
errors: [{ message: "Le dossier est déjà classé sans suite" }], errors: [{ message: "Le dossier est déjà classé sans suite" }],
dossier: nil dossier: nil
}) })
end end

View file

@ -162,7 +162,7 @@ describe Instructeurs::DossiersController, type: :controller do
it 'warns about the error' do it 'warns about the error' do
expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_instruction)) expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_instruction))
expect(response).to have_http_status(:ok) expect(response).to have_http_status(:ok)
expect(response.body).to include('Le dossier est déjà en instruction.') expect(response.body).to include('Le dossier est déjà en instruction.')
end end
end end
@ -175,7 +175,7 @@ describe Instructeurs::DossiersController, type: :controller do
it 'warns about the error' do it 'warns about the error' do
expect(response).to have_http_status(:ok) expect(response).to have_http_status(:ok)
expect(response.body).to include('Le dossier est en ce moment accepté : il nest pas possible de le passer en instruction.') expect(response.body).to include('Le dossier est en ce moment accepté : il nest pas possible de le passer en instruction.')
end end
end end
@ -208,7 +208,7 @@ describe Instructeurs::DossiersController, type: :controller do
it 'warns about the error' do it 'warns about the error' do
expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_construction)) expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_construction))
expect(response).to have_http_status(:ok) expect(response).to have_http_status(:ok)
expect(response.body).to include('Le dossier est déjà en construction.') expect(response.body).to include('Le dossier est déjà en construction.')
end end
end end
@ -245,7 +245,7 @@ describe Instructeurs::DossiersController, type: :controller do
it 'warns about the error' do it 'warns about the error' do
expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_instruction)) expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_instruction))
expect(response).to have_http_status(:ok) expect(response).to have_http_status(:ok)
expect(response.body).to include('Le dossier est déjà en instruction.') expect(response.body).to include('Le dossier est déjà en instruction.')
end end
end end

View file

@ -141,7 +141,7 @@ RSpec.describe DossierHelper, type: :helper do
it 'en_construction is En construction' do it 'en_construction is En construction' do
dossier.en_construction! dossier.en_construction!
expect(subject).to eq('En construction') expect(subject).to eq('En construction')
end end
it 'accepte is traité' do it 'accepte is traité' do
@ -151,12 +151,12 @@ RSpec.describe DossierHelper, type: :helper do
it 'en_instruction is reçu' do it 'en_instruction is reçu' do
dossier.en_instruction! dossier.en_instruction!
expect(subject).to eq('En instruction') expect(subject).to eq('En instruction')
end end
it 'sans_suite is traité' do it 'sans_suite is traité' do
dossier.sans_suite! dossier.sans_suite!
expect(subject).to eq('Classé sans suite') expect(subject).to eq('Classé sans suite')
end end
it 'refuse is traité' do it 'refuse is traité' do

View file

@ -789,7 +789,7 @@ describe ProcedurePresentation do
let(:filters) { { "suivis" => [{ "table" => "self", "column" => "state", "value" => "en_construction" }] } } let(:filters) { { "suivis" => [{ "table" => "self", "column" => "state", "value" => "en_construction" }] } }
it 'should get i18n value' do it 'should get i18n value' do
expect(subject).to eq("En construction") expect(subject).to eq("En construction")
end end
end end
end end

View file

@ -20,7 +20,7 @@ describe 'instructeurs/dossiers/show.html.haml', type: :view do
end end
it 'renders the correct dossier state' do it 'renders the correct dossier state' do
expect(subject).to have_text('en construction') expect(subject).to have_text('en construction')
end end
context 'with a motivation' do context 'with a motivation' do

View file

@ -11,7 +11,7 @@ describe 'users/dossiers/show/header.html.haml', type: :view do
it 'affiche les informations du dossier' do it 'affiche les informations du dossier' do
expect(rendered).to have_text(dossier.procedure.libelle) expect(rendered).to have_text(dossier.procedure.libelle)
expect(rendered).to have_text("Dossier nº #{dossier.id}") expect(rendered).to have_text("Dossier nº #{dossier.id}")
expect(rendered).to have_text("en construction") expect(rendered).to have_text("en construction")
expect(rendered).to have_selector("nav.tabs") expect(rendered).to have_selector("nav.tabs")
expect(rendered).to have_link("Résumé", href: dossier_path(dossier)) expect(rendered).to have_link("Résumé", href: dossier_path(dossier))