From 11a123a2eda477decb9c2bacf9b23852a20b8061 Mon Sep 17 00:00:00 2001 From: Kroccmou <161739353+Kroccmou@users.noreply.github.com> Date: Fri, 13 Jun 2025 23:50:21 +0200 Subject: [PATCH] Update order.feature --- src/test/resources/features/order.feature | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/test/resources/features/order.feature b/src/test/resources/features/order.feature index a457139..1592078 100644 --- a/src/test/resources/features/order.feature +++ b/src/test/resources/features/order.feature @@ -3,13 +3,13 @@ Feature: Manage orders Background: - Given the system has the following customers: + Given the order system has the following customers: | id | firstName | lastName | phoneNumber | loyaltyPoints | | 22222222-2222-2222-2222-222222222222 | Bob | Brown | 0600000002 | 200 | - And the system has the following books: + And the order system has the following books: | isbn | title | author | publisher | publicationDate | price | quantity | language | | 978222222 | Book A | Author A | PubA | 2021-01-01 | 12.0 | 10 | EN | - And the system has the following orders: + And the order system has the following orders: | id | customerId | totalPrice | paymentMethod | | ord-1 | 22222222-2222-2222-2222-222222222222 | 24.0 | CREDIT_CARD | @@ -18,7 +18,7 @@ Feature: Manage orders | customerId | paymentMethod | orderLineDtos | addressStreet | addressCity | addressPostalCode | addressCountry | | 22222222-2222-2222-2222-222222222222 | CREDIT_CARD | [{ "bookId":978222222, "quantity":2 }] | 1 Main St | Paris | 75000 | France | Then the order is created successfully - And the system now has 2 orders + And the order system now has 2 orders Scenario: Get order by ID When I request the order with id "ord-1" @@ -30,27 +30,27 @@ Feature: Manage orders When I try to create a new order with the following information: | customerId | paymentMethod | orderLineDtos | addressStreet | addressCity | addressPostalCode | addressCountry | | 22222222-2222-2222-2222-222222222222 | CREDIT_CARD | [{ "bookId":978222222, "quantity":20 }] | 1 Main St | Paris | 75000 | France | - Then the creation fails - And I receive an error message containing "book quantity insufficient" - And the system still has 1 order + Then the order creation fails + And I receive an order error message containing "book quantity insufficient" + And the order system still has 1 order Scenario: Attempt to create an order with invalid details When I try to create a new order with the following information: | customerId | paymentMethod | orderLineDtos | addressStreet | addressCity | addressPostalCode | addressCountry | | | | | | | | | - Then the creation fails - And I receive an error message containing "Invalid order details or address" - And the system still has 1 order + Then the order creation fails + And I receive an order error message containing "Invalid order details or address" + And the order system still has 1 order Scenario: Attempt to create an order for unknown customer When I try to create a new order with the following information: | customerId | paymentMethod | orderLineDtos | addressStreet | addressCity | addressPostalCode | addressCountry | | 99999999-9999-9999-9999-999999999999 | CREDIT_CARD | [{ "bookId":978222222, "quantity":2 }] | 1 Main St | Paris | 75000 | France | - Then the creation fails - And I receive an error message containing "Customer not found" - And the system still has 1 order + Then the order creation fails + And I receive an order error message containing "Customer not found" + And the order system still has 1 order Scenario: Attempt to get order by unknown ID When I request the order with id "unknown-order-id" - Then the request fails - And I receive an error message containing "Order not found" \ No newline at end of file + Then the order request fails + And I receive an order error message containing "Order not found"