-
Notifications
You must be signed in to change notification settings - Fork 63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I ran the tests locally and they passed 🎉 Nice work! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you plan to add any more tests, @krysal ?
I think it is important for e2e tests to test both Server-side rendering and client-side rendering. For single image result I think it might get flaky to try to navigate from search result to single image result, as we cannot guarantee the order of the results.
And still, I think we should add a test that would check not for the specific author name or title, but that the items like author or title are there when navigating from search result to single image result.
Just a note—if we're going to rename routes we'll need to add a redirect somewhere so old urls aren't broken |
@obulat I think in this case both modes are tested at least very basically. The client-side navigation in the case I added to I updated the test to be more general, although before I wanted to make it really specific, controlling the data passed to pages and asserting the specific names, title, and text info in general, as is the only way to make sure the correct data is shown, but this is complicated in the server-side mode. At first, my intention was to replace the unit test that I had commented and add the test for navigation from the search results. Do you have in mind another thing specifically that should be tested here? @zackkrida Good call, I'll add the redirect. |
The tests currently mock the client-side requests, but not the server-side ones. So, the first server-side render is happening without mocking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fixes
Fixes #472 by @krysal
Description
This PR:
/photos/
route to/image/
as Openverse serves more than photosI wanted to add these tests to the GitHub action workflow but they're still kind of flaky, depending on internet to make requests as the
route.fulfill
method doesn't seem to work.Testing Instructions
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin