From bd69c482c05b71b1234327582bb05fccfff1556f Mon Sep 17 00:00:00 2001 From: Duc Trung LE Date: Fri, 15 Oct 2021 18:06:28 +0200 Subject: [PATCH] Split test project --- .eslintignore | 1 + .github/workflows/ui-tests.yml | 7 +++++++ docs/source/contribute.rst | 9 +++++---- ui-tests/package.json | 3 ++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.eslintignore b/.eslintignore index 68b6db135..8e5e20199 100644 --- a/.eslintignore +++ b/.eslintignore @@ -12,6 +12,7 @@ node_modules **/schemas **/themes **/templates +**/widget_lib coverage *.map.js *.bundle.js diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 0e525d0fe..9d179ad3f 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -73,6 +73,13 @@ jobs: resource: http-get://localhost:8868/ timeout: 360000 + - uses: iterative/setup-cml@v1 + - name: Stability test + shell: bash + run: | + cd ui-tests + jlpm run test-stability + - name: Launch Voila run: | cd ui-tests diff --git a/docs/source/contribute.rst b/docs/source/contribute.rst index d3fe40f9f..d5801101d 100755 --- a/docs/source/contribute.rst +++ b/docs/source/contribute.rst @@ -237,19 +237,20 @@ Install `Playwright` and `Chromium` browser: jlpm install --frozen-lockfile jlpm playwright install chromium -Start `VoilĂ ` server for snapshot and stability testing: +Start `VoilĂ ` server and run the snapshot tests: .. code-block:: bash # In ui-tests folder jlpm start - jlpm start-stability + jlpm test -Finally, to run the tests: +To run the stability tests: .. code-block:: bash - jlpm run test + jlpm start-stability + jlpm test-stability Editing templates ================= diff --git a/ui-tests/package.json b/ui-tests/package.json index c4e0704cb..c97502cf3 100644 --- a/ui-tests/package.json +++ b/ui-tests/package.json @@ -7,7 +7,8 @@ "start": "voila ../notebooks --no-browser", "start-stability": "voila ./notebooks --no-browser --enable_nbextensions=True --port 8868", "start:detached": "yarn run start-jlab&", - "test": "playwright test", + "test": "playwright test --project render-and-benchmark", + "test-stability": "playwright test --project stability-test", "test:debug": "PWDEBUG=1 playwright test", "test:report": "http-server ./playwright-report -a localhost -o", "test:update": "playwright test --update-snapshots"