@oat-sa/tao-deliver-testrunner-fe

1.3.0 • Public • Published

TAO Deliver TestRunner FrontEnd

Setup

Requires node.js >= 10.0.0.

git clone git@github.com:oat-sa/tao-deliver-testrunner-fe.git
cd tao-deliver-testrunner-fe
npm install

Run with the server API

The server must have the Same Origin Policy configured to allow calls from the current URL.

The URLs can be configured within the project configuration : src/config.

In development mode

Running

npm run dev

In production mode

Update the value in src/config/production.js or modify .env file

npm run build

and push the content of the dist folder in a static web server.

Scripts

Available scripts in the project:

  • npm run dev: compile and start a dev server with watch
  • HOST=<host> PORT=<port> npm run test <testname>: run test suite
    • HOST (optional environment variable, default: 127.0.0.1): Test server listen host
    • PORT (optional environment variable, default: 8082): Test server listen port
    • testname (optional): Specific test to run. If it is not provided, all will be ran.
  • npm run test:keepAlive: start test server
  • npm run build: build for production into dist directory
  • npm run lint: check syntax of code

Docker

Environment variables

  • DELIVER_API_URL: url of backend API
  • DELIVER_STATIC_URL: url where the frontend files are located

Docker file contains multistage build, so if your system supports, you should enable it with export DOCKER_BUILDKIT=1

Create certificate

mkcert -cert-file ./docker/nginx/certs/cert.pem -key-file ./docker/nginx/certs/key.pem localhost

Production

docker-compose up -d and you can load the frontend from https://localhost:8010

Development

Build: docker build --target dev -t tao_deliver_testrunner_fe:dev .

Run: docker run --init -v $(pwd)/src:/usr/src/app/src -v $(pwd)/build:/usr/src/app/build -p8080:8080 tao_deliver_testrunner_fe:dev

Test

Build: docker build --target test -t tao_deliver_testrunner_fe:test .

Run: docker run tao_deliver_testrunner_fe:test

MathJax support

Because of its Apache license, MathJax must be not be part of the default TAO Deliver install, but should be installable manually.

To install it:

  • On cloning this repo, no code will be present in /src/lib/mathjax
  • In the project root, run chmod +x scripts/MathJax_2.6.1_install_in_TAO_Deliver.sh
  • Run ./scripts/MathJax_2.6.1_install_in_TAO_Deliver.sh to download and extract MathJax. Sources will be installed into /src/lib/mathjax and some assets will also be copied to /dist/mathjax.

Readme

Keywords

none

Package Sidebar

Install

npm i @oat-sa/tao-deliver-testrunner-fe

Weekly Downloads

0

Version

1.3.0

License

GPL-2.0

Unpacked Size

8.1 MB

Total Files

150

Last publish

Collaborators

  • juan.vazquez.tao
  • sabatkeshelashvili
  • yairtao
  • shpran
  • harroyo-oat
  • pribi
  • edwin-oat
  • llecaque
  • gauravoat
  • viktar_dzmitryieu
  • roma-derski
  • tikhanovich
  • karols
  • olechafm
  • olga-kulish-tao
  • gabriel-tao
  • jsconan
  • oatymart
  • tamasbesenyei
  • oat-admin
  • shaveko
  • wazelin
  • marpesia
  • yukipastelcat
  • gloribeloat