mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix(curriculum): Clarify Pokemon App user stories (#58720)
Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>
This commit is contained in:
parent
7162fe6edf
commit
93341f265f
@ -16,7 +16,7 @@ In this project, you'll build an app that will search for Pokémon by name or ID
|
||||
|
||||
**User Stories:**
|
||||
|
||||
1. You should have an `input` element with an `id` of `"search-input"`.
|
||||
1. You should have an `input` element with an `id` of `"search-input"`, and is required.
|
||||
1. You should have a `button` element with an `id` of `"search-button"`.
|
||||
1. You should have an element with an `id` of `"pokemon-name"`.
|
||||
1. You should have an element with an `id` of `"pokemon-id"`.
|
||||
@ -36,6 +36,8 @@ In this project, you'll build an app that will search for Pokémon by name or ID
|
||||
1. When the `#search-input` element contains the value `94` and the `#search-button` element is clicked, the values in the `#pokemon-name`, `#pokemon-id`, `#weight`, `#height`, `#hp`, `#attack`, `#defense`, `#special-attack`, `#special-defense`, and `#speed`elements should be `GENGAR`, `#94` or `94`, `Weight: 405` or `405`, `Height: 15` or `15`, `60`, `65`, `60`, `130`, `75`, and `110`, respectively.
|
||||
1. When the `#search-input` element contains the value `94` and the `#search-button` element is clicked, you should add an `img` element with the `id` of `sprite` and the `src` set to the Pokémon's `front_default` sprite to the page.
|
||||
1. When the `#search-input` element contains the value `94` and the `#search-button` element is clicked, the `#types` element should contain two inner elements with the text values `GHOST` and `POISON`, respectively. The `#types` element content should be cleared between searches.
|
||||
1. When the `#search-input` element contains an invalid Pokemon name, and the `#search-button` element is clicked, an alert should appear with the text `"Pokémon not found"`.
|
||||
1. When the `#search-input` element contains a valid Pokemon id and the `#search-button` element is clicked, the UI should be filled with the correct data.
|
||||
|
||||
Fulfill the user stories and pass all the tests below to complete this project. Give it your own personal style. Happy Coding!
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user