Giter VIP home page Giter VIP logo

qantas-code-test's Introduction

Qantas Code Test

Overview

Qantas Code Test

http://kieradog.github.io/Qantas-Code-Test

React, Storybook, Storybook Snapshot Test, Jest Unit Test (@testing-library/react), Basic Webpack and Babel.

Test Coverage: 99.08%

Browser Compatibility

  • Target: > 0.25%, not dead
  • Tested: Chrome, Safari

Issues

  • E2E might fail because it required to start server on 8080, need docker
  • Some Component is not 100% covered, because of guarded by propTypes
  • The props and onChange function of SortSelect need documented, { key: string, directions: Direction[]} and { key: string, direction: Direction }
  • using styled-components@3, because of v4's jest-styled-components is not supported

Getting Started

Prerequisites

  • Git
  • Node(& npm): any 10.x version starting with 10.13.0 or greater

Installation

  1. npm i to install the website's npm dependencies

Running locally

  1. npm run start:dev to start the hot-reloading development server
  2. open http://localhost:8080 to open the site in your favorite browser
  • Tool: Webpack, Webpack Dev Server

Storybook

  1. npm run storybook to start the hot-reloading storybook server
  2. open https://localhost:6006 to open the storybook in your favorite browser
  • Tool: Storybook

Running the tests

  1. npm i to install the website's npm dependencies
  2. npm run test to run Lint, Unit Test, Snapshot Test, E2E Test.

Lint

ESLint, check syntax, find problems, and enforce code style.

  • Tool: ESLint
  • Style Guide: airbnb

Unit Test

npm run test:unit to run unit test (./src/components/**/*.spec.jsx)

  • Tool: Jest, @testing-library/react

Snapshot Test

npm run test:snap to run snapshot test (./src/components/**/*.stories.jsx)

  • Tool: Jest, Storybook
  • Test Config: ./storyshots/storyshots.spec.js
  • Snapshots: ./storyshots/__snapshots__/storyshots.spec.js

E2E Test

npm run test:e2e to run E2E test

  • Tool: Jest, Puppeteer, jest-puppeteer

Deploy

Build

npm run build to build website artifacts

  • Tool: Webpack, Babel
  • Artifacts: ./dist

Environments

Github Page

npm run deploy to deploy to Github Page

Authors

qantas-code-test's People

Contributors

kieradog avatar

Forkers

matwming

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.