Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.74 KB

end2end_tests.md

File metadata and controls

50 lines (34 loc) · 1.74 KB

End to End tests

Playwright is used for end-to-end tests.

Setup playwright for testing

This has to be done only once. In the frontend subdirectory run

npm install
npx playwright install

Start designer dev setup

Although the tests can be run against any running Designer installation (see below), it is recommended to start a fresh designer dev docker-compose setup. This is described in the main readme file. Nevertheless it is recommended to start a clean setup via

docker-compose -f docker-compose-dev.yml down --volumes \
    && docker-compose -f docker-compose-dev.yml build \
    && docker-compose -f docker-compose-dev.yml up --force-recreate

and in case auto-deployment is disabled run a fresh deployment of the base components / workflows via

docker run --rm \
  -e "HETIDA_DESIGNER_BACKEND_API_URL=http://hetida-designer-backend:8090/api/" \
  --name htdruntime_deployment \
  --network hetida-designer-network \
  --entrypoint python hetida-designer_hetida-designer-runtime -c 'from hetdesrun.exportimport.importing import import_transformations; import_transformations("./transformations/", update_component_code=False);'

ℹ️ Note: Malformed components / workloads in the running development designer setup may interfere with end-to-end tests / lead to failing tests.

Run end-to-end tests

Simply run

npm run e2e-all

in the frontend directory.

In the case that the designer installation against which you want to run the tests provides its frontend at a different URL than http://localhost you may provide the frontend URL via environment variable:

PLAYWRIGHT_TARGET_URL="http://my-domain/hd-frontend" npm run e2e-all