Skip to content

Instantly share code, notes, and snippets.

@Amr1977
Created October 19, 2025 08:10
Show Gist options
  • Select an option

  • Save Amr1977/85597fe18ad464a96ee00c58fec192d8 to your computer and use it in GitHub Desktop.

Select an option

Save Amr1977/85597fe18ad464a96ee00c58fec192d8 to your computer and use it in GitHub Desktop.
Matrix Delivery
# P2P Delivery Platform - BDD Feature Files (Accumulative)
# Each scenario has a unique ID for reference
## ============================================================================
## PHASE 1: USER MANAGEMENT
## ============================================================================
Feature: User Registration and Authentication
As a new user
I want to register and login to the platform
So that I can use delivery services
Background:
Given the P2P delivery platform is running
And the database is clean
@UR-001
Scenario: Successful customer registration
Given I am on the registration page
When I fill in the registration form with:
| field | value |
| name | John Doe |
| email | john@example.com |
| password | SecurePass123! |
| phone | +1234567890 |
| user_type | customer |
And I submit the registration form
Then I should see a success message "Registration successful"
And I should receive a verification email at "john@example.com"
And my account should be created with:
| field | value |
| status | pending_verification |
| completed_orders | 0 |
| average_rating | 0 |
| member_since | 2025-10-19 |
@UR-002
Scenario: Successful driver registration
Given I am on the registration page
When I fill in the registration form with:
| field | value |
| name | Jane Driver |
| email | jane@example.com |
| password | SecurePass123! |
| phone | +1234567891 |
| user_type | driver |
| vehicle_type | bike |
And I submit the registration form
Then I should see a success message "Registration successful"
And I should receive a verification email at "jane@example.com"
And my account should be created with:
| field | value |
| status | pending_verification |
| completed_orders | 0 |
| average_rating | 0 |
| member_since | 2025-10-19 |
@UR-003
Scenario: Registration with existing email
Given a user exists with email "existing@example.com"
When I attempt to register with email "existing@example.com"
Then I should see an error message "Email already registered"
And no new account should be created
@UR-004
Scenario: Successful login
Given I am a registered user with:
| email | john@example.com |
| password | SecurePass123! |
| status | verified |
When I login with email "john@example.com" and password "SecurePass123!"
Then I should be redirected to the dashboard
And I should see a welcome message "Welcome back, John"
@UR-005
Scenario: Login with incorrect password
Given I am a registered user with email "john@example.com"
When I login with email "john@example.com" and password "WrongPassword"
Then I should see an error message "Invalid credentials"
And I should remain on the login page
## ============================================================================
## PHASE 2: ORDER PUBLICATION (CUSTOMER SIDE)
## ============================================================================
Feature: Order Publication by Customers
As a customer
I want to publish delivery orders
So that drivers can bid on them
Background:
Given I am logged in as a verified customer
And my profile shows:
| completed_orders | 15 |
| average_rating | 4.7 |
| member_since | 2025-01-15 |
@OP-001
Scenario: Publish a basic delivery order
Given I am on the create order page
When I fill in the order details:
| field | value |
| pickup_address | 123 Main St, New York, NY |
| delivery_address | 456 Oak Ave, Brooklyn, NY |
| package_size | small |
| package_weight | 2 kg |
| package_description| Books and documents |
| pickup_time | 2025-10-20 14:00 |
| delivery_notes | Call upon arrival |
And I submit the order
Then an order should be created with:
| field | value |
| status | published |
| order_number | ORD-001 |
And I should see my profile info displayed with the order:
| customer_name | John Doe |
| completed_orders | 15 |
| average_rating | 4.7 |
| member_since | 2025-01-15 |
And the order should be visible to all available drivers
@OP-002
Scenario: Publish urgent delivery order
Given I am on the create order page
When I create an order with:
| pickup_address | 123 Main St, New York, NY |
| delivery_address | 456 Oak Ave, Brooklyn, NY |
| package_size | medium |
| urgency | urgent |
| pickup_time | ASAP |
Then the order should be created with status "published"
And the order should be marked as "urgent"
And all active drivers within service area should be notified
@OP-003
Scenario: Publish scheduled order
Given I am on the create order page
When I create an order with:
| pickup_address | 123 Main St, New York, NY |
| delivery_address | 789 Park Ave, New York, NY |
| package_size | large |
| pickup_time | 2025-10-25 10:00 |
Then the order should be created with status "scheduled"
And the order should become visible to drivers 24 hours before pickup time
@OP-004
Scenario: View my published orders
Given I have published 3 orders
When I navigate to "My Orders" page
Then I should see all 3 orders listed
And each order should show:
| field |
| order_number |
| pickup_address |
| delivery_address |
| status |
| number_of_bids |
| created_at |
@OP-005
Scenario: Invalid order - missing required fields
Given I am on the create order page
When I submit an order without "delivery_address"
Then I should see an error message "Delivery address is required"
And the order should not be created
## ============================================================================
## PHASE 3: BIDDING SYSTEM (DRIVER SIDE)
## ============================================================================
Feature: Driver Bidding on Orders
As a driver
I want to view and bid on available orders
So that I can earn money by delivering packages
Background:
Given I am logged in as a verified driver
And my profile shows:
| completed_orders | 42 |
| average_rating | 4.9 |
| member_since | 2024-08-10 |
And my status is "available"
@DB-001
Scenario: View available orders
Given there are 5 published orders in my service area
When I navigate to the available orders page
Then I should see a list of 5 orders
And each order should display:
| field | example_value |
| order_number | ORD-001 |
| customer_name | John Doe |
| customer_rating | 4.7 |
| customer_orders | 15 completed |
| member_duration | Member since Jan 2025 |
| pickup_location | 123 Main St, New York, NY |
| delivery_location | 456 Oak Ave, Brooklyn, NY |
| package_size | small |
| pickup_time | Oct 20, 2:00 PM |
| distance | 8.5 km |
| current_bids | 3 bids |
@DB-002
Scenario: View customer profile from order listing
Given I am viewing order "ORD-001" by customer "John Doe"
When I click on the customer name or profile link
Then I should see the customer profile page with:
| field | value |
| name | John Doe |
| completed_orders | 15 |
| average_rating | 4.7 (5 stars display) |
| member_since | January 15, 2025 |
| member_duration | 9 months |
And I should see a "Reviews About Customer" section
And I should see a "Reviews By Customer" section
And I should see a "Report Profile" button
@DB-003
Scenario: View reviews about customer
Given I am viewing customer profile for "John Doe"
And the customer has received 12 reviews
When I navigate to "Reviews About Customer" section
Then I should see 12 reviews from drivers
And each review should show:
| field |
| reviewer_name |
| reviewer_rating |
| rating_stars |
| review_text |
| order_date |
| order_number |
And reviews should be sorted by most recent first
@DB-004
Scenario: View reviews by customer
Given I am viewing customer profile for "John Doe"
And the customer has written 15 reviews
When I navigate to "Reviews By Customer" section
Then I should see 15 reviews written by this customer
And each review should show:
| field |
| driver_name |
| rating_stars |
| review_text |
| order_date |
| order_number |
@DB-005
Scenario: Place a bid on an order
Given order "ORD-001" is published
And I am viewing the order details
When I click "Place Bid"
And I enter bid details:
| field | value |
| bid_amount | 25.00 |
| estimated_time | 45 minutes |
| message_to_customer | I have 5-star rating and can pickup immediately |
And I submit my bid
Then my bid should be created with status "pending"
And the bid should include my driver information:
| field | value |
| driver_name | Jane Driver |
| completed_orders | 42 |
| average_rating | 4.9 |
| member_since | 2024-08-10 |
And the customer should receive a notification about my bid
And I should see "Bid placed successfully"
@DB-006
Scenario: View my active bids
Given I have placed bids on 4 orders
When I navigate to "My Bids" page
Then I should see all 4 bids listed
And each bid should show:
| field |
| order_number |
| customer_name |
| my_bid_amount |
| bid_status |
| total_bids_on_order |
| bid_placed_at |
@DB-007
Scenario: Place multiple bids as driver
Given I have already placed a bid on order "ORD-001"
When I attempt to place another bid on "ORD-001"
Then I should see an error message "You have already placed a bid on this order"
And no new bid should be created
@DB-008
Scenario: Edit my pending bid
Given I have placed a bid on order "ORD-001" with amount "25.00"
And the bid status is "pending"
When I navigate to my bid details
And I click "Edit Bid"
And I change the bid amount to "22.00"
And I submit the updated bid
Then my bid should be updated with amount "22.00"
And the customer should receive notification about the updated bid
@DB-009
Scenario: Withdraw my bid
Given I have placed a bid on order "ORD-001"
And the bid status is "pending"
When I navigate to my bid details
And I click "Withdraw Bid"
And I confirm the withdrawal
Then my bid should be removed
And I should see "Bid withdrawn successfully"
## ============================================================================
## PHASE 4: BID ACCEPTANCE & ORDER ASSIGNMENT
## ============================================================================
Feature: Customer Accepting Bids and Order Assignment
As a customer
I want to review and accept bids
So that my order can be assigned to a driver
Background:
Given I am logged in as a customer
And I have published order "ORD-001"
And the order has received 5 bids
@BA-001
Scenario: View bids on my order
Given I am viewing order "ORD-001"
When I navigate to the "Bids" section
Then I should see 5 bids listed
And each bid should display:
| field | example_value |
| driver_name | Jane Driver |
| driver_rating | 4.9 |
| driver_orders | 42 completed |
| member_duration | Member since Aug 2024 |
| bid_amount | $25.00 |
| estimated_time | 45 minutes |
| message | I can pickup immediately |
| bid_placed_at | 2 hours ago |
And bids should be sortable by:
| price_low_to_high |
| price_high_to_low |
| rating_high_to_low |
| time_earliest |
@BA-002
Scenario: View driver profile from bid listing
Given I am viewing bids for order "ORD-001"
When I click on driver name "Jane Driver"
Then I should see the driver profile page with:
| field | value |
| name | Jane Driver |
| completed_orders | 42 |
| average_rating | 4.9 |
| member_since | August 10, 2024 |
| member_duration | 1 year 2 months |
| vehicle_type | bike |
And I should see a "Reviews About Driver" section
And I should see a "Reviews By Driver" section
And I should see a "Report Profile" button
@BA-003
Scenario: View reviews about driver
Given I am viewing driver profile for "Jane Driver"
And the driver has received 38 reviews
When I navigate to "Reviews About Driver" section
Then I should see 38 reviews from customers
And each review should show:
| field |
| reviewer_name |
| rating_stars |
| review_text |
| order_date |
| order_number |
And I should see review statistics:
| 5_star_count | 30 reviews |
| 4_star_count | 6 reviews |
| 3_star_count | 2 reviews |
| 2_star_count | 0 reviews |
| 1_star_count | 0 reviews |
@BA-004
Scenario: Accept a bid and assign order
Given I am viewing bids for order "ORD-001"
And driver "Jane Driver" has bid $25.00
When I click "Accept Bid" on Jane's bid
And I confirm the acceptance
Then the bid should be marked as "accepted"
And all other bids should be marked as "rejected"
And the order status should change to "assigned"
And the order should be assigned to driver "Jane Driver"
And Jane should receive notification "Your bid has been accepted"
And other drivers should be notified their bids were not selected
And I should see "Order assigned to Jane Driver"
@BA-005
Scenario: Reject a specific bid
Given I am viewing bids for order "ORD-001"
And driver "Bob Smith" has bid $35.00
When I click "Reject Bid" on Bob's bid
And I optionally provide rejection reason "Price too high"
Then Bob's bid should be marked as "rejected"
And Bob should receive notification about rejection
And the bid should no longer appear in my active bids list
@BA-006
Scenario: Cannot accept multiple bids on same order
Given I have accepted a bid from "Jane Driver" for order "ORD-001"
When I attempt to accept another bid from "Bob Smith"
Then I should see an error message "Order already assigned"
And Bob's bid should remain in "pending" status
And no changes should be made to the assignment
@BA-007
Scenario: View assigned order details
Given I have accepted a bid and assigned order "ORD-001" to "Jane Driver"
When I view the order details
Then I should see:
| field | value |
| status | assigned |
| assigned_driver | Jane Driver |
| driver_rating | 4.9 |
| agreed_price | $25.00 |
| estimated_pickup | Oct 20, 2:00 PM |
And I should see a "Contact Driver" button
And I should see a "Track Order" button
## ============================================================================
## PHASE 5: ORDER EXECUTION
## ============================================================================
Feature: Driver Executing Assigned Orders
As a driver
I want to pickup and deliver assigned orders
So that I can complete the delivery and earn payment
Background:
Given I am logged in as driver "Jane Driver"
And order "ORD-001" has been assigned to me
And the order status is "assigned"
@OE-001
Scenario: View my assigned orders
Given I have 2 assigned orders
When I navigate to "My Assigned Orders" page
Then I should see 2 orders listed
And each order should show:
| field |
| order_number |
| customer_name |
| pickup_address |
| delivery_address |
| pickup_time |
| agreed_price |
| status |
And I should see action buttons for each order
@OE-002
Scenario: Start order execution
Given I am viewing assigned order "ORD-001"
When I click "Start Pickup"
Then the order status should change to "in_progress"
And the customer should be notified "Driver is on the way"
And I should see navigation to pickup location
And the customer should be able to track my location
@OE-003
Scenario: Confirm pickup
Given order "ORD-001" is in status "in_progress"
And I have arrived at the pickup location
When I click "Confirm Pickup"
And I upload a photo of the package
And I enter package verification code "PKG123"
And I confirm package received
Then the order status should change to "picked_up"
And the customer should be notified "Package picked up"
And I should see navigation to delivery address
And estimated delivery time should be calculated
@OE-004
Scenario: Confirm delivery completion
Given order "ORD-001" is in status "picked_up"
And I have arrived at the delivery location
When I click "Complete Delivery"
And I upload a delivery proof photo
And I obtain recipient confirmation:
| method | signature |
| recipient_name | Alice Smith |
Then the order status should change to "delivered"
And the customer should be notified "Package delivered"
And I should see "Delivery completed successfully"
And the payment should be processed
And I should be prompted to rate the customer
@OE-005
Scenario: Report issue during pickup
Given order "ORD-001" is in status "in_progress"
When I click "Report Issue"
And I select issue type "Customer not available"
And I provide details "Called customer 3 times, no answer"
And I upload supporting evidence photo
Then the order status should change to "issue_reported"
And the customer should be notified immediately
And support team should be notified
And I should see "Issue reported, awaiting resolution"
@OE-006
Scenario: Report issue during delivery
Given order "ORD-001" is in status "picked_up"
And I am at the delivery location
When I report issue "Recipient not available"
And I provide details "Address is a vacant building"
Then the order status should change to "issue_reported"
And the customer should be notified
And I should receive instructions from support
And the package should remain in my custody
@OE-007
Scenario: Cancel assigned order before pickup
Given order "ORD-001" is in status "assigned"
And I have not started pickup
When I click "Cancel Order"
And I provide cancellation reason "Emergency - vehicle breakdown"
And I confirm cancellation
Then the order should return to "published" status
And my cancellation count should be incremented
And the customer should be notified
And other drivers should be able to bid again
And I should see "Order cancelled"
## ============================================================================
## PHASE 6: RATING & REVIEW SYSTEM
## ============================================================================
Feature: Mutual Rating and Review After Order Completion
As a user
I want to rate and review the other party after order completion
So that the platform maintains quality and trust
Background:
Given order "ORD-001" has been completed with status "delivered"
And the order was between customer "John Doe" and driver "Jane Driver"
@RR-001
Scenario: Customer rates driver after delivery
Given I am logged in as customer "John Doe"
And I have not yet rated order "ORD-001"
When I navigate to completed order "ORD-001"
And I click "Rate Driver"
And I select 5 stars
And I write review "Excellent service! Very professional and fast delivery"
And I optionally select review tags:
| professional |
| on_time |
| careful_with_package|
And I submit the rating
Then the rating should be saved with:
| order_id | ORD-001 |
| reviewer | John Doe (customer) |
| reviewee | Jane Driver (driver) |
| rating | 5 |
| review_text | Excellent service... |
| review_date | 2025-10-19 |
And Jane's average rating should be recalculated
And Jane's completed orders count should be incremented
And I should see "Rating submitted successfully"
@RR-002
Scenario: Driver rates customer after delivery
Given I am logged in as driver "Jane Driver"
And I have not yet rated order "ORD-001"
When I navigate to completed order "ORD-001"
And I click "Rate Customer"
And I select 5 stars
And I write review "Great customer! Package was ready and location instructions were clear"
And I optionally select review tags:
| package_ready |
| clear_instructions |
| respectful |
And I submit the rating
Then the rating should be saved with:
| order_id | ORD-001 |
| reviewer | Jane Driver (driver) |
| reviewee | John Doe (customer) |
| rating | 5 |
And John's average rating should be recalculated
And John's completed orders count should be incremented
And I should see "Rating submitted successfully"
@RR-003
Scenario: Mutual rating completion
Given both customer and driver have rated order "ORD-001"
When either party views the order details
Then they should see both ratings displayed
And the ratings should be marked as "mutual review completed"
@RR-004
Scenario: Rating reminder notification
Given order "ORD-001" was delivered 24 hours ago
And I have not yet submitted a rating
When the rating reminder is triggered
Then I should receive a notification "Don't forget to rate your delivery"
And I should receive an email reminder
@RR-005
Scenario: Cannot rate same order twice
Given I have already rated order "ORD-001"
When I attempt to rate the same order again
Then I should see an error message "You have already rated this order"
And no new rating should be created
@RR-006
Scenario: Edit rating within 24 hours
Given I rated order "ORD-001" 2 hours ago with 4 stars
When I click "Edit Rating"
And I change the rating to 5 stars
And I update the review text
And I submit the changes
Then my rating should be updated
And the reviewee's average rating should be recalculated
And the rating should show "Edited" indicator
@RR-007
Scenario: Cannot edit rating after 24 hours
Given I rated order "ORD-001" 25 hours ago
When I attempt to edit the rating
Then I should see a message "Rating can only be edited within 24 hours"
And the edit option should be disabled
## ============================================================================
## PHASE 7: USER PROFILE & REPUTATION
## ============================================================================
Feature: User Profile Display and Reputation Management
As a user
I want to view comprehensive profile information
So that I can assess reputation and trustworthiness
Background:
Given the platform has active users
@UP-001
Scenario: View my own profile as customer
Given I am logged in as customer "John Doe"
And I have the following statistics:
| completed_orders | 15 |
| average_rating | 4.7 |
| member_since | 2025-01-15 |
| total_spent | $425.00 |
When I navigate to "My Profile" page
Then I should see my profile displaying:
| field | value |
| name | John Doe |
| user_type | Customer |
| completed_orders | 15 orders |
| average_rating | 4.7 ★★★★★ |
| member_since | January 15, 2025 |
| member_duration | 9 months |
| total_spent | $425.00 |
And I should see a "Reviews About Me" link with count "(12 reviews)"
And I should see a "Reviews By Me" link with count "(15 reviews)"
And I should see an "Edit Profile" button
@UP-002
Scenario: View my own profile as driver
Given I am logged in as driver "Jane Driver"
And I have the following statistics:
| completed_orders | 42 |
| average_rating | 4.9 |
| member_since | 2024-08-10 |
| total_earned | $1,250.00 |
| acceptance_rate | 95% |
When I navigate to "My Profile" page
Then I should see my profile displaying:
| field | value |
| name | Jane Driver |
| user_type | Driver |
| vehicle_type | Bike |
| completed_orders | 42 deliveries |
| average_rating | 4.9 ★★★★★ |
| member_since | August 10, 2024 |
| member_duration | 1 year 2 months |
| total_earned | $1,250.00 |
| acceptance_rate | 95% |
And I should see a "Reviews About Me" link with count "(38 reviews)"
And I should see a "Reviews By Me" link with count "(40 reviews)"
@UP-003
Scenario: View another user's public profile
Given I am logged in as customer "John Doe"
When I view the profile of driver "Jane Driver"
Then I should see public profile information:
| field | value |
| name | Jane Driver |
| user_type | Driver |
| completed_orders | 42 deliveries |
| average_rating | 4.9 |
| member_since | August 10, 2024 |
| member_duration | 1 year 2 months |
And I should see "Reviews About Jane" link
And I should see "Reviews By Jane" link
And I should see a "Report Profile" button
And I should NOT see private information like:
| total_earned |
| contact_details |
| personal_address |
@UP-004
Scenario: View reviews about me
Given I am viewing my profile as "John Doe"
And I have received 12 reviews
When I click on "Reviews About Me (12)"
Then I should see a page with all 12 reviews
And each review should display:
| field |
| reviewer_name |
| reviewer_type |
| rating_stars |
| review_text |
| review_tags |
| order_number |
| review_date |
And reviews should be sortable by:
| most_recent |
| highest_rating |
| lowest_rating |
And I should see rating distribution:
| 5_stars | 8 reviews (67%) |
| 4_stars | 3 reviews (25%) |
| 3_stars | 1 review (8%) |
@UP-005
Scenario: View reviews by me
Given I am viewing my profile as "John Doe"
And I have written 15 reviews
When I click on "Reviews By Me (15)"
Then I should see a page with all 15 reviews I wrote
And each review should display:
| field |
| reviewee_name |
| reviewee_type |
| rating_stars |
| review_text |
| order_number |
| review_date |
And I should be able to see which orders I reviewed
And I should see an "Edit" option for reviews within 24 hours
@UP-006
Scenario: Report a user profile
Given I am viewing the profile of user "Bob Smith"
When I click the "Report Profile" button
Then I should see a report form with:
| field | options |
| report_reason | dropdown with options |
| message | text area |
And report reason options should include:
| Fake profile |
| Fraudulent activity |
| Inappropriate behavior |
| Harassment |
| Spam |
| Other |
@UP-007
Scenario: Submit profile report
Given I am viewing the profile of user "Bob Smith"
And I clicked "Report Profile"
When I select report reason "Inappropriate behavior"
And I enter message "User was rude and unprofessional during delivery"
And I optionally attach evidence:
| screenshot1.jpg |
| chat_log.txt |
And I submit the report
Then the report should be created with:
| reporter | John Doe |
| reported_user | Bob Smith |
| reason | Inappropriate behavior |
| status | pending_review |
| submitted_at | 2025-10-19 |
And I should see "Report submitted successfully. Our team will review it"
And admin team should be notified about the report
And I should not be able to report the same user again for 7 days
@UP-008
Scenario: View profile statistics summary
Given I am viewing driver profile "Jane Driver"
When I scroll to statistics section
Then I should see a statistics card displaying:
| metric | value |
| completed_orders | 42 |
| average_rating | 4.9 out of 5 |
| rating_count | 38 ratings |
| on_time_rate | 98% |
| member_since | Aug 2024 (1y 2m) |
| response_time | Average 5 minutes |
And statistics should be displayed with visual indicators
And achievements/badges should be shown if applicable:
| Top Rated Driver |
| 50+ Deliveries |
| Perfect Month |
@UP-009
Scenario: Private profile information visibility
Given I am viewing my own profile
Then I should see private information:
| email |
| phone_number |
| total_earnings |
| payment_methods |
| bank_details |
When another user views my profile
Then they should NOT see any private information
And they should only see public reputation data
## ============================================================================
## PHASE 8: TRACKING AND REAL-TIME UPDATES
## ============================================================================
Feature: Order Tracking and Real-Time Updates
As a customer
I want to track my order in real-time
So that I know the status and location of my delivery
Background:
Given I am logged in as customer "John Doe"
And order "ORD-001" has been assigned to driver "Jane Driver"
@TR-001
Scenario: View order tracking page
Given order "ORD-001" status is "picked_up"
When I click "Track Order" for "ORD-001"
Then I should see a tracking page with:
| field | value |
| order_number | ORD-001 |
| current_status | Package Picked Up |
| driver_name | Jane Driver |
| driver_photo | profile image |
| driver_rating | 4.9 |
And I should see a map showing:
| pickup_location | marked with pin |
| delivery_location | marked with pin |
| driver_location | moving marker |
| route | drawn path |
And I should see estimated time of arrival
@TR-002
Scenario: Real-time driver location updates
Given I am on the tracking page for order "ORD-001"
And the driver is in transit
When the driver's location changes
Then the map should update automatically without refresh
And the driver marker should move smoothly
And the ETA should be recalculated
@TR-003
Scenario: Status timeline display
Given I am viewing tracking for order "ORD-001"
Then I should see a timeline showing:
| status | timestamp | icon |
| Order Created | Oct 19, 1:00 PM | ✓ |
| Driver Assigned | Oct 19, 1:15 PM | ✓ |
| Driver En Route | Oct 19, 1:30 PM | ✓ |
| Package Picked Up | Oct 19, 1:45 PM | ✓ |
| In Transit | Oct 19, 1:45 PM | current |
| Delivered | Estimated 2:30 PM | pending |
And completed statuses should be marked with checkmarks
And current status should be highlighted
@TR-004
Scenario: Receive status change notifications
Given I have order "ORD-001" in progress
When the driver confirms pickup
Then I should receive a push notification "Your package has been picked up"
And the tracking page should update automatically
And I should receive an SMS if configured
@TR-005
Scenario: Contact driver from tracking page
Given I am on tracking page for order "ORD-001"
When I click "Contact Driver"
Then I should see communication options:
| Call Driver (masked number) |
| Send Message |
And phone numbers should be masked for privacy
And messages should be logged in order history
@TR-006
Scenario: Driver shares live ETA
Given order "ORD-001" is in status "picked_up"
And I am tracking the order
When the driver's ETA changes due to traffic
Then I should see the updated ETA automatically
And I should receive notification if delay exceeds 15 minutes
@TR-007
Scenario: View delivery proof after completion
Given order "ORD-001" has been delivered
When I view the order details
Then I should see delivery proof section with:
| delivery_photo | image uploaded by driver |
| delivery_time | Oct 19, 2:28 PM |
| recipient_signature | digital signature |
| recipient_name | Alice Smith |
| gps_coordinates | location where delivered |
And I should be able to download the proof
## ============================================================================
## PHASE 9: COMMUNICATION SYSTEM
## ============================================================================
Feature: In-App Communication Between Users
As a user
I want to communicate with the other party
So that I can coordinate delivery details
Background:
Given order "ORD-001" exists between customer "John Doe" and driver "Jane Driver"
And the order status is "assigned"
@CM-001
Scenario: Send message to driver
Given I am logged in as customer "John Doe"
And I am viewing order "ORD-001"
When I click "Message Driver"
Then I should see a chat interface
When I type message "I'll be waiting in the lobby"
And I send the message
Then the message should be delivered to driver "Jane Driver"
And the message should be saved in order chat history
And Jane should receive a notification
@CM-002
Scenario: Send message to customer
Given I am logged in as driver "Jane Driver"
And I am viewing assigned order "ORD-001"
When I click "Message Customer"
And I send message "I'm 5 minutes away from pickup"
Then the message should be delivered to customer "John Doe"
And John should receive notification
And the message should be logged
@CM-003
Scenario: View chat history
Given order "ORD-001" has 5 messages exchanged
When I open the chat for this order
Then I should see all 5 messages in chronological order
And each message should show:
| sender_name |
| message_text |
| timestamp |
| read_status |
@CM-004
Scenario: Receive real-time message notifications
Given I am logged in
And I have order "ORD-001" active
When the other party sends me a message
Then I should see a notification badge
And I should hear notification sound if enabled
And the message should appear in chat without refresh
@CM-005
Scenario: Call with masked phone numbers
Given I am viewing order "ORD-001"
When I click "Call Driver"
Then a phone call should be initiated
And both phone numbers should be masked through platform
And the call should be connected via proxy number
And call duration should be logged
@CM-006
Scenario: Message restrictions after order completion
Given order "ORD-001" was completed 8 days ago
When I attempt to send a new message
Then I should see "Messaging is disabled for orders older than 7 days"
And I should be directed to contact support instead
@CM-007
Scenario: Block inappropriate messages
Given I am sending a message
When the message contains inappropriate content or personal contact info
Then I should see a warning "Message contains restricted content"
And the message should not be sent
And I should see content policy reminder
@CM-008
Scenario: Report inappropriate message
Given I received an inappropriate message from another user
When I long-press or right-click the message
And I select "Report Message"
And I select reason "Harassment"
And I submit the report
Then the message should be flagged for admin review
And I should see "Message reported"
And I should have option to block the user
## ============================================================================
## PHASE 10: PAYMENT SYSTEM
## ============================================================================
Feature: Payment Processing and Management
As a user
I want secure payment processing
So that transactions are completed safely
Background:
Given the payment system is integrated
@PM-001
Scenario: Customer adds payment method
Given I am logged in as customer "John Doe"
And I am on my profile page
When I navigate to "Payment Methods"
And I click "Add Payment Method"
And I enter credit card details:
| card_number | 4111111111111111 |
| expiry_date | 12/26 |
| cvv | 123 |
| cardholder_name | John Doe |
| billing_zip | 10001 |
And I submit the payment method
Then the payment method should be saved securely
And I should see masked card "•••• 1111"
And I should see "Payment method added successfully"
@PM-002
Scenario: Set default payment method
Given I have 3 payment methods saved
When I select payment method "•••• 5555"
And I click "Set as Default"
Then this card should be marked as default
And it should be used for future orders automatically
@PM-003
Scenario: Payment hold on order assignment
Given I am customer with order "ORD-001"
And the agreed price is $25.00
When I accept a bid and assign the order
Then $25.00 should be placed on hold on my payment method
And I should see "Payment authorized: $25.00"
And the hold should be temporary until delivery completion
@PM-004
Scenario: Automatic payment release on delivery
Given order "ORD-001" has $25.00 on hold
And the order status changes to "delivered"
When both parties confirm delivery
Then the $25.00 should be captured from my payment method
And platform fee (15%) should be deducted: $3.75
And driver should receive: $21.25
And I should receive payment receipt via email
@PM-005
Scenario: View payment history
Given I am logged in as customer
When I navigate to "Payment History"
Then I should see all my transactions:
| order_number | amount | date | status |
| ORD-001 | $25.00 | Oct 19 | Completed |
| ORD-002 | $18.50 | Oct 15 | Completed |
| ORD-003 | $30.00 | Oct 12 | Refunded |
And I should be able to download invoices
And I should see total spent
@PM-006
Scenario: Driver views earnings
Given I am logged in as driver "Jane Driver"
When I navigate to "My Earnings"
Then I should see earnings dashboard:
| today_earnings | $65.00 |
| week_earnings | $385.00 |
| month_earnings | $1,250.00 |
| total_earnings | $5,680.00 |
| available_balance | $215.00 |
| pending_balance | $85.00 |
And I should see recent transactions list
@PM-007
Scenario: Driver requests payout
Given I am logged in as driver
And my available balance is $215.00
When I click "Request Payout"
And I select payout method "Bank Transfer"
And I enter amount $200.00
And I confirm the payout request
Then a payout should be initiated
And I should see "Payout requested: $200.00"
And my available balance should be reduced to $15.00
And I should receive payout within 2-3 business days
@PM-008
Scenario: Add bank account for payouts
Given I am logged in as driver
When I navigate to "Payout Methods"
And I click "Add Bank Account"
And I enter bank details:
| account_holder | Jane Driver |
| account_number | 123456789 |
| routing_number | 987654321 |
| account_type | Checking |
And I submit bank account details
Then the account should be verified
And I should see masked account "•••• 6789"
@PM-009
Scenario: Refund for cancelled order
Given order "ORD-001" was assigned with payment hold $25.00
When the order is cancelled due to "Driver unavailable"
Then the payment hold should be released
And I should receive full refund $25.00
And I should see "Refund processed: $25.00"
And refund should appear in my payment method within 5-7 days
@PM-010
Scenario: Dispute resolution payment handling
Given order "ORD-001" has a dispute
And payment $25.00 is on hold
When admin resolves dispute in favor of customer
Then full refund should be issued to customer
And driver should not receive payment
When admin resolves in favor of driver
Then driver should receive full payment $21.25
And no refund should be issued to customer
@PM-011
Scenario: Apply promo code to order
Given I am creating a new order
And the calculated price is $25.00
When I enter promo code "NEWUSER20"
And the promo code is valid for 20% off
Then the order price should be reduced to $20.00
And I should see "Promo applied: -$5.00"
And the driver still receives full amount minus platform fee
## ============================================================================
## PHASE 11: ADMIN MANAGEMENT
## ============================================================================
Feature: Admin Platform Management
As an admin
I want to manage the platform
So that operations run smoothly and issues are resolved
Background:
Given I am logged in as administrator
@AM-001
Scenario: View admin dashboard
When I navigate to admin dashboard
Then I should see platform statistics:
| metric | value |
| active_orders | 45 |
| pending_orders | 12 |
| completed_today | 67 |
| active_drivers | 128 |
| active_customers | 342 |
| pending_reports | 8 |
| revenue_today | $2,450.00 |
| pending_disputes | 3 |
And I should see charts for:
| Orders over time |
| Revenue trends |
| User growth |
| Average ratings |
@AM-002
Scenario: View all active orders
Given there are 45 active orders
When I navigate to "Orders Management"
Then I should see a list of all 45 orders
And I should be able to filter by:
| status |
| date_range |
| customer |
| driver |
| price_range |
And I should be able to search by order number
@AM-003
Scenario: View reported profiles
Given there are 8 pending profile reports
When I navigate to "User Reports"
Then I should see all 8 reports listed
And each report should show:
| reporter_name |
| reported_user |
| report_reason |
| report_date |
| status |
| evidence_count |
And I should be able to sort by date or severity
@AM-004
Scenario: Review and resolve profile report
Given there is a report against user "Bob Smith"
When I click on the report to view details
Then I should see complete report information:
| reporter | John Doe |
| reported_user | Bob Smith |
| reason | Inappropriate behavior |
| message | User was rude... |
| evidence_files | 2 attachments |
| report_date | Oct 18, 2025 |
And I should see Bob's user profile and history
And I should see action options:
| Dismiss Report |
| Issue Warning |
| Suspend Account (temp) |
| Ban Account (permanent) |
| Contact User for Info |
@AM-005
Scenario: Suspend user account
Given user "Bob Smith" violated policies
When I select "Suspend Account"
And I select suspension duration "7 days"
And I enter reason "Repeated inappropriate behavior"
And I confirm suspension
Then Bob's account should be suspended
And Bob should not be able to login
And Bob's active orders should be handled:
| as_customer | reassign to other drivers |
| as_driver | return orders to published |
And Bob should receive email notification with reason
And suspension should auto-expire after 7 days
@AM-006
Scenario: Ban user account permanently
Given user "Scammer123" is involved in fraudulent activity
When I select "Ban Account"
And I enter reason "Confirmed fraudulent activity"
And I check "Blacklist email and phone"
And I confirm ban
Then the account should be permanently banned
And all associated payment methods should be blocked
And email and phone should be blacklisted
And user cannot create new accounts with same details
@AM-007
Scenario: Handle order dispute
Given order "ORD-001" has a dispute
And the dispute reason is "Package damaged"
When I view the dispute details
Then I should see:
| order_details |
| customer_claim |
| driver_response |
| evidence_photos |
| chat_history |
| delivery_proof |
And I should see resolution options:
| Full refund to customer |
| Partial refund |
| No refund - favor driver |
| Request more information |
@AM-008
Scenario: Resolve dispute in customer favor
Given I am reviewing dispute for order "ORD-001"
And payment $25.00 is on hold
When I select "Full refund to customer"
And I enter resolution notes "Package clearly damaged in photos"
And I confirm resolution
Then customer should receive full refund $25.00
And driver should not receive payment
And both parties should be notified of decision
And dispute should be marked as "resolved"
And incident should be noted in driver's record
@AM-009
Scenario: View platform analytics
Given I am on admin dashboard
When I navigate to "Analytics"
And I select date range "Last 30 days"
Then I should see detailed analytics:
| metric | value |
| total_orders | 1,245 |
| completion_rate | 94% |
| average_order_value | $23.50 |
| total_revenue | $29,257.50 |
| platform_fees | $4,388.63 |
| average_delivery_time | 42 minutes |
| customer_satisfaction | 4.6/5 |
| driver_satisfaction | 4.5/5 |
| cancellation_rate | 6% |
| dispute_rate | 2% |
And I should see breakdowns by:
| Time of day |
| Day of week |
| Geographic area |
| Package size |
@AM-010
Scenario: Manage promo codes
When I navigate to "Promo Codes"
And I click "Create Promo Code"
And I enter promo details:
| code | SUMMER25 |
| discount_type | Percentage |
| discount_value | 25 |
| valid_from | 2025-06-01 |
| valid_until | 2025-08-31 |
| usage_limit | 1000 |
| min_order_value | $15.00 |
| user_limit | 1 per user |
And I save the promo code
Then the promo code should be created and active
And users should be able to apply it to orders
@AM-011
Scenario: View user details and history
When I search for user "John Doe"
And I click on their profile
Then I should see comprehensive user information:
| personal_info | name, email, phone, joined |
| account_status | active, verified |
| statistics | orders, rating, spent |
| order_history | all orders with details |
| payment_history | all transactions |
| reports_about | reports filed against user |
| reports_by | reports filed by user |
| notes | admin notes about user |
And I should be able to add admin notes
And I should see action buttons for account management
@AM-012
Scenario: Manually reassign order
Given order "ORD-001" is assigned to driver "Jane Driver"
And Jane reports she cannot complete it due to emergency
When I view the order details
And I click "Reassign Order"
And I search for available drivers nearby
And I select driver "Tom Wilson"
And I confirm reassignment with note "Original driver emergency"
Then order should be reassigned to Tom
And Jane should be notified
And Tom should receive assignment notification
And customer should be notified of driver change
And no penalty should apply to Jane
## ============================================================================
## PHASE 12: NOTIFICATIONS & PREFERENCES
## ============================================================================
Feature: Notification System and User Preferences
As a user
I want to manage my notification preferences
So that I receive relevant updates in my preferred way
Background:
Given I am a registered user
@NP-001
Scenario: Configure notification preferences
Given I am logged in
When I navigate to "Settings" > "Notifications"
Then I should see notification options:
| category | push | email | sms |
| Order Updates | ✓ | ✓ | ✓ |
| New Bids | ✓ | ✓ | □ |
| Messages | ✓ | □ | □ |
| Payment | ✓ | ✓ | ✓ |
| Promotions | □ | □ | □ |
| Rating Reminders | ✓ | ✓ | □ |
And I should be able to toggle each option
When I disable email for "Messages"
And I save preferences
Then my preferences should be updated
And I should only receive push notifications for messages
@NP-002
Scenario: Receive order status notifications
Given I have enabled all notification channels
And I have an active order "ORD-001"
When the order status changes to "picked_up"
Then I should receive:
| channel | message |
| push | Your package has been picked up |
| email | Order ORD-001 Update |
| sms | Package picked up by Jane |
And each notification should include order tracking link
@NP-003
Scenario: Receive new bid notifications as customer
Given I am a customer with published order "ORD-001"
And I have enabled bid notifications
When a driver places a bid on my order
Then I should receive notification "New bid received on order ORD-001"
And the notification should show:
| driver_name |
| bid_amount |
| driver_rating |
And I should be able to view bid details from notification
@NP-004
Scenario: Receive bid acceptance notification as driver
Given I am a driver who placed bid on order "ORD-001"
When the customer accepts my bid
Then I should receive notification "Your bid has been accepted!"
And the notification should include:
| order_number |
| customer_name |
| pickup_address |
| agreed_price |
And I should be able to start order from notification
@NP-005
Scenario: Rating reminder notification
Given my order "ORD-001" was completed 24 hours ago
And I have not submitted a rating
When the rating reminder is triggered
Then I should receive notification "Don't forget to rate your delivery"
And the notification should link directly to rating page
@NP-006
Scenario: Mute notifications temporarily
Given I am logged in
When I navigate to notification settings
And I enable "Do Not Disturb" mode
And I set schedule "10:00 PM - 7:00 AM"
Then no notifications should be sent during these hours
Except urgent notifications:
| Order cancelled |
| Payment failed |
| Account security alert |
@NP-007
Scenario: Notification history
When I navigate to "Notifications" page
Then I should see all my notifications:
| type | message | time | read |
| order | Package delivered | 2h ago | ✓ |
| bid | New bid received | 5h ago | ✓ |
| message | Driver sent message | 1d ago | ✓ |
| payment | Payment processed | 2d ago | ✓ |
And I should see unread count badge
And I should be able to mark all as read
And I should be able to delete notifications
## ============================================================================
## PHASE 13: SEARCH & FILTER
## ============================================================================
Feature: Search and Filter Functionality
As a user
I want to search and filter orders
So that I can find specific information quickly
@SF-001
Scenario: Customer searches order history
Given I am logged in as customer
And I have 50 completed orders
When I navigate to "My Orders"
And I enter search term "ORD-025"
Then I should see only order "ORD-025" in results
And all order details should be displayed
@SF-002
Scenario: Filter orders by status
Given I am on "My Orders" page
And I have orders in various statuses
When I select filter "Status: In Progress"
Then I should see only orders with status "in_progress"
And the count should show "3 orders"
@SF-003
Scenario: Filter orders by date range
Given I am on "My Orders" page
When I select date range filter
And I choose "From: Oct 1, 2025" to "To: Oct 15, 2025"
And I apply filter
Then I should see only orders within that date range
And orders should be sorted by date descending
@SF-004
Scenario: Driver filters available orders
Given I am logged in as driver
And I am viewing available orders
When I apply filters:
| field | value |
| package_size | small, medium |
| max_distance | 10 km |
| min_price | $20 |
| pickup_time | today |
Then I should see only orders matching all criteria
And I should see "Showing 8 orders"
@SF-005
Scenario: Sort orders by different criteria
Given I am viewing my order list
When I select sort option "Price: High to Low"
Then orders should be reordered by price descending
When I select sort option "Date: Newest First"
Then orders should be reordered by date descending
@SF-006
Scenario: Save filter preferences
Given I am on orders page
And I have applied multiple filters
When I click "Save Filter as Default"
Then my filter settings should be saved
And next time I visit this page, filters should be pre-applied
## ============================================================================
## PHASE 14: DRIVER AVAILABILITY & ZONES
## ============================================================================
Feature: Driver Availability and Service Zones
As a driver
I want to manage my availability and service area
So that I receive relevant orders
@DA-001
Scenario: Toggle online/offline status
Given I am logged in as driver
And my current status is "offline"
When I navigate to driver dashboard
And I toggle availability switch to "online"
Then my status should change to "available"
And I should start receiving order notifications
And my location should be tracked
@DA-002
Scenario: Set working hours
Given I am on my driver profile settings
When I navigate to "Working Hours"
And I configure my schedule:
| day | available | start_time | end_time |
| Monday | yes | 08:00 | 18:00 |
| Tuesday | yes | 08:00 | 18:00 |
| Wednesday | yes | 08:00 | 18:00 |
| Thursday | yes | 08:00 | 18:00 |
| Friday | yes | 08:00 | 20:00 |
| Saturday | yes | 10:00 | 16:00 |
| Sunday | no | - | - |
And I save working hours
Then my availability should auto-toggle based on schedule
And I should only receive orders during these hours
@DA-003
Scenario: Define service zone
Given I am on driver settings
When I navigate to "Service Area"
And I select service zone definition method "Circle"
And I set center point to my current location
And I set radius to "15 km"
And I save service zone
Then I should only see orders within 15km of center
And orders outside this zone should not appear
@DA-004
Scenario: Define custom service zone polygons
Given I am on "Service Area" settings
When I select "Custom Zone" option
And I draw a polygon on map covering my preferred area
And I save custom zone
Then only orders with pickup/delivery in this zone should be shown
@DA-005
Scenario: Pause availability temporarily
Given I am currently "available"
When I click "Take a Break"
And I select break duration "30 minutes"
Then my status should change to "on_break"
And I should stop receiving new orders
And my status should auto-resume after 30 minutes
@DA-006
Scenario: View availability statistics
Given I am on driver dashboard
When I navigate to "Availability Stats"
Then I should see:
| metric | value |
| online_hours_today | 6.5 hours |
| online_hours_week | 38 hours |
| acceptance_rate | 85% |
| completion_rate | 98% |
| average_response | 3 minutes |
## ============================================================================
## PHASE 15: PACKAGE & ORDER DETAILS
## ============================================================================
Feature: Detailed Package and Order Management
As a user
I want to specify and view detailed package information
So that deliveries are handled appropriately
@PD-001
Scenario: Specify package details when creating order
Given I am creating a new order
When I fill in package details:
| field | value |
| package_type | Documents |
| package_size | Small (under 5kg) |
| package_weight | 2 kg |
| dimensions | 30x20x10 cm |
| fragile | No |
| requires_signature | Yes |
| insurance_value | $100 |
| special_handling | Keep upright |
And I submit the order
Then the package details should be saved
And drivers should see all package information when viewing the order
@PD-002
Scenario: Add multiple items to single order
Given I am creating an order
When I click "Add Item"
And I enter first item:
| description | Box of books |
| weight | 5 kg |
| quantity | 1 |
And I click "Add Another Item"
And I enter second item:
| description | Envelope with documents |
| weight | 0.5 kg |
| quantity | 1 |
And I submit order
Then both items should be listed in order details
And total weight should be calculated as 5.5 kg
@PD-003
Scenario: Upload package photos
Given I am creating order "ORD-001"
When I click "Add Package Photos"
And I upload 3 photos of the package
Then photos should be attached to the order
And drivers should be able to view photos before bidding
And photos should help driver identify package at pickup
@PD-004
Scenario: Special instructions for pickup
Given I am creating an order
When I add pickup instructions:
"""
Building entrance on Oak Street. Ring apartment 3B.
Package is with building security if I'm not home.
Call me 5 minutes before arrival.
"""
Then instructions should be saved with order
And driver should see instructions before pickup
And instructions should be highlighted in driver app
@PD-005
Scenario: Special instructions for delivery
Given I am creating an order
When I add delivery instructions:
"""
Leave package at front desk with doorman.
If doorman unavailable, leave in mailroom.
Do not leave outside door.
Send photo proof of delivery location.
"""
Then instructions should be saved
And driver should see them when approaching delivery
And recipient should receive copy of instructions
@PD-006
Scenario: Require proof of delivery signature
Given I am creating an order
When I enable "Signature Required"
Then driver must obtain signature at delivery
And delivery cannot be marked complete without signature
And digital signature should be captured in app
@PD-007
Scenario: Package insurance options
Given I am creating an order
And my package value is $500
When I view insurance options
Then I should see:
| coverage | cost |
| Basic ($100) | Included free |
| Standard ($500) | +$2.50 |
| Premium ($1000) | +$5.00 |
| Custom (above 1000) | Custom quote |
When I select "Standard ($500)"
Then insurance fee should be added to order cost
And package should be marked as insured
@PD-008
Scenario: Fragile package handling
Given I am creating an order
When I mark package as "Fragile"
Then order should be tagged with fragile badge
And drivers should see prominent fragile warning
And delivery cost may be adjusted for special care
@PD-009
Scenario: Temperature sensitive items
Given I am creating an order
When I select special handling "Temperature Sensitive"
And I specify "Keep refrigerated"
Then only drivers with insulated bags should see the order
And special handling fee should be applied
@PD-010
Scenario: View package tracking history
Given order "ORD-001" is in progress
When I view order details
Then I should see complete package history:
| timestamp | event | location |
| Oct 19, 1:00 PM | Order created | Customer app |
| Oct 19, 1:15 PM | Driver assigned | System |
| Oct 19, 1:30 PM | Driver en route | 123 Main St |
| Oct 19, 1:45 PM | Package picked up | 123 Main St |
| Oct 19, 1:46 PM | In transit | Moving |
| Oct 19, 2:28 PM | Delivered | 456 Oak Ave |
And each event should show GPS coordinates
## ============================================================================
## PHASE 16: CANCELLATION & REFUND POLICIES
## ============================================================================
Feature: Order Cancellation and Refund Management
As a user
I want to understand and use cancellation policies
So that I know my options if plans change
@CR-001
Scenario: Customer cancels order before driver assignment
Given I have published order "ORD-001"
And the order status is "published"
And no driver has been assigned yet
When I click "Cancel Order"
And I select cancellation reason "Changed plans"
And I confirm cancellation
Then the order should be cancelled
And I should see "Order cancelled successfully"
And no cancellation fee should be charged
And all pending bids should be rejected
@CR-002
Scenario: Customer cancels order after driver assignment
Given order "ORD-001" is assigned to driver "Jane Driver"
And driver has not started pickup yet
And order was assigned 10 minutes ago
When I cancel the order with reason "Wrong address"
Then I should see cancellation policy:
"""
Cancellation within 30 minutes: $2 fee
Cancellation after pickup started: $5 fee
Cancellation after pickup: Full charge
"""
When I confirm cancellation
Then $2 cancellation fee should be charged
And driver should receive $2 compensation
And order status should be "cancelled"
@CR-003
Scenario: Cannot cancel after pickup
Given order "ORD-001" has been picked up by driver
When I attempt to cancel the order
Then I should see message "Cannot cancel after pickup"
And I should see options:
| Contact Driver |
| Report Issue |
| Contact Support |
And cancellation should not be allowed
@CR-004
Scenario: Driver cancels before pickup with valid reason
Given I am assigned to order "ORD-001"
And I have not started pickup
When I cancel with reason "Vehicle breakdown"
And I provide explanation and evidence
Then the order should return to "published" status
And no penalty should be applied to my account
And customer should be notified
And I should see "Cancellation recorded"
@CR-005
Scenario: Driver excessive cancellation penalty
Given I am driver "Bob Smith"
And I have cancelled 3 orders in the last 7 days
When I accept a new order and try to cancel it
Then I should see warning:
"""
High cancellation rate detected (3 in 7 days)
Further cancellations may result in:
- Reduced order visibility
- Account review
- Temporary suspension
"""
And my cancellation should still be allowed but logged
@CR-006
Scenario: Auto-refund for system issues
Given order "ORD-001" payment was processed
And order was cancelled due to "System error"
When admin marks cancellation as "System fault"
Then full refund should be automatically processed
And customer should see "Full refund issued"
And no fees should be charged to anyone
@CR-007
Scenario: Partial refund for service issues
Given order "ORD-001" was completed with issues
And customer reported "Package damaged"
When admin approves partial refund of 50%
Then 50% of payment should be refunded to customer
And driver should receive 50% of payment
And both parties should be notified
@CR-008
Scenario: View cancellation history
Given I am logged in as customer
When I navigate to "Order History"
And I filter by "Cancelled Orders"
Then I should see all cancelled orders
And each should show:
| order_number |
| cancellation_date |
| cancellation_reason |
| refund_amount |
| cancelled_by |
## ============================================================================
## PHASE 17: VERIFICATION & SECURITY
## ============================================================================
Feature: Account Verification and Security
As a user
I want my account to be secure and verified
So that I can trust the platform and other users
@VS-001
Scenario: Email verification after registration
Given I just registered with email "john@example.com"
And I received a verification email
When I click the verification link in the email
Then my account status should change to "email_verified"
And I should see "Email verified successfully"
And I should be able to access full platform features
@VS-002
Scenario: Phone number verification
Given I am a registered user
And I have added phone number "+1234567890"
When I click "Verify Phone Number"
Then I should receive SMS with verification code
When I enter the correct code "123456"
Then my phone should be marked as verified
And I should see verification badge on my profile
@VS-003
Scenario: Driver identity verification
Given I am registered as a driver
And I want to start accepting orders
When I navigate to "Verification Center"
Then I should see required verification steps:
| Email verification | ✓ Complete |
| Phone verification | ✓ Complete |
| ID document upload | □ Pending |
| Driver's license upload | □ Pending |
| Background check | □ Pending |
| Profile photo | ✓ Complete |
And I should see "3 of 6 steps completed"
@VS-004
Scenario: Upload ID document
Given I am in driver verification process
When I click "Upload ID Document"
And I select ID type "Passport"
And I upload front photo of my passport
And I upload back photo (if applicable)
And I submit for verification
Then documents should be sent for admin review
And I should see "Under review - 1-2 business days"
And my verification progress should update
@VS-005
Scenario: Upload driver's license
Given I am completing driver verification
When I upload driver's license:
| front_photo | license_front.jpg |
| back_photo | license_back.jpg |
| license_number | D1234567 |
| expiry_date | 2026-12-31 |
Then documents should be stored securely
And automatic verification checks should run
And admin should review if auto-check flags issues
@VS-006
Scenario: Background check consent
Given I am completing driver verification
When I reach "Background Check" step
Then I should see consent form explaining:
| Criminal record check |
| Driving record check |
| Identity verification |
| Data usage policy |
When I provide consent and authorization
Then background check should be initiated
And I should see "Background check in progress"
@VS-007
Scenario: Two-factor authentication setup
Given I am logged in
When I navigate to "Security Settings"
And I click "Enable Two-Factor Authentication"
And I select method "Authenticator App"
Then I should see QR code to scan
When I scan QR code with authenticator app
And I enter verification code from app
Then 2FA should be enabled
And I should see backup codes to save
@VS-008
Scenario: Login with 2FA enabled
Given I have 2FA enabled on my account
When I login with email and password
Then I should be prompted for 2FA code
When I enter correct 6-digit code from authenticator
Then I should be logged in successfully
@VS-009
Scenario: Suspicious activity detection
Given I am logged in from New York
When a login attempt is made from London
And this is flagged as suspicious
Then I should receive security alert:
| email | Unusual login attempt |
| sms | Login from new location |
And the login should be blocked temporarily
And I should be prompted to verify it was me
@VS-010
Scenario: Change password with verification
Given I am logged in
When I navigate to "Change Password"
And I enter current password
And I enter new password "NewSecure123!"
And I confirm new password
Then I should receive email "Password changed"
And I should receive SMS confirmation
And all other sessions should be logged out
And I should be required to login again
@VS-011
Scenario: Account recovery
Given I forgot my password
When I click "Forgot Password"
And I enter my email "john@example.com"
Then I should receive password reset email
When I click reset link in email
And I enter new password
And I confirm new password
Then my password should be updated
And I should be able to login with new password
@VS-012
Scenario: Verified badge display
Given I am a driver with complete verification
When other users view my profile
Then they should see "Verified Driver" badge
And they should see verification indicators:
| Identity verified | ✓ |
| Phone verified | ✓ |
| Background checked | ✓ |
And this should increase trust
## ============================================================================
## PHASE 18: DISPUTES & CONFLICT RESOLUTION
## ============================================================================
Feature: Dispute Handling and Conflict Resolution
As a user
I want to report and resolve disputes
So that issues are handled fairly
@DR-001
Scenario: Customer initiates dispute for non-delivery
Given order "ORD-001" was marked as delivered
But I never received the package
When I click "Report Issue" on the order
And I select dispute reason "Package not received"
And I provide details:
"""
Driver marked as delivered at 2:00 PM but I was home all day.
No package at door, no delivery photo sent.
Doorman confirms no package was delivered.
"""
And I upload supporting evidence:
| doorman_statement.pdf |
| security_footage.mp4 |
And I submit dispute
Then dispute should be created with status "pending_review"
And payment should be placed on hold
And driver should be notified to provide response
And admin should be notified
@DR-002
Scenario: Driver responds to dispute
Given customer opened dispute on my order "ORD-001"
And I receive notification about dispute
When I view the dispute details
And I click "Provide Response"
And I enter my explanation:
"""
I delivered package at 2:00 PM to building doorman as instructed.
I have delivery photo showing doorman accepting package.
Doorman signed digital signature on my device.
"""
And I upload evidence:
| delivery_photo_with_doorman.jpg |
| digital_signature.png |
| gps_timestamp_proof.png |
And I submit response
Then my response should be added to dispute
And admin should be notified to review
And customer should see my response
@DR-003
Scenario: Dispute for damaged package
Given I received order "ORD-001"
But the package is damaged
When I open dispute with reason "Package damaged"
And I upload photos:
| damaged_box_1.jpg |
| damaged_contents.jpg |
| original_package_photo.jpg |
And I describe damage:
"""
Box was crushed on one corner.
Contents (ceramic items) are broken.
Original package photo shows intact box.
"""
And I submit dispute
Then dispute should be created
And insurance claim should be automatically initiated
And driver should provide response
@DR-004
Scenario: Admin reviews dispute
Given there is a dispute on order "ORD-001"
And both parties have submitted evidence
When I (admin) review the dispute
Then I should see all information:
| order_details |
| customer_claim |
| driver_response |
| all_evidence_files |
| chat_history |
| delivery_proof |
| gps_tracking_data |
| timestamps |
And I should see resolution options:
| Favor customer - full refund |
| Favor customer - partial refund |
| Favor driver - no refund |
| Split responsibility - 50/50 |
| Request more information |
@DR-005
Scenario: Resolve dispute in favor of customer
Given I am admin reviewing dispute "DISP-001"
And evidence shows package was not properly delivered
When I select "Favor customer - full refund"
And I enter resolution notes:
"""
Delivery photo does not match the address.
GPS data shows driver was 2 blocks away.
Customer provided security footage proving non-delivery.
"""
And I confirm resolution
Then full refund $25.00 should be issued to customer
And driver should not receive payment
And both parties should be notified
And incident should be logged in driver's record
And dispute status should be "resolved"
@DR-006
Scenario: Resolve dispute with partial refund
Given dispute shows both parties share responsibility
When admin selects "Partial refund - 60%"
And enters reasoning
Then customer receives 60% refund: $15.00
And driver receives 40% payment: $10.00
And both parties notified of decision
@DR-007
Scenario: Request additional information
Given I am admin reviewing dispute
And evidence is inconclusive
When I click "Request More Information"
And I specify what's needed from customer:
"""
Please provide receipt showing package value
Please provide clearer photo of damage
"""
And I specify what's needed from driver:
"""
Please provide full GPS route history
Please provide timestamp from delivery photo metadata
"""
Then both parties should receive requests
And dispute should be marked as "awaiting_information"
And deadline of 48 hours should be set
@DR-008
Scenario: Appeal dispute resolution
Given dispute "DISP-001" was resolved against me
And I disagree with the decision
When I click "Appeal Decision"
And I provide new evidence not previously submitted
And I explain why resolution was unfair
And I submit appeal
Then appeal should be created
And senior admin should review
And all parties should be notified
@DR-009
Scenario: Escalate to mediation
Given dispute cannot be resolved through admin
And both parties agree to mediation
When admin escalates to mediation
Then third-party mediator should be assigned
And mediation session should be scheduled
And both parties should be invited
And mediation terms should be shared
@DR-010
Scenario: View my dispute history
Given I am logged in
When I navigate to "My Disputes"
Then I should see all my disputes:
| dispute_id | order | reason | status | outcome |
| DISP-001 | ORD-001 | Not received | Resolved | Refunded |
| DISP-005 | ORD-015 | Damaged | Resolved | Partial ref. |
| DISP-008 | ORD-023 | Late delivery | Pending | Under review |
And I should be able to view details of each dispute
## ============================================================================
## PHASE 19: INSURANCE & CLAIMS
## ============================================================================
Feature: Package Insurance and Claims Management
As a user
I want to insure valuable packages
So that I am protected against loss or damage
@IC-001
Scenario: Purchase insurance when creating order
Given I am creating order with package value $800
When I view insurance options
And I select "Premium coverage ($1000)"
Then insurance premium of $5.00 should be added
And total order cost should include insurance
And insurance policy details should be shown
@IC-002
Scenario: View insurance policy details
Given my order has insurance coverage
When I view insurance details
Then I should see policy information:
| coverage_amount | $1000 |
| premium_paid | $5.00 |
| policy_number | INS-20251019-001 |
| valid_from | Oct 19, 2025 |
| coverage_includes | Loss, Damage, Theft |
| deductible | $0 |
| exclusions | Listed items |
And I should see claim filing instructions
@IC-003
Scenario: File insurance claim for lost package
Given order "ORD-001" has insurance
And package was lost during delivery
When I navigate to order details
And I click "File Insurance Claim"
And I select claim reason "Package lost"
And I provide package value proof:
| purchase_receipt.pdf |
| item_photos.jpg |
And I describe incident
And I submit claim
Then insurance claim should be created
And claim number should be generated
And insurance team should be notified
And I should see "Claim submitted - under review"
@IC-004
Scenario: File insurance claim for damaged package
Given order "ORD-001" has insurance coverage
And package was delivered damaged
When I file insurance claim for "Damage"
And I upload damage evidence:
| damaged_package_1.jpg |
| damaged_package_2.jpg |
| damaged_contents.jpg |
And I provide item value: $800
And I attach purchase proof
And I submit claim
Then claim should be created with status "submitted"
And claim should be assigned to adjuster
@IC-005
Scenario: Insurance adjuster reviews claim
Given I am an insurance adjuster
And claim "CLM-001" has been submitted
When I review the claim details
Then I should see:
| order_information |
| insurance_policy |
| claim_reason |
| claimed_amount |
| evidence_photos |
| purchase_receipts |
| delivery_records |
| driver_statement |
And I should be able to:
| Approve full claim |
| Approve partial claim |
| Deny claim |
| Request more information |
@IC-006
Scenario: Approve insurance claim
Given I am reviewing claim "CLM-001"
And evidence supports full claim amount
When I approve claim for full amount $800
And I enter approval notes
And I process payment
Then $800 should be paid to customer
And claim status should be "approved"
And customer should be notified
And payment should process within 3-5 business days
@IC-007
Scenario: Deny insurance claim
Given I am reviewing claim "CLM-001"
And claim does not meet policy requirements
When I deny the claim
And I select denial reason "Pre-existing damage"
And I provide explanation:
"""
Evidence shows damage occurred before pickup.
Original package photos show existing damage.
Does not qualify under policy terms.
"""
And I submit denial
Then claim status should be "denied"
And customer should be notified with reason
And customer should have appeal option
@IC-008
Scenario: Appeal denied insurance claim
Given my insurance claim was denied
When I click "Appeal Claim Decision"
And I provide additional evidence:
| new_expert_assessment.pdf |
| additional_photos.jpg |
And I explain why denial was incorrect
And I submit appeal
Then appeal should be reviewed by senior adjuster
And I should receive decision within 7 days
@IC-009
Scenario: Track insurance claim status
Given I have submitted insurance claim "CLM-001"
When I navigate to "My Claims"
Then I should see claim status timeline:
| date | status | notes |
| Oct 19 | Submitted | Claim received |
| Oct 20 | Under review | Assigned to adjuster |
| Oct 21 | Additional info req. | Photos requested |
| Oct 22 | Under review | Info received |
| Oct 23 | Approved | Payment processing |
And I should see estimated completion date
@IC-010
Scenario: Insurance claim for high-value items
Given I want to ship item worth $5000
When I create order and request insurance
Then I should see "High-value item insurance"
And I should be required to provide:
| Detailed item description |
| Professional appraisal |
| Purchase receipt |
| Multiple photos |
| Serial number (if applicable) |
And premium should be calculated at higher rate
And additional verification may be required
## ============================================================================
## PHASE 20: PROMOTIONS & REWARDS
## ============================================================================
Feature: Promotions, Referrals, and Loyalty Program
As a user
I want to benefit from promotions and rewards
So that I can save money and earn benefits
@PR-001
Scenario: Apply promo code to new order
Given I am creating a new order
And calculated price is $25.00
When I enter promo code "FIRSTRIDE20"
And I click "Apply"
Then promo code should be validated
And 20% discount should be applied
And new price should show $20.00
And I should see "Promo applied: -$5.00"
@PR-002
Scenario: Invalid promo code
Given I am creating an order
When I enter promo code "EXPIRED123"
And I click "Apply"
Then I should see error "Promo code expired or invalid"
And no discount should be applied
And original price should remain
@PR-003
Scenario: Promo code usage limit reached
Given promo code "LIMIT5" has usage limit of 5
And I have already used it 5 times
When I try to apply it again
Then I should see "You have reached the usage limit for this promo"
And promo should not be applied
@PR-004
Scenario: Referral code generation
Given I am a registered user
When I navigate to "Refer a Friend"
Then I should see my unique referral code "JOHN2025"
And I should see referral link to share
And I should see referral benefits:
"""
Give $10 credit to friends
Get $10 credit when they complete first order
"""
And I should see sharing options:
| WhatsApp | Email | SMS | Copy Link |
@PR-005
Scenario: New user signs up with referral code
Given I am a new user registering
When I enter referral code "JOHN2025" during signup
And I complete registration
Then $10 credit should be added to my account
And I should see "Welcome! You have $10 credit"
And referrer "John" should be notified
@PR-006
Scenario: Referrer receives reward
Given I referred user "Alice"
And Alice just completed her first order
When the order is delivered successfully
Then $10 credit should be added to my account
And I should receive notification "You earned $10 referral reward"
And credit should be available immediately
@PR-007
Scenario: View referral statistics
Given I am on "Refer a Friend" page
When I view my referral stats
Then I should see:
| total_referrals | 8 friends |
| pending_referrals | 2 signed up |
| completed_referrals | 6 completed orders |
| total_earned | $60 in credits |
And I should see list of referred friends (names hidden)
@PR-008
Scenario: Loyalty points for completed orders
Given I complete order "ORD-001" worth $25
When order is marked as delivered
Then I should earn 25 loyalty points (1 point per $1)
And I should see "You earned 25 points!"
And points should be added to my balance
@PR-009
Scenario: Redeem loyalty points
Given I have 500 loyalty points
And I am creating a new order worth $30
When I click "Use Points"
And I select "Redeem 250 points for $5 off"
And I confirm redemption
Then 250 points should be deducted
And $5 discount should be applied
And new order total should be $25
@PR-010
Scenario: View loyalty tier status
Given I am a member of loyalty program
When I navigate to "Loyalty Program"
Then I should see my current tier:
| current_tier | Silver |
| points_balance | 850 points |
| next_tier | Gold (at 1000 points) |
| points_to_next | 150 points |
And I should see tier benefits:
| Silver benefits |
| - 5% bonus points on orders |
| - Priority customer support |
| - Exclusive promo codes |
@PR-011
Scenario: Seasonal promotion campaign
Given there is active promotion "Holiday Special"
When I open the app
Then I should see promotional banner
And promotion details:
| campaign | Holiday Special |
| offer | 30% off all orders |
| valid_dates | Dec 20-26, 2025 |
| code | HOLIDAY30 |
| terms | Min order $15 |
When I create order and apply "HOLIDAY30"
Then 30% discount should be applied
@PR-012
Scenario: First-time user promotion
Given I just completed registration
When I navigate to create first order
Then I should see "First Order Special"
And automatic 25% discount should be applied
And I should see "Welcome bonus: -25%"
And no promo code entry required
@PR-013
Scenario: Driver incentive bonus
Given I am a driver
And there is "Weekend Bonus" campaign
When I complete 10 deliveries on weekend
Then I should receive $50 bonus
And I should see "Weekend goal completed! +$50"
And bonus should be added to my earnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment