Add demo Hugo site and Playwright tests for YouTube module#1830
Open
davidsneighbour wants to merge 1 commit into
Open
Add demo Hugo site and Playwright tests for YouTube module#1830davidsneighbour wants to merge 1 commit into
davidsneighbour wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive end-to-end testing infrastructure for the YouTube Hugo module by introducing a demo site and Playwright test suite to verify both shortcode and partial-based video embeds.
Key Changes:
- Created a minimal Hugo demo site under
modules/youtube/sitewith example content demonstrating shortcode and partial usage - Implemented Playwright tests that build the site, serve it locally, and verify interactive behaviors like iframe injection and custom element registration
- Updated module documentation with testing guidance and best practices for Hugo shortcode/partial testing
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
modules/youtube/tests/youtube.spec.ts |
Playwright test suite verifying lite-youtube element rendering, iframe injection, and custom element registration |
modules/youtube/site/layouts/_default/single.html |
Single page template supporting partial-based YouTube embeds via front matter |
modules/youtube/site/layouts/_default/list.html |
List template for demo site navigation |
modules/youtube/site/layouts/_default/baseof.html |
Base HTML template with CSS/JS asset pipeline and basic styling |
modules/youtube/site/go.mod |
Go module configuration mounting the parent YouTube module |
modules/youtube/site/content/shortcodes.md |
Demo page exercising multiple shortcode variants with different parameters |
modules/youtube/site/content/partials-demo.md |
Demo page showcasing partial-based embed with custom configuration |
modules/youtube/site/content/_index.md |
Homepage with navigation links to demo pages |
modules/youtube/site/config/_default/hugo.toml |
Hugo configuration enabling YouTube module and privacy settings |
modules/youtube/playwright.config.ts |
Playwright configuration for Chrome-based testing with generous timeouts |
modules/youtube/package.json |
Added Playwright dependency and test scripts |
modules/youtube/documentation/index.md |
Added comprehensive testing section with best practices and strategy guidance |
modules/youtube/.gitignore |
Excludes test artifacts and generated site files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
modules/youtube/siteshowcasing shortcode and partial embeds for the test videoTesting
Codex Task