dkan-tools
dkan-tools copied to clipboard
Document and complete project-specific test commands
@dafeder This was the first pass trying to collect the information from Slack and conversations. How does this look to you?
The goal for the ticket is to have a central location for running Cypress so it isn't installed multiple times per DKAN installation.
Current Setup:
-
data-catalog-appinstalls its own version of Cypress when added tosrc/frontend. - In DKAN tools
dkanTestCypresscommand installs a version of usingnpm install cypressthennpxto run it. The issue with this is there is no package-lock file so the version may be different and with how fast Cypress updates this could invalidate tests.
Suggested Setup:
- When using dkan tools to install a new site, we should collect all the tests in one location.
- We can probably leave the current DKAN tools stuff in place, but instead of using
npm install cypresswe include apackage.jsonin the DKAN repo so we can control the version of Cypress and just runnpm installin that folder. - During the frontend link process during a site setup, we should symlink the Cypress folders for the frontend tests with the cypress folder that is in the core DKAN code.
- Once these are connected, we could then use Cypress cli tools to give options on which tests to run. I think most Cypress fixtures and specs work through sub folders so naming will be important.