metacatui
metacatui copied to clipboard
Create UI test suite
- Use Selenium
- Review ESS-DIVE's Selenium test suite to see what we can merge into the main code base (reduce their tech debt and save us time!)
| Scenario (only scenarios scored 5) | Test needed | Test type | Cost (5=high cost) |
|---|---|---|---|
| Download a dataset | UI test to click download all button | UI | 3 |
| Download a single file | UI test to click sinigle download button | UI | 3 |
| See a list of new submissions | UI test to check search results render | UI | 3 |
| View metadata | UI test to navigate from search reesult page to metadata page | UI | 3 |
| View metadata | UI test to navigate from saved editor to metadata page | UI | 3 |
| View metadata | UI test to check that resource map table and EML renders | UI | 4 |
| Edit metadata | UI test to edit existing dataset | UI | 5 |
| Submit data files | UI test to add data file to dataset and save | UI | 5 |
| Submit metadata | UI test to create requirements-only submission | UI | 5 |
In case it's useful, Chrome's DevTools now has a preview-level feature called Recorder for recording Puppeteer flows. Checkly also provides a Chrome extension for generating Playwright and Puppeteer flows. I'm not sure if similar things exist for Selenium.
Here is an alternative approach to add some UI tests:
From @ianguerin:
Using a "harness" is a great way to hide the implementation details, especially when writing tests for reusable components. this way if the class name of something changes, we'll only need to update the harness, rather than every single test that uses the reusable view.
from https://github.com/NCEAS/metacatui/pull/2258