AS A user, I WANT TO search for the prices of ingredients from the app's database, SO THAT I can compare prices and choose the most affordable options when cooking.
SCENARIO: Successful Ingredient Price Search
GIVEN the user is on the ingredient search page of the app, WHEN the user enters the name of an ingredient into the search bar, AND clicks the "Search" button, THEN the backend system should retrieve price data from the database WITHIN 2 seconds, AND display the relevant ingredient price information on the screen.
SCENARIO: No Results Found
GIVEN the user is on the ingredient search page of the app, WHEN the user enters an ingredient name that is not in the database, AND clicks the "Search" button, THEN the system should return an error message that says "Ingredient not found" WITHIN 1 second, AND prompt the user to either refine their search or add a new ingredient to the list.
SCENARIO: Backend Error During Search
GIVEN the user is on the ingredient search page, WHEN the user submits a valid ingredient search, AND a backend error occurs while fetching price data, THEN the system should display an error message stating "Unable to retrieve prices. Please try again later." WITHIN 1 second, AND allow the user to retry the search once the issue is resolved.
AS A user,
I WANT TO search for the prices of ingredients from the app's database,
SO THAT I can compare prices and choose the most affordable options when cooking.
SCENARIO: Successful Ingredient Price Search
GIVEN the user is on the ingredient search page of the app,
WHEN the user enters the name of an ingredient into the search bar,
AND clicks the "Search" button,
THEN the backend system should retrieve price data from the database
WITHIN 2 seconds,
AND display the relevant ingredient price information on the screen.
SCENARIO: No Results Found
GIVEN the user is on the ingredient search page of the app,
WHEN the user enters an ingredient name that is not in the database,
AND clicks the "Search" button,
THEN the system should return an error message that says "Ingredient not found"
WITHIN 1 second,
AND prompt the user to either refine their search or add a new ingredient to the list.
SCENARIO: Backend Error During Search
GIVEN the user is on the ingredient search page,
WHEN the user submits a valid ingredient search,
AND a backend error occurs while fetching price data,
THEN the system should display an error message stating "Unable to retrieve prices. Please try again later."
WITHIN 1 second,
AND allow the user to retry the search once the issue is resolved.