libero / reviewer-client

The client for "libero reviewer"
MIT License
3 stars 1 forks source link
libero-reviewer publishing react

reviewer-client

The client for "libero reviewer".

Requirements - [Docker] - [GNU Make] - [Node.js] - [timeout] (on MacOSX this can be obtained with `brew install coreutils`)

The project contains a Makefile which uses Docker for development.

Browsertest Results

Testing Powered By SauceLabs

Development

  1. make setup

  2. Run client options:
    Test: mock everything with reviewer-mocks

    make start_test

    Dev: run against local reviewer-submission and continuum-adaptor, only mock continuum

    # start local instances of submission and adaptor
    cd ../reviewer-submission ; make setup ; make start_dev
    cd ../continuum-adaptor ; make setup ; make start
    
    cd ../reviewer-client
    make start_dev

    CI: lint, test and browsertest akin to pipeline

    make run_ci

    CI-localhost: same as CI but exposed on localhost

    make build_prod
    make start_ci_localhost
  3. Run tests:

    • make lint: lint code
    • make test: unittests
    • make test_browser: locally executed browsertests, use with start_test, start_dev or start_ci_localhost
    • make test_browser_containerized: use with build_prod ; start_ci
    • make test_browser_saucelabs: browsertests run against saucelabs, use with start_test, start_dev or start_ci_localhost

    To use saucelabs you need an account and have to set SAUCE_USERNAME and SAUCE_ACCESS_KEY env vars.

  4. make stop to teardown

Adding Browsertests

Browsertests will be run against SauceLabs for a variety of browsers but we also create a container that runs them against Chrome. Having containerized browsertests lets us run them easily in the umbrella repo or as part of a helm release.

SauceLabs kindly grants us test capacity as part of their OpenSauce program.

Make sure to include something like this for all browsertests:

import { DashboardPage, FilesPage, LoginPage, AuthorDetailsPage, DetailsPage, NavigationPane } from '../page-objects';
import { BASE_URL } from '../../test-utils/baseUrl';

fixture`Getting Started`.page`${BASE_URL}`;

test('assert nav bar', async() => {
  ...

Use of reviewer-mocks

The compose files use liberoadmin/reviewer-mocks:latest.