Use Jest as the test framework

- Remove mocha, chai, sinon and setup.js
- Add snapshot test to ApplicationHeader spec and remove skip nav link
test
- Add an update snapshot test that can be run if a page changes and the
snapshot needs to be updated
- Remove tight coupling of application structure and test in
ApplicationHeader spec

We are changing to Jest for a few reasons:
1. Jest is the testing framework used by most Vue applications and
has robust documentation
2. It requires less configuration and works out of the box
3. It includes the ability to perform snapshot testing of rendered
UI, which is much easier to maintain than trying to test specific UI
elements.

Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: I7bca3613991ebae1fd464fa3a60f079d044ed7b4
10 files changed
tree: c26efc8f6de2ce9e37057c10601830f05e724c65
  1. .github/
  2. docs/
  3. public/
  4. src/
  5. tests/
  6. .browserslistrc
  7. .env.openpower
  8. .eslintrc.js
  9. .gitignore
  10. .npmrc
  11. babel.config.js
  12. CONTRIBUTING.md
  13. jest.config.js
  14. LICENSE
  15. MAINTAINERS
  16. package-lock.json
  17. package.json
  18. postcss.config.js
  19. README.md
  20. vue.config.js
README.md

webui-vue

webui-vue is a web-based user interface for the OpenBMC firmware stack built on Vue.js.

Hold on... What happened to phosphor-webui?

phosphor-webui was built on AngularJS and AngularJS goes End of Life June 30, 2021, so this repository is hopefully its replacement. At this time, phosphor-webui still contains more features and you should consider using it.

When will this new Vue.js application reach feature parity with phosphor-webui?

The current plan is by June 2020!

Why will this application be better?

As mentioned, this application is built using Vue.js, a modern open-source Model-View-ViewModel JavaScript framework supported by an active community and strong documentation. It has been architected to allow organizations to easily update the theme to support their brand. This rewrite takes advantage of front-end development best practices and does not suffer from some of the anti-patterns that exist in phosphor-webui today.

How can I get involved?

Visit the CONTRIBUTING.md for more on how to contribute code, review some code in Gerrit, or join us in the GUI design workgroup meeting.

Project setup

Install Dependencies

npm install

Create a .env file

  1. Create the following file in the root directory
    • .env.development.local
  2. Add the following environment variable
    • BASE_URL="https://"`

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your unit tests

npm run test:unit

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

Documentation

The documentation for coding standards and components is located in the docs directory. It is created using the VuePress static site generator. Information about how to write documentation can be found on the VuePress website.

Running Locally

Run npm docs:serve