From 0df33e9e32ccd1d9a8aa8209db19ccd0346f858e Mon Sep 17 00:00:00 2001 From: Kroccmou <161739353+Kroccmou@users.noreply.github.com> Date: Sat, 14 Jun 2025 00:21:38 +0200 Subject: [PATCH] Update review.feature --- src/test/resources/features/review.feature | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/test/resources/features/review.feature b/src/test/resources/features/review.feature index 9185ec1..f1eecb9 100644 --- a/src/test/resources/features/review.feature +++ b/src/test/resources/features/review.feature @@ -7,12 +7,17 @@ Feature: Manage reviews | id | firstName | lastName | phoneNumber | loyaltyPoints | | 33333333-3333-3333-3333-333333333333 | Carol | White | 0600000003 | 50 | And the review system has the following review books: - | isbn | title | author | publisher | publicationDate | price | quantity | language | - | 978333333 | Book B | Author B | PubB | 2020-01-01 | 18.0 | 5 | EN | - | 978444444 | Book C | Author C | PubC | 2021-06-15 | 22.0 | 3 | FR | + | isbn | title | author | publisher | publicationDate | price | quantity | language | + | 978333333 | Book B | Author B | PubB | 2020-01-01 | 18.0 | 5 | EN | + | 978444444 | Book C | Author C | PubC | 2021-06-15 | 22.0 | 3 | FR | + | 978555555 | Book D | Author D | PubD | 2022-03-10 | 25.0 | 2 | DE | And the review system has the following reviews: | reviewId | bookId | customerName | comment | rating | | rev-1 | 978333333 | Carol White | Great book! | 5 | + And the review system has the following purchases: + | customerId | bookId | purchaseDate | + | 33333333-3333-3333-3333-333333333333 | 978333333 | 2021-01-01 | + | 33333333-3333-3333-3333-333333333333 | 978444444 | 2021-06-15 | Scenario: Submit a new review When I submit a new review with the following information: @@ -30,7 +35,7 @@ Feature: Manage reviews Scenario: Attempt to submit a review for a book not purchased When I try to submit a new review with the following information: | customerId | isbn | rating | comment | - | 33333333-3333-3333-3333-333333333333 | 978333333 | 5 | Not purchased | + | 33333333-3333-3333-3333-333333333333 | 978555555 | 5 | Not purchased | Then the review submission fails And I receive a review error message containing "customer hasn't purchased the book" And the review system still has 1 review