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

Ensure unit tests for preview links are more robust #11725

Merged

Conversation

lb-
Copy link
Member

@lb- lb- commented Mar 4, 2024

- The word "Preview" can exist in multiple locations, especially for new code
- Instead of checking the word preview exists or does not exist, use Soup to check for the link specifically
@lb- lb- added type:Cleanup/Optimisation component:Preview Page lives preview functionality, viewing drafts labels Mar 4, 2024
Copy link

squash-labs bot commented Mar 4, 2024

Manage this branch in Squash

Test this branch here: https://lb-fixmore-robust-preview-link-2astu.squash.io

@laymonage laymonage merged commit caf9142 into wagtail:main Mar 5, 2024
18 checks passed
@Stormheg
Copy link
Member

Stormheg commented Mar 5, 2024

Nice to see my work from #10708 being of use here ❤️

@lb- lb- deleted the fix/more-robust-preview-link-unit-tests branch March 5, 2024 22:14
@lb-
Copy link
Member Author

lb- commented Mar 5, 2024

Thanks @laymonage and yes, @Stormheg - having the helpers for using Soup makes it so much easier. It's almost like writing a Jest test ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:Preview Page lives preview functionality, viewing drafts type:Cleanup/Optimisation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants