User Story
As a frequent traveller who needs to be constantly updated about weather conditions of various destinations
I WANT : a weather dashboard to receive the weather forecast for next 5 days for multiple
cities
SO THAT : I can plan my trip accordingly.
Acceptance Criteria
WHEN: A div is created and an input box type text is added to the div.
WHEN: A button element is added inside that div to click and search for the city.
WHEN: All the divs are given class name and IDs & those ids are used to style the page.
(2) When I search for a city then I am presented with current and future conditions for that city and that city is added to the search history*
WHEN: All the required elements are grabbed by using their ids and stored in variables.
WHEN: An API key is generated for a weather forecast website.
WHEN: A function "currentWeather(city)" is wrriten to get the current weather condition.
WHEN: That key is used with the website URL to fetch the data.
WHEN: "fetch()" method is wriiten to get the data from the website by using the URL.
WHEN: "moment()" method is used display the current date.
WHEN: loccal storage is created to store the cities name used for serching wether condition.
WHEN: a function "foreCast()" is written to display the forecast for next 5 days.
WHEN: for-loop is used to display the weather for each day.
(3) When I view current weather conditions for that city, then I am presented with the city name, the date, an icon representation of weather conditions, the temperature, the humidity, the wind speed, and the UV index*
WHEN: "fetch()" request is used to generate the response from the website by using keys in the
website url.
WHEN: by generated response is used to access the temperature, humidity, wind-speed uv-index
inside fetch() method.
WHEN: url is used to fetch the weather icon from the website.
(4) WHEN I click on a city in the search history, then I am again presented with current and future conditions for that city*
WHEN: a function "addToList(cty)" is written to store the searched city name in a list.
WHEN: a function "usePastSearch(event)" is written to invoke the "currentWeather(city)" when
any city is clicked from the list.