dkan-tools icon indicating copy to clipboard operation
dkan-tools copied to clipboard

Document and complete project-specific test commands

Open dafeder opened this issue 3 years ago • 1 comments

dafeder avatar Jun 21 '21 14:06 dafeder

@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-app installs its own version of Cypress when added to src/frontend.
  • In DKAN tools dkanTestCypress command installs a version of using npm install cypress then npx to 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 cypress we include a package.json in the DKAN repo so we can control the version of Cypress and just run npm install in 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.

dgading avatar Jul 23 '21 14:07 dgading