Skip to content

feat: validate fixtures #39

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

mfranzke
Copy link
Owner

Description

Resolves #38

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

Testing

  • Tests pass locally
  • Added tests for new functionality
  • Updated existing tests
  • Manual testing completed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • 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
  • Any dependent changes have been merged and published

Browser Testing

If applicable, please test in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge

Performance Impact

If this change affects performance:

  • I have run performance benchmarks
  • Performance impact is documented
  • Performance regression is acceptable for the added functionality

Breaking Changes

If this introduces breaking changes, please describe:

Additional Notes

Any additional information that reviewers should know.

@mfranzke mfranzke self-assigned this Jul 21, 2025
@Copilot Copilot AI review requested due to automatic review settings July 21, 2025 20:56
@mfranzke mfranzke added the enhancement New feature or request label Jul 21, 2025
@mfranzke mfranzke linked an issue Jul 21, 2025 that may be closed by this pull request
Copy link

changeset-bot bot commented Jul 21, 2025

⚠️ No Changeset found

Latest commit: 91b2947

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

Copy link
Contributor

@Copilot 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 a comprehensive fixture validation system for the CSS if() polyfill that uses Playwright to test CSS transformations in real browser environments. The system validates that polyfill-processed CSS produces the same visual results as expected output across multiple browsers and viewport sizes.

  • Creates browser-based testing infrastructure using Playwright to validate CSS fixture pairs
  • Adds automated validation for media queries, @supports queries, and computed style comparison
  • Provides command-line tooling and documentation for running and managing fixture tests

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/fixtures-validation/fixture-validation.test.js Main test file implementing browser-based fixture validation with Playwright
test/fixtures-validation/fixture-validation.playwright.config.js Playwright configuration for fixture validation tests
scripts/validate-fixtures.js Command-line script for running fixture validation tests
package.json Adds Playwright dependency and test:fixtures npm script
docs/FIXTURE_VALIDATION.md Comprehensive documentation for the fixture validation system
Comments suppressed due to low confidence (1)

test/fixtures-validation/fixture-validation.test.js:31

  • [nitpick] Function name '_getFixturePairs' uses a leading underscore which typically indicates private/internal functions, but this convention isn't consistently applied elsewhere in the file. Consider renaming to 'getFixturePairs' or applying the convention consistently.
const _getFixturePairs = () => {

const polyfillUmdJs = readFileSync(polyfillUmdPath, 'utf8');

// Get all fixture pairs
const _getFixturePairs = () => {
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

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

The function '_getFixturePairs' is defined but never used in the test file. Consider removing it or implementing its usage if it was intended for fixture discovery.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

validate fixtures by chromium rendering
1 participant