forked from pierront/mylibrary-template
Update review.feature
This commit is contained in:
@@ -10,9 +10,14 @@ Feature: Manage reviews
|
|||||||
| isbn | title | author | publisher | publicationDate | price | quantity | language |
|
| isbn | title | author | publisher | publicationDate | price | quantity | language |
|
||||||
| 978333333 | Book B | Author B | PubB | 2020-01-01 | 18.0 | 5 | EN |
|
| 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 |
|
| 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:
|
And the review system has the following reviews:
|
||||||
| reviewId | bookId | customerName | comment | rating |
|
| reviewId | bookId | customerName | comment | rating |
|
||||||
| rev-1 | 978333333 | Carol White | Great book! | 5 |
|
| 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
|
Scenario: Submit a new review
|
||||||
When I submit a new review with the following information:
|
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
|
Scenario: Attempt to submit a review for a book not purchased
|
||||||
When I try to submit a new review with the following information:
|
When I try to submit a new review with the following information:
|
||||||
| customerId | isbn | rating | comment |
|
| 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
|
Then the review submission fails
|
||||||
And I receive a review error message containing "customer hasn't purchased the book"
|
And I receive a review error message containing "customer hasn't purchased the book"
|
||||||
And the review system still has 1 review
|
And the review system still has 1 review
|
||||||
|
Reference in New Issue
Block a user