1.2.0 • Published 5 years ago

oneview-components-beta v1.2.0

Weekly downloads
-
License
-
Repository
github
Last release
5 years ago

Rogers Angular5+ Component Library

Common components that used for all Angular5+ applications at Rogers Communications Inc.

It follows Angular Package Format.

Getting Started

$ npm install oneview-components

 import {AgentHeaderModule, AgentFooterModule} from 'oneview-components'; 

Commands

  • npm start to start test application for all modules
  • npm run build to build library and test application for production
  • npm test to run tests
  • npm run test:coverage to see the coverage report
  • npm run lint to run code linting
  • npm run doc to generate documentation
  • `npm run publish to publish to unpkg.com(npmjs.com)

Directory Structure

.
├── demo  # application to test all components
│   ├── codecept.json
│   ├── my-first-codecept-test.js
│   ├── index.html
│   └── src
├── src   # angular modules
│   ├── index.ts      
│   ├── jest-setup.ts
│   ├── agent-header
│   │   ├── index.ts
│   │   ├── package.json
│   │   └── src
│   └── module-two
│       ├── index.ts
│       ├── package.json     # to build a separate bundle
│       └── src
├── package.json
├── tsconfg.json
└── tslint.json

Tech. Stack

  • Jest for unit test
  • CodeceptJS for acceptptance
  • ng-packagr for module packaging

Why Jest for unit test, instead of Mocha/Karma?

  • Test runner built-in
  • Less configuration
  • Faster test running
  • Test coverage built-in
  • Spies/Mocks(including timers) built-in
  • Snapshot testing
  • Simple/easy conding style

Why CodeceptJS for acceptance test, instead of WebDriver or Nightmare?

  • Automatic sync/wait handling
  • Business-friendly test language(Scenario Driven).
  • Expandalbe to more specific tests()
  • Easy to write test using interactive shell
  • Easy to write/read/maintain test scenarios even for business people.
  • Changable back-end tech stack.(WebdriverIO, Progractor, Puppeteer, etc)
  • Docker-ready
  • Full-stack test ready(REST api test, File system test)
1.2.0

5 years ago