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
"""
En construction
En construction
"""
en_construction
"""
En instruction
En instruction
"""
en_instruction
@ -1936,7 +1936,7 @@ enum DossierState {
refuse
"""
Classé sans suite
Classé sans suite
"""
sans_suite
}

View file

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

View file

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

View file

@ -1072,7 +1072,7 @@ describe API::V2::GraphqlController do
it "should fail" do
expect(gql_errors).to eq(nil)
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
})
end
@ -1289,7 +1289,7 @@ describe API::V2::GraphqlController do
it "should fail" do
expect(gql_errors).to eq(nil)
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
})
end

View file

@ -162,7 +162,7 @@ describe Instructeurs::DossiersController, type: :controller do
it 'warns about the error' do
expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_instruction))
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
@ -175,7 +175,7 @@ describe Instructeurs::DossiersController, type: :controller do
it 'warns about the error' do
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
@ -208,7 +208,7 @@ describe Instructeurs::DossiersController, type: :controller do
it 'warns about the error' do
expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_construction))
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
@ -245,7 +245,7 @@ describe Instructeurs::DossiersController, type: :controller do
it 'warns about the error' do
expect(dossier.reload.state).to eq(Dossier.states.fetch(:en_instruction))
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

View file

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

View file

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

View file

@ -20,7 +20,7 @@ describe 'instructeurs/dossiers/show.html.haml', type: :view do
end
it 'renders the correct dossier state' do
expect(subject).to have_text('en construction')
expect(subject).to have_text('en construction')
end
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
expect(rendered).to have_text(dossier.procedure.libelle)
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_link("Résumé", href: dossier_path(dossier))