|
| 1 | +Feature: Mandataire selects lots and their response mode |
| 2 | + |
| 3 | + As a mandataire candidate |
| 4 | + I want to choose, for each lot, whether I apply alone, as part of the groupement, or not at all |
| 5 | + So that mixed scenarios are covered |
| 6 | + |
| 7 | + Background: |
| 8 | + Given the groupement feature flag is enabled |
| 9 | + And a multi-type public market with lots exists |
| 10 | + And a candidate starts a new application for the multi-type market |
| 11 | + |
| 12 | + @javascript |
| 13 | + Scenario: Mandataire in mixte mode sees the three options per lot |
| 14 | + When I choose the candidacy mode "mixte" |
| 15 | + Then I should see "Sélectionnez les lots pour la candidature" |
| 16 | + And each lot should offer the options "Seul", "En groupement" and "Ne pas répondre" |
| 17 | + |
| 18 | + @javascript |
| 19 | + Scenario: Mandataire in groupement-only mode sees only two options per lot |
| 20 | + When I choose the candidacy mode "groupement" |
| 21 | + Then each lot should offer the options "En groupement" and "Ne pas répondre" |
| 22 | + And the lot option "Seul" should not be visible |
| 23 | + |
| 24 | + @javascript |
| 25 | + Scenario: All lots are pre-selected on En groupement by default |
| 26 | + When I choose the candidacy mode "groupement" |
| 27 | + Then every lot should be set to "En groupement" |
| 28 | + |
| 29 | + @javascript |
| 30 | + Scenario: Continue button is disabled until at least one solo and one groupement lot are set in mixte mode |
| 31 | + When I choose the candidacy mode "mixte" |
| 32 | + And I set lot "Lot 1 - Gros œuvre" to "solo" |
| 33 | + And I set lot "Lot 2 - Charpente" to "solo" |
| 34 | + And I set lot "Lot 3 - Prestations SI" to "solo" |
| 35 | + Then the "Continuer" button should be disabled |
| 36 | + When I set lot "Lot 3 - Prestations SI" to "groupement" |
| 37 | + Then the "Continuer" button should be enabled |
| 38 | + |
| 39 | + @javascript |
| 40 | + Scenario: Continue button is disabled until at least one lot is set to groupement in groupement-only mode |
| 41 | + When I choose the candidacy mode "groupement" |
| 42 | + And I set lot "Lot 1 - Gros œuvre" to "none" |
| 43 | + And I set lot "Lot 2 - Charpente" to "none" |
| 44 | + And I set lot "Lot 3 - Prestations SI" to "none" |
| 45 | + Then the "Continuer" button should be disabled |
| 46 | + When I set lot "Lot 3 - Prestations SI" to "groupement" |
| 47 | + Then the "Continuer" button should be enabled |
| 48 | + |
| 49 | + @javascript |
| 50 | + Scenario: The mixed mode banner is shown in mixte mode |
| 51 | + When I choose the candidacy mode "mixte" |
| 52 | + Then I should see "Vous devez sélectionner au moins un lot" |
| 53 | + |
| 54 | + @javascript |
| 55 | + Scenario: The mixed mode banner is not shown in groupement-only mode |
| 56 | + When I choose the candidacy mode "groupement" |
| 57 | + Then I should not see "Vous devez sélectionner au moins un lot" |
| 58 | + |
| 59 | + @javascript |
| 60 | + Scenario: Lots are grouped by typology |
| 61 | + When I choose the candidacy mode "groupement" |
| 62 | + Then I should see a section for the lot typology "works" |
| 63 | + And I should see a section for the lot typology "services" |
| 64 | + |
| 65 | + @javascript |
| 66 | + Scenario: Applying a mode to a whole typology updates every lot of that section |
| 67 | + When I choose the candidacy mode "groupement" |
| 68 | + And I apply "Ne pas répondre" to the typology "works" |
| 69 | + Then every lot of the typology "works" should be set to "Ne pas répondre" |
| 70 | + And every lot of the typology "services" should be set to "En groupement" |
| 71 | + |
| 72 | + @javascript |
| 73 | + Scenario: A lot can be adjusted individually after a bulk action without affecting the others |
| 74 | + When I choose the candidacy mode "groupement" |
| 75 | + And I apply "Ne pas répondre" to the typology "works" |
| 76 | + And I set lot "Lot 1 - Gros œuvre" to "groupement" |
| 77 | + Then lot "Lot 1 - Gros œuvre" should be set to "En groupement" |
| 78 | + And lot "Lot 2 - Charpente" should be set to "Ne pas répondre" |
| 79 | + |
| 80 | + @javascript |
| 81 | + Scenario: Mandataire submits the lot selection and reaches the grouping legal type step |
| 82 | + When I choose the candidacy mode "groupement" |
| 83 | + And I set lot "Lot 1 - Gros œuvre" to "groupement" |
| 84 | + And I click on "Continuer" |
| 85 | + Then I should be on the grouping legal type step |
| 86 | + |
| 87 | + @javascript |
| 88 | + Scenario: Mandataire goes back from the grouping legal type step to review the lot selection |
| 89 | + When I choose the candidacy mode "groupement" |
| 90 | + And I set lot "Lot 1 - Gros œuvre" to "groupement" |
| 91 | + And I click on "Continuer" |
| 92 | + And I should be on the grouping legal type step |
| 93 | + And I click on "Précédent" |
| 94 | + Then I should see "Sélectionnez les lots pour la candidature" |
| 95 | + And lot "Lot 1 - Gros œuvre" should be set to "En groupement" |
0 commit comments