Skip to content

Add end-to-end scenarios for cancellations and search timeout (#11) - #42

Open
tribhuvneshsharma wants to merge 1 commit into
wncc:mainfrom
tribhuvneshsharma:issue-011-more-e2e-scenarios
Open

tribhuvneshsharma wants to merge 1 commit into
wncc:mainfrom
tribhuvneshsharma:issue-011-more-e2e-scenarios

Conversation

@tribhuvneshsharma

Copy link
Copy Markdown

Closes #11

What this PR does

Adds four end-to-end test scenarios in e2e/run_e2e.py covering cancellation flows and the no-drivers search timeout, along with backend configuration:

  1. Rider cancels while searching: Rider sees "Ride cancelled" and can book another ride.
  2. Rider cancels after driver assigned: Driver is notified on their trip screen and returned to home screen.
  3. Driver cancels after accepting: Driver returns home, and rider sees the search restart ("Finding you a driver").
  4. No drivers nearby: Search ends with "No drivers available right now" after the timeout.

Also updates Settings in backend/app/config.py so that search_timeout_seconds reads from the SEARCH_TIMEOUT_SECONDS environment variable (defaulting to 180), and adds a unit test in backend/tests/test_api.py.

Checklist

  • Assigned the issue before starting
  • Each scenario starts from a fresh login session (reset_session)
  • Handled browser confirmation/alert dialogs (page.on("dialog", ...))
  • Backend tests pass (pytest backend/tests/test_api.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More end-to-end scenarios: cancellations and "no drivers"

1 participant