Problems installing and running functional tests

I'm trying to install and run the functional tests, as stated in the docs.

This makes an error:

cd ./main/tests/cypress
yarn install

And I also have problems with this:

 ./refine e2e_tests
Using refine.ini for configuration
Starting OpenRefine server
Waiting for OpenRefine to load...
... proceed with the tests.

Starting Cypress...
yarn --cwd ./main/tests/cypress run cypress run --spec cypress/e2e/**/*.cy.js --browser electron --headless --quiet --reporter list --env DISABLE_PROJECT_CLEANUP=1,OPENREFINE_URL=http://127.0.0.1:3333
Usage: yarn [options]

yarn: error: no such option: --cwd

Killing OpenRefine
Cleaning up
Error: The UI test suite failed.

Why?

Regards, Antoine

What does yarn --version show?

Our CI does basically this (with Node 20 already installed in it's runner):

cd ./main/tests/cypress
npm i -g yarn
yarn install

Take a look at one of the previous workflow runs:

1 Like

Hmm, also, you can run directly via:
yarn --cwd ./main/tests/cypress run cypress open

I've merged my left-behind PR just now, so the docs updated should help explain things a bit better for local testing. Let me know if not!