Giter VIP home page Giter VIP logo

angu-weather's Introduction

Welcome to the AnguWeather!

To get started clone this repository and simply run

npm start

I've configured the package.json file to run npm install on this command. If you have issues, please run npm install.

When finished building, please go to http://localhost:8000

Features

This is a simple forecast app using AngularJS 1.7.x, the OpenWeather API, the Google Places Autocomplete, and the Unsplash API for the city photos. The default location is set to 60661,but the browser will request permission to grab your current location. From there, you can search for your favorite city, getting the current weather and a five day forecast, plus show you a photo related to that city.

Testing

This was, admittedly, a new topic for me so there was a bit of a learning curve. I was able to set some simple unit tests for the the current-weather component and a simple e2e test for the search bar and some other basic features. I wasn't able to figure out how to test that API results were returning the correct result, unfortunately. I outline instructions for testing below.

Known Issues

Queries to the weather API return an error if you search for an obscure city - and the photos don't always perfectly match up - Portland, OR vs Portland, ME for example.

Running Tests

End-2-End Testing (Protractor)

To run the end-2-end (e2e) tests against the application, we use [Protractor][protractor].

Starting the Web Server

First, we need the application to be running via the web-server. From the project's root directory run:

npm start

The application should now be available at http://localhost:8000.

Testing with Protractor

Start the Protractor test runner, using the e2e configuration:

npm run protractor

(The configuration will add the appropriate modules)

##Unit Testing with Jasmine

You can run the simple unit tests I created by running

npm test

in your terminal.

angu-weather's People

Contributors

portismouth avatar

Watchers

James Cloos avatar

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.