WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
254 stars 202 forks source link

Critical path flow descriptions for e2e testing #580

Open sarayourfriend opened 2 years ago

sarayourfriend commented 2 years ago

Due date: 2022-04-13

Assigned reviewers

Description

Snapshots should be taken at the "landing" (final-ish) parts of the flow. A leading ! indicates these steps in the flow for each path.

Homepage to related single result

This path implicitly includes search-to-result

Happiest path (multiple pages of results)

I like the "birds" results because the pictures are pleasant AND the audio results are not just dogs barking, but feel free to replace/supplement with the "dogs", "cats" etc searches we love as well. Variety can only help!

Definitions

These could probably be adopted as navigation helpers/utilities

sarayourfriend commented 2 years ago

Note that parts of the flow are already covered (we have tests from homepage to results page for example). We just want to augment the existing tests with end-to-end user flow tests.

sarayourfriend commented 2 years ago

@WordPress/openverse-maintainers please review this RFC/proposal :pray: It totally fell off my radar.

obulat commented 2 years ago

For each of these, snapshot the last page of the flow, make sure to do "full page" screenshots.

Would this mean that these tests are visual-regression tests, not e2e tests in our terminology, @sarayourfriend?

sarayourfriend commented 2 years ago

I guess they'd be doing both. I'm not totally sure if it makes sense to separate them for these "long flow" type tests because we'd want to confirm they work in the contexts of a user actually going through the core flows.

On the other hand, we would need to have some way to disable them when testing against staging otherwise the visual regression tests will end up needing to somehow ignore differences between the tape data and production data. That's an issue we don't need to solve now though.

Do you think there's a good reason to separate these particular snapshots out into their own tests (that still preserves their ability to test the visual results of full user flows)? Right now our visual regression tests run at the same time as the other e2e tests. I'm not totally sure the distinction is that important. What do you think?

sarayourfriend commented 11 months ago

@obulat Do you think this is still worthwhile to pursue? If so, it might help to break it into smaller issues with help wanted labels?