Skip to content

Conversation

@davidsneighbour
Copy link
Owner

Summary

  • add a minimal Hugo demo site under modules/youtube/site showcasing shortcode and partial embeds for the test video
  • document and configure Playwright end-to-end coverage for the YouTube component
  • update module tooling with Playwright dependencies and testing guidance

Testing

  • npm --prefix modules/youtube test

Codex Task

@davidsneighbour davidsneighbour marked this pull request as ready for review December 4, 2025 04:04
Copilot AI review requested due to automatic review settings December 4, 2025 04:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/site with 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants