NASA-IMPACT / veda-ui

Frontend for the Dashboard Evolution project
Other
19 stars 4 forks source link

Spike: Automate the testing of one core feature in the veda-ui #1024

Open dzole0311 opened 3 months ago

dzole0311 commented 3 months ago

Context

We have a simple and non-exhaustive list of some core QA scenarios for the Dashboard. What would be useful is to try to automate one of them using Cypress or Playwright, so that it runs as part of a github action.

Acceptance Criteria

Related Tickets

[If applicable, link any tickets that are related]

anayeaye commented 3 months ago

Could there be any overlap and/or is this an opportunity to collaborate on the playwright tests designed for testing out titiler and data catalog changes? For context: the backend team is interested in integration testing to ensure stac-api and titiler-api changes support veda-ui. There are also plans to integrate some GHG test requirements that have been previously implemented with selenium.

cc: @stephenkilbourn @smohiudd

stephenkilbourn commented 3 months ago

thanks for bringing it up @anayeaye. From an initial look, the Playwright tests I created in Veda-config cover the first 3 points and add in Page Objects to allow several of the other points. I leveraged Playwright since it now is more widely used than Cypress and allows parallel, cross browser testing for free, but a similar test structure could be used for Cypress.

I'm happy to set up some time and talk through what is a good path for the UI so that we don't duplicate work.

dzole0311 commented 3 months ago

Thanks for the info @anayeaye @stephenkilbourn!

I also had some concerns on how the architectural changes we're currently working on in the veda-ui repo, with the aim of it becoming a ui components library, and moving the hardcoded routes from the veda-ui repo to the veda-config instance for a more config flexibility would affect the overall testing strategy we choose now.

So I think a short call would be great, I'll set something up.

dzole0311 commented 3 months ago

Thanks all for the great call today! Summary of key points discussed (please correct me if I missed something)

  1. Playwright vs Cypress: Playwright appears more powerful, offers parallel test execution, reduced need for chaining selectors
  2. As a next step, we should proceed with a spike to implement a test scenario within the veda-ui repo. This scenario should test a core veda-ui feature (e.g., the exploration and analysis feature, or scrollytelling). @stephenkilbourn just a note that I like the idea of trying both Cypress and Playwright, but given Playwright's advantages from point 1 above, it's successful use in the veda-config project and for consistency, I already tend to lean towards using Playwright 🤔
  3. We will continue to support (and add) Playwright tests in the current veda-config repo as needed even as we transition to a framework-agnostic veda-ui library

We also shared this link as an example of an openapi validation test in the back-end: https://github.com/NASA-IMPACT/veda-backend/pull/333/files#diff-b9d39b521b2c7225321f8b81942b851b72b4432f574880643fd43583494ba2ef