103 lines
4.7 KiB
Gherkin
103 lines
4.7 KiB
Gherkin
@admin @bookings
|
|
Feature: Admin booking detail — read & edit
|
|
The admin booking-detail page replaces the spreadsheet — admins must be able
|
|
to *edit* every column they used to edit, not just look at it.
|
|
|
|
Background:
|
|
Given I am logged in as "christina@seminarhof.example" with password "admin1234"
|
|
When I visit "/admin/bookings/b_yoga_2026_summer"
|
|
|
|
# ── Read ────────────────────────────────────────────────────────────────
|
|
Scenario: admin opens the summer retreat detail
|
|
Then I see "Summer Yoga Retreat 2026"
|
|
And I see "Yoga Retreat e.V."
|
|
And I see "Teilnehmende"
|
|
|
|
Scenario: admin sees the seeded participant list
|
|
When I click "Teilnehmende"
|
|
Then I see "Anja Weber"
|
|
And I see "Bernd Krause"
|
|
|
|
# ── Edit booking metadata ───────────────────────────────────────────────
|
|
Scenario: admin edits the course name and persists across reload
|
|
When I fill "courseName" with "Summer Yoga Retreat 2026 — revised"
|
|
And I click "Änderungen speichern"
|
|
Then I see "Gespeichert"
|
|
When I visit "/admin/bookings/b_yoga_2026_summer"
|
|
Then I see "Summer Yoga Retreat 2026 — revised"
|
|
|
|
Scenario: admin updates expected participants
|
|
When I fill "expectedPersons" with "32"
|
|
And I click "Änderungen speichern"
|
|
Then I see "Gespeichert"
|
|
|
|
Scenario: admin toggles half-house and online listing flags
|
|
When I select "Ja" from "halfHouse"
|
|
And I select "Ja" from "onlineAd"
|
|
And I click "Änderungen speichern"
|
|
Then I see "Gespeichert"
|
|
|
|
Scenario: admin cannot save when no field changed
|
|
Then I see "Änderungen speichern"
|
|
# Save button is disabled until a field is touched — clicking has no effect.
|
|
|
|
# ── Edit organisation ──────────────────────────────────────────────────
|
|
Scenario: admin edits organisation contact email and phone
|
|
When I fill "organisation-email" with "ops@yoga-retreat.example"
|
|
And I fill "organisation-phone" with "+49 30 12345678"
|
|
And I click "Organisation speichern"
|
|
Then I see "Organisation gespeichert"
|
|
When I visit "/admin/bookings/b_yoga_2026_summer"
|
|
Then the field "organisation-email" has value "ops@yoga-retreat.example"
|
|
And the field "organisation-phone" has value "+49 30 12345678"
|
|
|
|
Scenario: organisation save rejects an invalid email
|
|
When I fill "organisation-email" with "not-an-email"
|
|
And I click "Organisation speichern"
|
|
Then I do not see "Organisation gespeichert"
|
|
|
|
# ── Booking status transitions ─────────────────────────────────────────
|
|
Scenario: admin cancels a booking
|
|
When I accept the next confirmation
|
|
And I click "Buchung stornieren"
|
|
Then I see "Storniert"
|
|
And I do not see "Buchung stornieren"
|
|
|
|
# ── Participants CRUD ──────────────────────────────────────────────────
|
|
Scenario: admin adds a participant
|
|
When I click "Teilnehmende"
|
|
And I fill "new-participant-name" with "Ingrid Vogel"
|
|
And I click "Hinzufügen"
|
|
Then I see "Ingrid Vogel"
|
|
|
|
Scenario: admin removes a participant
|
|
When I click "Teilnehmende"
|
|
And I accept the next confirmation
|
|
And I click "remove-participant-p_s_08"
|
|
Then I do not see "Hans Becker"
|
|
|
|
Scenario: admin changes a participant's diet
|
|
When I click "Teilnehmende"
|
|
And I select "Pescetarisch" from "participant-diet-p_s_06"
|
|
Then the field "participant-diet-p_s_06" has value "Pescetarisch"
|
|
|
|
# ── Allergies CRUD ─────────────────────────────────────────────────────
|
|
Scenario: admin adds an allergy to a participant
|
|
When I click "Teilnehmende"
|
|
And I fill "new-allergy-p_s_02" with "shellfish"
|
|
And I click "add-allergy-p_s_02"
|
|
Then I see "Meeresfrüchte"
|
|
|
|
Scenario: admin removes an existing allergy
|
|
When I click "Teilnehmende"
|
|
And I click "remove-allergy-p_s_01-nuts"
|
|
Then I do not see "nuts"
|
|
|
|
# ── Rooms assign / unassign ────────────────────────────────────────────
|
|
Scenario: admin assigns and then unassigns a participant to a room
|
|
When I click "Zimmer"
|
|
And I select "Anja Weber" from "assign-room-r_1"
|
|
Then I see "Anja Weber"
|
|
When I click "Entfernen"
|
|
Then the field "assign-room-r_1" has value ""
|