Cliquer sur une recette de l'onglet Recettes de /cuisiner naviguait vers /recettes/:id, quittant la session de cuisine en cours. La ligne devient un bouton qui déplie désormais le détail complet de la recette directement sous elle (RecipeDetailPanel, showActions=false — même traitement "aperçu" que RecipePickerDialog), chargé à la demande via GET /recipes/:id, un seul dépliant ouvert à la fois (même logique que le sous-menu Paramètres de la sidebar). RecipesTab est désormais keyed par semaine comme PlanTab, pour que changer de semaine referme un dépliant devenu obsolète. Clé i18n recipesTab.viewRecipe supprimée (plus d'appelant). Tests : cooking-session-page.cy.ts (déplier/replier, un seul ouvert à la fois) + cooking-session.feature (scénario dédié). pnpm lint + pnpm --filter web build clean ; 16/16 tests passants (Chrome headless). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
73 lines
3.7 KiB
Gherkin
73 lines
3.7 KiB
Gherkin
Feature: Start cooking an optimized plan
|
|
As a member of a household with a planned week
|
|
I want to open an optimized cooking plan from my planning
|
|
So that shared preparation is pooled and I cook the week efficiently
|
|
|
|
Background:
|
|
Given I am signed in as "Alice" "Martin"
|
|
And my household id is 1
|
|
And today is frozen at "2026-08-17T09:00:00.000Z"
|
|
|
|
Scenario: The "Commencer à cuisiner" button is disabled while the week is empty
|
|
Given the planning request returns nothing
|
|
When I visit "/"
|
|
Then the "Commencer à cuisiner" button should be disabled
|
|
|
|
Scenario: Opening the plan from the planning shows the pooled prep in mise en place
|
|
Given the planning for this week has recipes "Soupe à l'oignon" and "Tarte à l'oignon"
|
|
And the cooking plan for "2026-08-17" pools "Hacher" of "Oignon" across both recipes
|
|
When I visit "/"
|
|
And I click the button "Commencer à cuisiner"
|
|
Then the URL should include "/cuisiner"
|
|
And I should see "Mise en place"
|
|
And the pooled prep task should mention "Hacher" and "Oignon"
|
|
And the pooled prep task should be flagged as shared
|
|
And the pooled prep task should sit in the recipe section "Soupe à l'oignon, Tarte à l'oignon"
|
|
|
|
Scenario: The stepper walks the phases one at a time
|
|
Given the planning for this week has recipes "Soupe à l'oignon" and "Tarte à l'oignon"
|
|
And the cooking plan for "2026-08-17" has a mise en place then a cooking step
|
|
When I visit "/cuisiner?date=2026-08-17"
|
|
Then the current cooking step should be "Étape 1 / 2"
|
|
And I should not see "Faire mijoter le bouillon"
|
|
When I go to the next cooking step
|
|
Then the current cooking step should be "Étape 2 / 2"
|
|
And I should see "Faire mijoter le bouillon"
|
|
When I go to the previous cooking step
|
|
Then the current cooking step should be "Étape 1 / 2"
|
|
|
|
Scenario: A ticked task stays ticked while moving through the stepper
|
|
Given the planning for this week has recipes "Soupe à l'oignon" and "Tarte à l'oignon"
|
|
And the cooking plan for "2026-08-17" has a mise en place then a cooking step
|
|
When I visit "/cuisiner?date=2026-08-17"
|
|
And I tick the cooking task "Hacher"
|
|
Then the cooking task "Hacher" should be done
|
|
When I go to the next cooking step
|
|
And I go to the previous cooking step
|
|
Then the cooking task "Hacher" should be done
|
|
|
|
Scenario: The Recettes tab lists the week's planned recipes
|
|
Given the planning for this week has recipes "Soupe à l'oignon" and "Tarte à l'oignon"
|
|
And the cooking plan for "2026-08-17" has a mise en place then a cooking step
|
|
When I visit "/cuisiner?date=2026-08-17"
|
|
And I open the "Recettes" cooking tab
|
|
Then I should see "Soupe à l'oignon"
|
|
|
|
Scenario: Clicking a recipe on the Recettes tab unfolds it instead of navigating away
|
|
Given the planning for this week has recipes "Soupe à l'oignon" and "Tarte à l'oignon"
|
|
And the cooking plan for "2026-08-17" has a mise en place then a cooking step
|
|
And recipe 1's detail is available
|
|
When I visit "/cuisiner?date=2026-08-17"
|
|
And I open the "Recettes" cooking tab
|
|
And I click the recipe "Soupe à l'oignon"
|
|
Then the recipe detail "Soupe à l'oignon" should be expanded
|
|
And the URL should include "/cuisiner"
|
|
|
|
Scenario: Two recipes preheat the oven to different temperatures
|
|
Given the planning for this week has recipes "Gratin" and "Rôti"
|
|
And the cooking plan for "2026-08-17" needs the oven at 180 °C and 210 °C
|
|
When I visit "/cuisiner?date=2026-08-17"
|
|
Then I should see the oven conflict note "enchaîner 180 °C puis 210 °C"
|
|
And I should see "Préchauffer le four à 180°C"
|
|
And I should see "Préchauffer le four à 210°C"
|
|
And I should see the recipe sections "Gratin" and "Rôti"
|