diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 57f43ea8..15ff19bb 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -368,7 +368,7 @@ fr:
title_suffix: "Synthèse de ma candidature"
market_info_title: "Informations du marché"
no_fields_configured: "Aucun champ configuré."
- finalize: "Finaliser la configuration"
+ finalize: "Transmettre la configuration"
lot_limit: "Limite de lots par candidat"
lot_limit_value:
one: "%{count} lot maximum"
@@ -403,13 +403,13 @@ fr:
capacites_techniques_professionnelles: Sélections des renseignements complémentaires (partie 2)
summary: "Synthèse"
lot_config:
- title: "Configurer le type de vos lots"
+ title: "Configurez le type de vos lots"
subtitle: "Vérifiez et ajustez le type de chaque lot avant de configurer les pièces justificatives."
lots_section_title: "Vérifiez les types transmis"
lots_section_subtitle: "Assurez-vous que les types transmis par la plateforme de marché sont exacts et modifiez-les si besoin."
- platform_banner_global_type: "La plateforme %{platform} a transmis le type %{type} pour l'ensemble des lots. Sélectionnez les lots dont le type est incorrect pour les modifier."
- platform_banner_per_lot_type: "La plateforme %{platform} a transmis un type distinct pour chaque lot. Sélectionnez les lots dont le type est incorrect pour les modifier."
- platform_source: "Plateforme"
+ platform_banner_global_type: "Votre plateforme d'achat nous a transmis une typologie de marché pour les lots, si le type d'un lot est erroné vous pouvez le sélectionner pour lui appliquer la bonne typologie (travaux, services, fournitures)"
+ platform_banner_per_lot_type: "Votre plateforme d'achat nous a transmis une typologie de marché pour les lots, si le type d'un lot est erroné vous pouvez le sélectionner pour lui appliquer la bonne typologie (travaux, services, fournitures)"
+ platform_source: "PLATEFORME"
lot_number: "Lot %{number}"
lot_limit_section_title: "Indiquez si vous souhaitez limiter le nombre de lots"
lot_limit_section_subtitle: "Si vous le souhaitez, vous pouvez ajuster le nombre de lots auxquels une entreprise peut candidater."
@@ -424,7 +424,22 @@ fr:
how_it_works_step_2: "Modifiez les types de lots si nécessaires"
how_it_works_step_3: "Limitez le nombre de lots si nécessaire"
how_it_works_step_4: "Passez à la configuration des candidatures"
+ select_lot: "Sélectionner le lot %{name}"
submit: "Configurer les candidatures"
+ form_config:
+ title: "Configurez le formulaire de candidature"
+ subtitle: "Configurez les pièces justificatives attendues dans le cadre de la candidature à votre marché."
+ banner: "Vous n'avez qu'un seul formulaire de candidature à configurer, Passe Marché se charge de transmettre votre configuration pour les différents lots."
+ form_block_title: "Formulaire de candidature à configurer"
+ configure_button: "Configurer"
+ transmit_button: "Transmettre la configuration"
+ lots_section_title: "Liste des lots"
+ lots_count:
+ one: "1 lot"
+ other: "%{count} lots"
+ edit_lots_label: "Modifier la sélection des lots"
+ sidebar_buyer_label: "Acheteur"
+ sidebar_typology_label: "Typologie"
generic_step:
optional_question: Souhaitez-vous demander des renseignements complémentaires ?
yes_option: Oui
diff --git a/features/buyer_flow.feature b/features/buyer_flow.feature
index e4518487..1868c76b 100644
--- a/features/buyer_flow.feature
+++ b/features/buyer_flow.feature
@@ -22,13 +22,13 @@ Feature: Buyer Configuration Flow
And I should see "Lot 1 - Ordinateurs portables"
When I click on "Débuter l'activation de"
- Then I should see "Configurer le type de vos lots"
+ Then I should see "Configurez le type de vos lots"
When I navigate through all category steps to summary
Then I should be on the summary page
And I should see "Synthèse des paramètres de la candidature"
And I should see "Informations du marché"
- And I should see a button "Finaliser la configuration"
+ And I should see a button "Transmettre la configuration"
Scenario: Navigation arrière avec les boutons Précédent
Given I am on the summary page for my public market
diff --git a/features/buyer_lot_config.feature b/features/buyer_lot_config.feature
index fb6554ff..9f4c0ed5 100644
--- a/features/buyer_lot_config.feature
+++ b/features/buyer_lot_config.feature
@@ -12,7 +12,7 @@ Feature: Buyer Lot Configuration Step
Scenario: L'acheteur accède à la page de configuration des lots
When I visit the lot_config page for my public market
- Then I should see "Configurer le type de vos lots"
+ Then I should see "Configurez le type de vos lots"
And I should see "Lot 1"
And I should see "Lot 2"
And I should see "Lot 3"
@@ -22,7 +22,7 @@ Feature: Buyer Lot Configuration Step
When I visit the setup page for my public market
And I click on "Débuter l'activation de"
Then I should be on the lot_config page
- And I should see "Configurer le type de vos lots"
+ And I should see "Configurez le type de vos lots"
Scenario: L'acheteur choisit de ne pas limiter les lots
When I visit the lot_config page for my public market
@@ -61,4 +61,22 @@ Feature: Buyer Lot Configuration Step
Then I should be on the lot_config page
When I choose "Non" for lot limit
And I submit the lot_config form
+ Then I should be on the form_config page
+ And I should see "Configurez le formulaire de candidature"
+
+ Scenario: La page form_config affiche la liste des lots et le bouton Configurer
+ When I visit the form_config page for my public market
+ Then I should see "Configurez le formulaire de candidature"
+ And I should see "Formulaire de candidature à configurer"
+ And I should see "Configurer"
+ And I should see "Transmettre la configuration"
+
+ Scenario: Le bouton crayon sur form_config renvoie vers lot_config
+ When I visit the form_config page for my public market
+ And I click the edit lots button
+ Then I should be on the lot_config page
+
+ Scenario: Depuis form_config, Configurer mène à la première étape de catégorie
+ When I visit the form_config page for my public market
+ And I click on "Configurer"
Then I should be on the first category page
diff --git a/features/step_definitions/buyer_flow_steps.rb b/features/step_definitions/buyer_flow_steps.rb
index 8a6f77c4..2677adcf 100644
--- a/features/step_definitions/buyer_flow_steps.rb
+++ b/features/step_definitions/buyer_flow_steps.rb
@@ -9,7 +9,7 @@
@market_identifier ||= @last_api_response['identifier']
public_market = PublicMarket.find_by!(identifier: @market_identifier)
presenter = PublicMarketPresenter.new(public_market)
- special_steps = %i[setup lot_config summary]
+ special_steps = %i[setup lot_config form_config summary]
@first_category = presenter.wizard_steps.find { |s| special_steps.exclude?(s) }
visit step_buyer_public_market_path(identifier: @market_identifier, id: @first_category)
end
@@ -34,7 +34,7 @@
visit step_buyer_public_market_path(identifier: @market_identifier, id: :summary)
end
-SPECIAL_WIZARD_STEPS = %i[setup lot_config summary].freeze
+SPECIAL_WIZARD_STEPS = %i[setup lot_config form_config summary].freeze
When('I navigate through all category steps to summary') do
public_market = PublicMarket.find_by!(identifier: @market_identifier)
@@ -46,6 +46,11 @@
find('button[type="submit"]').click
end
+ if presenter.wizard_steps.include?(:form_config) &&
+ page.current_path == step_buyer_public_market_path(@market_identifier, :form_config)
+ find('button[type="submit"]').click
+ end
+
category_steps = presenter.wizard_steps.reject { |s| SPECIAL_WIZARD_STEPS.include?(s) }
category_steps.each do
@@ -66,7 +71,7 @@
Then('I should be on the first category page') do
public_market = PublicMarket.find_by!(identifier: @market_identifier)
presenter = PublicMarketPresenter.new(public_market)
- special_steps = %i[setup lot_config summary]
+ special_steps = %i[setup lot_config form_config summary]
first_category = presenter.wizard_steps.find { |s| special_steps.exclude?(s) }
expect(page).to have_current_path(step_buyer_public_market_path(@market_identifier, first_category))
end
diff --git a/features/step_definitions/buyer_lot_config_steps.rb b/features/step_definitions/buyer_lot_config_steps.rb
index 74ec8909..75e6b459 100644
--- a/features/step_definitions/buyer_lot_config_steps.rb
+++ b/features/step_definitions/buyer_lot_config_steps.rb
@@ -49,3 +49,17 @@
public_market = PublicMarket.find_by!(identifier: @market_identifier)
public_market.update!(lot_limit: limit)
end
+
+When('I visit the form_config page for my public market') do
+ @market_identifier ||= @last_api_response['identifier']
+ visit step_buyer_public_market_path(identifier: @market_identifier, id: :form_config)
+end
+
+Then('I should be on the form_config page') do
+ @market_identifier ||= @last_api_response['identifier']
+ expect(page).to have_current_path(step_buyer_public_market_path(@market_identifier, :form_config))
+end
+
+When('I click the edit lots button') do
+ find("a[aria-label='#{I18n.t('buyer.public_markets.form_config.edit_lots_label')}']").click
+end
diff --git a/spec/presenters/public_market_presenter_spec.rb b/spec/presenters/public_market_presenter_spec.rb
index 80cc5fd3..e0a5ff0d 100644
--- a/spec/presenters/public_market_presenter_spec.rb
+++ b/spec/presenters/public_market_presenter_spec.rb
@@ -306,8 +306,8 @@
it 'returns the global type banner' do
text = presenter.platform_type_banner_text
- expect(text).to include(public_market.editor.name)
- expect(text).to include(I18n.t("market_types.#{market_type.code}"))
+ expect(text).to be_present
+ expect(text).to include('plateforme')
end
end
@@ -321,9 +321,8 @@
it 'returns the per-lot type banner' do
text = presenter.platform_type_banner_text
- expect(text).to include(public_market.editor.name)
- expect(text).not_to include(I18n.t("market_types.#{market_type.code}"))
- expect(text).not_to include(I18n.t("market_types.#{other_type.code}"))
+ expect(text).to be_present
+ expect(text).to include('plateforme')
end
end
end