Giter Site home page Giter Site logo

web_app_dev_project_frontend_02's Introduction

Assignment 2 - Automated development process.

Name: Joe Wemyss

Student No.: 20068336

Overview.

This application is a Progressive Web Application that functions in a "serverless" fashion. It communicates directly with a database from the client. The application is built using VueJS, with firebase and Google Cloud Platform as a backend.

Environment.

This project requires NodeJS to be installed. I built it using Node 8.6.0, and NPM 5.3.0, but any version greater than 4.0.0 should work. There is no need for any database software to be installed, however, you will need a .env file located in the root of the project directory that contains the following env variables;

  FIREBASE_API_KEY=<your value>
  FIREBASE_AUTH_DOMAIN=<your value>
  FIREBASE_DATABASE_URL=<your value>
  FIREBASE_PROJECT_ID=<your value>
  FIREBASE_STORAGE_BUCKET=<your value>
  FIREBASE_MESSAGING_SENDER_ID=<your value>
  BACKEND_BASE_URL=<your value>
  MAPS_API_KEY=<your value>
  LOG_LEVEL=trace
  COVERALLS_REPO_TOKEN=<your value>

Build automation.

To build the application for development, with Live Reload and HotModuleReplacement(HMR), run npm run dev.

To build the application for production, run npm run build. This will build the application in a production ready format, with full minification, a production-ready Service Worker and compressed images.

To run the full test suite, you can run npm test. This will run the full unit test suite, as well as the acceptance tests.

Acceptance Testing.

Due to time constraints, and some technical issues with using Nightwatch, I was only able to include two Acceptance tests. Both are included in the same file (which can be found here). There is a third test which is commented out. This test also works, but I couldn't get the two to work together, as I was unable to force Firebase to log out between tests.

Test 01 -- Checking the page title.

This was the first test I wrote and it simply checks that the page title is as expected. I didn't include a screenshot for this, as there was not really anything to see. The output of this test can bbe seen below:

  Running:  open page
   √ Element <#app> was visible after 91 milliseconds.
   √ Testing if the page title equals "Finance Tracker".
  
  OK. 2 assertions passed. (19.356s)

Test 02 -- Creating an account

This test ran through the basic sign up process. I have included an animated GIF of the test running.

  Running:  sign up
   √ Element <#app> was visible after 128 milliseconds.
   √ Element <button[name=loginButton]> was visible after 93 milliseconds.
   √ Element <input[name=emailField]> was visible after 187 milliseconds.
   √ Element <input[name=passwordField]> was visible after 107 milliseconds.
   √ Element <input[name=confirmPasswordField]> was visible after 217 milliseconds.
   √ Testing if element <#profileHeader> contains text: "Welcome to your Profile page, unknown".
  
  OK. 6 assertions passed. (21.109s)

acceptance test gif

Continuous Integration.

The URL for the travis project can be found here. In order to build this application yourself, you will need to create a firebase account, copy the keys to a .env file located at the project root for development, and also copy the keys to the Travis environment variables. You will also need to create a Facebook developer account, and link copy your client secret key to your firebase project. As Firebase is a subsidiary of Google, there is no need to obtain a Google client secret key for Google OAuth.

Automated Deployment.

The hosted application can be found here. In order to facilitate automated deployment, the steps outliend in the travis step above will need to be completed.

Extra features.

This project is unit tested using the karma test runner. This primarily uses PhantomJS for headless browser tests, but it can also run the tests on any browser that the user has on their device, to ensure cross platform compatability.

This projects end-to-end test suite is powered by NightwatchJS, which runs on top of the Selenium Web Driver.

This project also has two seperate build pipelines, one for the Client and one for the REST API.

web_app_dev_project_frontend_02's People

Watchers

James Cloos avatar Joe Wemyss 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.