Skip to content
New issue

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

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

Already on GitHub? # to your account

test: use meta tag content in opengraph image test #1

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

stefanprobst
Copy link
Contributor

currently we check if an opengraph image has been generated by simply requesting /:locale/opengraph-image.

however, when nested inside a route group, next.js will add a hash to the pathname, e.g. opengraph-image-123456, because multiple files could resolve to the same path - think app/opengraph-image.tsx and app/(app)/opengraph-image.tsx.

this pr fixes the test by retrieving the opengraph image url from the <meta property="og:image"> element's content attribute.

@stefanprobst stefanprobst merged commit c1a0e5d into main Jan 15, 2025
2 checks passed
@stefanprobst stefanprobst deleted the test/fix-opengraph-image-test branch January 15, 2025 12:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant