forked from pierront/mylibrary-template
J'avais oublié des customer dans book
This commit is contained in:
28
src/test/resources/features/subscription.feature
Normal file
28
src/test/resources/features/subscription.feature
Normal file
@@ -0,0 +1,28 @@
|
||||
# language: en
|
||||
|
||||
Feature: Manage customer subscription
|
||||
Background:
|
||||
Given the system has the following customers:
|
||||
| customerId | firstName | lastNale | phoneNumer | loyaltyPoints |
|
||||
| 1 | John | Doe | 0612345678 | 100 |
|
||||
| 2 | Bob | Dupond | 0687654321 | 50 |
|
||||
| 3 | Alice | Untel | 0698765432 | 0 |
|
||||
|
||||
Scenario: Create a new subscription
|
||||
When I create a new subscription with CB:
|
||||
| customerId | duration | paymentMethod | debutDate |
|
||||
| 1 | 12 | CB | 2025-06-10 |
|
||||
Then a new subscription is created
|
||||
|
||||
Scenario: Create a new subscription
|
||||
When I create a new subscription with Paypal:
|
||||
| customerId | duration | paymentMethod | debutDate |
|
||||
| 2 | 24 | Paypal | 2025-06-11 |
|
||||
Then a new subscription is created
|
||||
|
||||
Scenario: Attempt to create a subscription with invalid duration:
|
||||
When I try to create a new subscription with the following information:
|
||||
| customerId | duration | paymentMethod | debutDate |
|
||||
| 3 | 0 | CB | 2025-06-12 |
|
||||
Then the subsription duration creation fails
|
||||
And I receive an error for validation subscription message containing "Duration must be positive"
|
||||
Reference in New Issue
Block a user