Giter Site home page Giter Site logo

cohort-2-d's People

Contributors

ffzahra avatar jaafarf avatar sarajaned avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cohort-2-d's Issues

Admin / Customer: Search books

User Story Title: A bookstore admin or customer can search the store to find books they are interested in.

Scenario 1: Successful search - book matches

Given a search query that will results in matches
When I make a GET request to the API endpoint with the search query
Then the system should respond with a 200 status code the system should display a list of books matching query

Scenario 2: Unsuccessful search - no book matches

Given a search query which will result in no matches
When I make a GET request to the API endpoint with the search query
Then the system should respond with a 200 status code the system should display an error message saying no books have been found.

Admin: Add new books

User Story Title: A bookstore admin can add new books to the store in line with trends in the bestseller charts and new releases.

Scenario 1: Successfully add a book to the store

Given all necessary and correct information to add a new book
When I make a POST request to the API endpoint with a book’s information
Then the system should respond with a 201 status code

Scenario 2: Attempting to add a book with duplicate information

Given all necessary information to add a new book but duplicate information given e.g. title
When I make a POST request to the API endpoint with the user information to add a new user
Then the system should respond with a 400 status code and an error message indicating that the book already exists.

Scenario 3: Attempting to add a book with incorrect / incomplete information

Given all incorrect information to add a new book e.g. incorrect data type / missing title
When I make a POST request to the API endpoint with the user information to add a new book
Then the system should respond with a 400 status code and an error message indicating that the information supplied is incorrect

Admin: Delete books

User Story Title: A bookstore admin can delete books if they are not selling.

Scenario 1: Successfully deleting an existing book

Given a valid book ID.
When I make a DELETE request to the API endpoint with the book’s ID to delete the book.
Then the system should respond with a 200 status code and a message indicating that the book has been deleted successfully.

Scenario 2: Attempting to delete a non-existing book

Given an invalid book ID.
When I make a DELETE request to the API endpoint with the book’s ID to delete the book.
Then the system should respond with a 404 status code and an error message indicating that the book does not exist.

Admin: Update and edit books

User Story Title: A bookstore admin can edit and update books in the store books so that stock information is up-to-date and correct.

Scenario 1: Successfully update a book in the store

Given a valid book ID and book information
When I make a PUT request to the API endpoint with the book’s ID and updated book information
Then the system should respond with a 200 status code and a message indicating that the book has been updated successfully

Scenario 2: Attempting to update a non-existing book

Given an invalid book ID
When I make a PUT request to the API endpoint with the book’s ID and updated book information
Then the system should respond with a 404 status code and an error message indicating that the book does not exist

Scenario 3: Attempting to update a book entry without providing updated information

Given a valid book ID
When I make a PUT request to the API endpoint with the book’s ID without providing updated book information
Then the system should respond with a 400 status code and an error message indicating that updated information must be provided for the update.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.