+<% end %>
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index fc2af0eb..57f43ea8 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -520,21 +520,14 @@ fr:
not_accessible: "Cette candidature n'est pas consultable"
lot_selection:
title: "Sélectionnez un ou plusieurs lot(s)"
- subtitle: "Sélectionnez un ou plusieurs lots pour lequel/lesquels vous souhaitez soumettre une candidature."
+ subtitle: "Sélectionnez le ou les lots pour lequel/lesquels vous souhaitez soumettre une candidature."
submit: "Transmettre ma candidature"
+ next: "Suivant"
market_info_title: "Informations du marché"
buyer_label: "Acheteur"
- how_it_works_title: "Comment ça fonctionne"
- how_it_works_step_1: "Sélectionnez vos lots"
- how_it_works_step_2: "Complétez le formulaire de candidature"
- how_it_works_step_3: "Soumettez votre candidature"
market_type_label: "Typologie"
deadline_label: "Date limite"
- application_form_title: "Formulaire de candidature"
- prepare: "Préparer"
- modify: "Modifier"
- fields_count: "%{filled}/%{total} champs complétés"
- progress_title: "Avancement des candidatures"
+ selected_lots_title: "Liste des lots sélectionnés"
no_lot_selected: "Aucun lot sélectionné pour le moment"
select_all: "Tout sélectionner"
deselect_all: "Tout désélectionner"
@@ -542,10 +535,9 @@ fr:
one: "1 lot"
other: "%{count} lots"
available_lots_count:
- one: "1 lot"
- other: "%{count} lots"
+ one: "1 lot disponible"
+ other: "%{count} lots disponibles"
lot_number: "Lot %{number}"
- single_form_notice: "Vous n'avez qu'un seul formulaire de candidature à compléter, Passe Marché se charge de transmettre votre candidature pour les différents lots."
lot_limit_notice:
one: "L'acheteur a limité le nombre de lot auxquels vous pouvez candidater : %{count} lot maximum"
other: "L'acheteur a limité le nombre de lots auxquels vous pouvez candidater : %{count} lots maximum"
@@ -555,6 +547,18 @@ fr:
lot_limit_exceeded_notice:
one: "Vous avez atteint la limite : %{count} lot maximum autorisé"
other: "Vous avez atteint la limite : %{count} lots maximum autorisés."
+ prepare_title: "Préparez votre dossier de candidature"
+ prepare_subtitle: "Votre dossier est organisé selon les types de lots sélectionnés. Complétez chaque section à votre rythme."
+ single_form_notice: "Vous n'avez qu'un seul formulaire de candidature à compléter, Passe Marché se charge de transmettre votre candidature pour les différents lots."
+ lots_list_title: "Liste des lots"
+ edit_lots: "Modifier les lots"
+ application_form_title: "Formulaire de candidature"
+ fields_count: "%{filled}/%{total} champs complétés"
+ start: "Compléter"
+ modify: "Modifier"
+ how_it_works_title: "Comment ça fonctionne"
+ how_it_works_step_1: "Complétez le formulaire de candidature"
+ how_it_works_step_2: "Soumettez votre candidature (vous pouvez soumettre même si toutes les informations n'ont pas été complétées)"
validations:
siret_blank: "Veuillez renseigner votre numéro de SIRET"
siret_invalid: "Le numéro de SIRET saisi est invalide"
diff --git a/features/candidate_lot_selection.feature b/features/candidate_lot_selection.feature
index 9362bc27..ae5b61a8 100644
--- a/features/candidate_lot_selection.feature
+++ b/features/candidate_lot_selection.feature
@@ -19,11 +19,12 @@ Feature: Candidate lot selection
When the candidate visits the lot selection step
Then the candidate should be on the api data recovery status step
- Scenario: Candidate can select lots and proceed to the next step
+ Scenario: Candidate can select lots and reach the preparation page
When the candidate visits the lot selection step
And the candidate selects the first lot
- And the candidate submits the lot selection step
- Then the candidate should be on the api data recovery status step
+ And the candidate clicks Suivant
+ Then the candidate should be on the lot selection step
+ And the candidate should see the preparation page
Scenario: Candidate cannot proceed without selecting a lot
When the candidate visits the lot selection step
@@ -35,13 +36,34 @@ Feature: Candidate lot selection
Given the public market has a lot limit of 1
When the candidate visits the lot selection step
And the candidate selects all available lots
- And the candidate submits the lot selection step
+ And the candidate submits the lot selection step without selecting any lot
Then the candidate should see an error about the lot limit
And the candidate should remain on the lot selection step
+ Scenario: Preparation page shows Commencer when form not started
+ When the candidate visits the lot selection step
+ And the candidate selects the first lot
+ And the candidate clicks Suivant
+ Then the candidate should see the preparation page
+ And the candidate should see the complete button
+
+ Scenario: Preparation page hides how it works when form is started
+ Given the candidate has already started the form
+ When the candidate visits the preparation page
+ Then the candidate should see the preparation page
+ And the candidate should not see the how it works section
+ And the candidate should see the modify button
+
+ Scenario: Candidate can edit lots from the preparation page
+ When the candidate visits the lot selection step
+ And the candidate selects the first lot
+ And the candidate clicks Suivant
+ And the candidate clicks the edit lots button
+ Then the candidate should be on the lot selection step
+
Scenario: Candidate is redirected to company identification when reconnecting
When the candidate visits the lot selection step
And the candidate selects the first lot
- And the candidate submits the lot selection step
+ And the candidate clicks Suivant
And the candidate reconnects to the application
Then the candidate should be on the company identification step
diff --git a/features/step_definitions/candidate_lot_selection_steps.rb b/features/step_definitions/candidate_lot_selection_steps.rb
index 8a0d7185..ad64b9b1 100644
--- a/features/step_definitions/candidate_lot_selection_steps.rb
+++ b/features/step_definitions/candidate_lot_selection_steps.rb
@@ -40,17 +40,31 @@ def create_public_market_with_company_name_attribute(editor)
@public_market.update!(lot_limit: limit)
end
+Given('the candidate has already started the form') do
+ @market_application = create(:market_application, public_market: @public_market, siret: '73282932000074')
+ @market_application.lots << @lot1
+ attr = @public_market.market_attributes.first
+ create(:market_attribute_response_text_input,
+ market_application: @market_application,
+ market_attribute: attr,
+ value: { text: 'Acme Corp' })
+ authenticate_as_candidate_for(@market_application)
+end
+
When('the candidate visits the lot selection step') do
application = @market_application_no_lots || @market_application
visit lot_selection_candidate_market_application_path(application.identifier)
end
+When('the candidate visits the preparation page') do
+ visit lot_selection_candidate_market_application_path(@market_application.identifier)
+end
+
Then('the candidate should be on the lot selection step') do
expect(page).to have_current_path(
%r{/candidate/market_applications/.+/lots},
ignore_query: true
)
- expect(page).to have_content(I18n.t('candidate.lot_selection.title'))
end
Then('the candidate should be on the api data recovery status step') do
@@ -74,12 +88,32 @@ def create_public_market_with_company_name_attribute(editor)
check 'Lot 2 - Services'
end
-When('the candidate submits the lot selection step') do
- find('button[type="submit"][form="lot-selection-form"][name="final_submit"]').click
+When('the candidate clicks Suivant') do
+ find('button[type="submit"][form="lot-selection-form"]').click
end
When('the candidate submits the lot selection step without selecting any lot') do
- find('button[type="submit"][form="lot-selection-form"][name="final_submit"]', visible: :all).click
+ find('button[type="submit"][form="lot-selection-form"]', visible: :all).click
+end
+
+Then('the candidate should see the preparation page') do
+ expect(page).to have_content(I18n.t('candidate.lot_selection.prepare_title'))
+end
+
+Then('the candidate should see the complete button') do
+ expect(page).to have_content(I18n.t('candidate.lot_selection.start'))
+end
+
+Then('the candidate should see the modify button') do
+ expect(page).to have_content(I18n.t('candidate.lot_selection.modify'))
+end
+
+Then('the candidate should not see the how it works section') do
+ expect(page).not_to have_content(I18n.t('candidate.lot_selection.how_it_works_title'))
+end
+
+When('the candidate clicks the edit lots button') do
+ click_on I18n.t('candidate.lot_selection.edit_lots')
end
Then('the candidate should be on the company identification step') do