43 lines
2.0 KiB
Gherkin
43 lines
2.0 KiB
Gherkin
@booking @flow
|
|
Feature: Full booking flow — enquiry through confirmed
|
|
A client submits an enquiry via the public form. The admin then drives
|
|
the booking through every step: approval, contract, deposit, confirmation.
|
|
|
|
# ── Guest: submit enquiry ───────────────────────────────────────────────
|
|
Scenario: client submits an enquiry via the public form
|
|
Given I visit "/enquiry"
|
|
When I fill "courseName" with "E2E Full Flow Test"
|
|
And I fill "startDate" with "2028-06-15"
|
|
And I fill "endDate" with "2028-06-22"
|
|
And I fill "organisationName" with "E2E Organisation"
|
|
And I fill "contactEmail" with "e2e@example.com"
|
|
And I check "agbAccepted"
|
|
And I check "privacyAccepted"
|
|
And I click "Anfrage absenden"
|
|
Then I see "Ihre Anfrage ist eingegangen"
|
|
|
|
# ── Admin: full flow from enquiry to confirmed ──────────────────────────
|
|
Scenario: admin drives a booking from enquiry through to confirmed
|
|
Given I am logged in as "christina@seminarhof.example" with password "admin1234"
|
|
|
|
# 1. Open the seeded enquiry directly
|
|
When I visit "/admin/bookings/b_lc_enquiry"
|
|
|
|
# 2. Approve the enquiry → reserved
|
|
When I trigger booking action "action-approve-enquiry"
|
|
Then I see "Reserviert"
|
|
And the audit log tab includes "Reservierung bestätigt"
|
|
|
|
# 3. Send the contract manually (bypasses the 365-day cron window)
|
|
When I trigger booking action "action-send-contract"
|
|
Then the audit log tab includes "Vertrag & Anzahlungsrechnung"
|
|
|
|
# 4. Record the client's contract signature
|
|
When I trigger booking action "action-contract-approved"
|
|
Then I see "Anzahlung als erhalten markieren"
|
|
|
|
# 5. Record the deposit received → confirmed
|
|
When I trigger booking action "action-deposit-received"
|
|
Then I see "Bestätigt"
|
|
And the audit log tab includes "Buchung bestätigt"
|