Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.03 KB

Testing.md

File metadata and controls

37 lines (26 loc) · 1.03 KB

How To Run Tests

Quick guide.

cd docsgen/testing
./run_test.sh

What

We run Cypress. The tests are in testing/cypress/e2e/devtools_simple_spec.cy.js

Why

Docusaurus is a single page app, we need a headless browser to evaluate the DOM.

Configuration

By default http://localhost:3000 is running to test against.

cd $BUILD_DIR/devdocs
npm run serve -- --port 3000

The host and http protocol is configurable by changing testing/cypress.config.js. In addition, the contracts repository differs between ENF and AntelopeIO organizations. The name of the contracts repository is also set in testing/cypress.config.js

Screenshots

When a test fails a screenshot is

Testing Directory Overview

  • cypress : end to end tests
    • fixtures : ignore, some stuff that comes with cypress
    • screenshot : images of browser from last failed test, or generated by specific request
    • support : cypress test harness
  • markdown : sample docs for testing python scripts
  • node_modules : npm packages to support testing