uselagoon / lagoon-ui

Apache License 2.0
6 stars 2 forks source link

adds cypress to the UI #184

Closed DaveDarsa closed 4 months ago

DaveDarsa commented 8 months ago

@tobybellwood @bomoko

to run locally/ci a couple env vars are needed: CY_EMAIL CY_PASSWORD CY_URL CY_KEYCLOAK_URL CY_API

in the terminal CYPRESS_CY_EMAIL=userEmail CYPRESS_CY_PASSWORD=password CYPRESS_CY_URL="localhost:3003 for local dev" CYPRESS_CY_KEYCLOAK_URL="..." CYPRESS_CY_API="..." npx cypress open

couple things that need to be fixed:

bomoko commented 8 months ago

This is looking very good @DaveDarsa! Thanks so much for this work.

I'm doing a pretty detailed review/test of what's here atm, but a general nit about test names - I think it's important that we use the BDD style names where possible - so, for instance, it('Add/update a variable', should read something like it('should add or update a variable',

With test names I reckon we be as explicit and verbose as we need to be with describing precisely what the test is up to.

(more comments incoming as I dig :) )

DaveDarsa commented 6 months ago

to run/open locally: yarn cypress:run or yarn cypress:open

to run in ci:

  1. cd test && make up
  2. yarn build && GRAPHQL_API=http://0.0.0.0:33000/graphql KEYCLOAK_API=http://0.0.0.0:38088/auth yarn start
  3. yarn cypress:run
tobybellwood commented 4 months ago

This is looking really good - but lets go through and maybe redo into fewer commits - one for cypress, one for the fixups needed for cypress, and one for the github action, just to reduce some of the noise?