diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51f615e..7a6dd19 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: os: - ubuntu-latest - macos-latest - # - windows-latest + - windows-latest browser: - electron - chrome @@ -33,16 +33,14 @@ jobs: name: Linux - os: macos-latest name: macOS - # currently only one Windows test - os: windows-latest name: Windows - browser: electron - # - os: windows-latest - # name: Windows - # browser: edge - # exclude: - # - os: windows-latest - # browser: webkit + - os: windows-latest + name: Windows + browser: edge + exclude: + - os: windows-latest + browser: webkit name: ${{ matrix.name }} - ${{ matrix.browser }} runs-on: ${{ matrix.os }} @@ -85,5 +83,5 @@ jobs: wait-on: 'http://localhost:5173' browser: ${{ matrix.browser }} - name: Run test (Windows) - run: npm test + run: CY_BROWSER=${{ matrix.browser }} npm test if: matrix.os == 'windows-latest' diff --git a/README.md b/README.md index 1403ec3..ca91ea9 100644 --- a/README.md +++ b/README.md @@ -202,10 +202,11 @@ You can run ``` npm install -npm run test +npm test ``` -for the automated cypress tests. +for the automated cypress tests. You can use the environment variable `CY_BROWSER` to select the +desired browser: `CY_BROWSER=chrome npm test` ### Docker image diff --git a/package.json b/package.json index 7f4f791..4c11c69 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "watch:copyfiles": "nodemon --watch ./src --exec \"npm run build:copyfiles\"", "build:copyfiles": "cd src && copyfiles \"**/*.json\" \"**/*.css\" \"**/*.ttf\" \"**/*.otf\" \"**/*.svg\" ../dist/", "build": "tsc && webpack && npm run build:copyfiles", - "test": "npm run setup_demo && concurrently --hide 0 --kill-others \"npm start\" \"wait-on http://localhost:5173 && cypress run\" -n server,cypress -s command-cypress" + "test": "npm run setup_demo && concurrently --hide 0 --kill-others \"npm start\" \"wait-on http://localhost:5173 && cypress run --browser ${CY_BROWSER=electron}\" -n server,cypress -s command-cypress" }, "dependencies": { "@leanprover/infoview": "^0.7.3",