Skip to content

Conversation

@alionazherdetska
Copy link
Contributor

📄 Description

Please include a summary of the changes made in this PR.

🚀 Demo

If applicable, please add a screenshot or video to illustrate the changes.


🔮 Design review

  • Design review done
  • No design review needed

📝 Checklist

  • ✅ My code follows the style guidelines of this project
  • 🛠️ I have performed a self-review of my own code
  • 📄 I have made corresponding changes to the documentation
  • ⚠️ My changes generate no new warnings or errors
  • 🧪 I have added tests that prove my fix is effective or that my feature works
  • ✔️ New and existing unit tests pass locally with my changes

Copilot AI review requested due to automatic review settings December 9, 2025 18:51
@alionazherdetska alionazherdetska requested a review from a team as a code owner December 9, 2025 18:51
@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2025

⚠️ No Changeset found

Latest commit: 19a4919

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@swisspost-bot
Copy link
Contributor

swisspost-bot commented Dec 9, 2025

Related Previews

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 introduces comprehensive visual regression testing for the post-header component using Playwright. The implementation adds test infrastructure, helper utilities, and HTML fixtures for testing 7 header variants (portal, microsite, jobs, and onepager - each with logged-in/out states) across 3 breakpoints (desktop, tablet, mobile) and 3 browsers (Chromium, Firefox, WebKit).

Key changes:

  • Adds Playwright test framework with configuration for visual regression testing
  • Creates reusable test helpers for interacting with header components (megadropdowns, language menus, user menus, burger menus)
  • Implements consolidated test suite that efficiently tests shared features once while testing variant-specific features separately
  • Sets up GitHub Actions workflow with snapshot caching and optimization

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
packages/components/playwright.config.ts Playwright configuration with test directories, screenshot settings, and multi-browser setup
packages/components/visual-tests/post-header.consolidated.spec.ts Main test suite implementing comprehensive visual regression tests for all header variants
packages/components/visual-tests/helpers/header-test-helpers.ts Reusable helper functions for interacting with header components (hover, focus, open/close actions)
packages/components/visual-tests/helpers/header-variants.config.ts Configuration defining feature sets for each header variant to enable selective testing
packages/components/visual-tests/components/*.html HTML test fixtures for 7 header variants (onepager, microsite logged-in/out, jobs logged-in/out, portal logged-in/out)
packages/components/package.json Adds test:visual scripts and Playwright/http-server dependencies
packages/components/tsconfig.json Includes Playwright types and visual-tests directory in compilation
packages/components/tsconfig.eslint.json Extends ESLint configuration to include visual test files
packages/components/stencil.config.ts Excludes visual-tests from Jest coverage
packages/components/.gitignore Ignores test results and generated screenshot artifacts
package.json Adds convenience scripts at root level for running visual tests
.github/workflows/visual-tests.yaml GitHub Actions workflow for automated visual regression testing with caching
pnpm-lock.yaml Updates lock file with Playwright and http-server dependencies
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
3 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants