-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this 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 = () => { |
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <[email protected]>
…github.com/mfranzke/css-if-polyfill into 38-validate-fixtures-by-chromium-rendering
Description
Resolves #38
Type of Change
Testing
Checklist
Browser Testing
If applicable, please test in the following browsers:
Performance Impact
If this change affects performance:
Breaking Changes
If this introduces breaking changes, please describe:
Additional Notes
Any additional information that reviewers should know.