Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks
dzole0311 opened this issue Jul 1, 2024 · 4 comments
Closed
2 tasks

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

dzole0311 opened this issue Jul 1, 2024 · 4 comments
Assignees

Comments

@dzole0311
Copy link
Collaborator

dzole0311 commented Jul 1, 2024

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

  • Implement a test scenario of a core feature in the veda-ui
  • Run it as part of a github action

Related Tickets

[If applicable, link any tickets that are related]

@anayeaye
Copy link

anayeaye commented Jul 1, 2024

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
Copy link
Contributor

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
Copy link
Collaborator Author

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 dzole0311 changed the title Experiment using Cypress for automating the QA of various core scenarios Spike: Automate the testing of one core feature in the veda-ui Jul 3, 2024
@dzole0311
Copy link
Collaborator Author

dzole0311 commented Jul 3, 2024

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

@aboydnw aboydnw removed the veda v2 VEDA Refactor Epic Work label Aug 29, 2024
@stephenkilbourn stephenkilbourn self-assigned this Sep 6, 2024
dzole0311 added a commit that referenced this issue Oct 23, 2024
**Related Ticket:** #1024
#1197

### Description of Changes
This adds Playwright tests of some key user flows. The tests are set to
run on the github action. On failure, an html report along with traces
containing screenshots and network calls will be attached to the
action's step.

The tests will run only on release branches (branches starting with
`release`).

### Notes & Questions About Changes

### Validation / Testing
tests can be run locally with `yarn test:e2e` and they can also be seen
in the github action.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants