Skip to content

fix: Add E2E test snapshots and fix coverage check#1

Merged
ShaiSrc merged 5 commits intomainfrom
fix/e2e-snapshots-and-ci
Feb 4, 2026
Merged

fix: Add E2E test snapshots and fix coverage check#1
ShaiSrc merged 5 commits intomainfrom
fix/e2e-snapshots-and-ci

Conversation

@ShaiSrc
Copy link
Copy Markdown
Owner

@ShaiSrc ShaiSrc commented Feb 3, 2026

Description

Fixes E2E test failures in the CI pipeline caused by missing Playwright visual regression snapshots. Also fixes the coverage threshold check to use the correct coverage summary file.

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
  • Refactoring (no functional changes)

Changes Made

  • Remove _snapshots_\ from .gitignore to track Playwright visual regression snapshots
  • Add all 8 E2E test snapshots for examples (animation-demo, basic-game, intro-animation, menu-demo, rpg-ui, snake-game, space-invaders)
  • Fix CI coverage check to use \coverage-summary.json\ instead of \coverage-final.json\

Testing

Test Coverage

  • All existing tests pass
  • E2E tests now pass with snapshots available

Manual Testing

Ran E2E tests locally to generate and verify snapshots:

\\�ash
npm run test:e2e:update-snapshots

All 28 tests passed

\\

Performance Impact

  • No performance impact
  • Performance improvement (include benchmark results)
  • Potential performance impact (explain and justify)

Breaking Changes

  • No breaking changes
  • Breaking changes (describe migration path below)

Checklist

  • Code follows project style guidelines (
    pm run lint\ passes)
  • TypeScript strict mode compliance (
    pm run type-check\ passes)
  • Tests pass (
    pm run test\ passes)
  • Test coverage >90% maintained
  • Build succeeds (
    pm run build)
  • Documentation updated (JSDoc, README, guides) - Not applicable
  • CHANGELOG.md updated - Will update on merge
  • Examples updated (if API changed) - Not applicable
  • Conventional commit messages used
  • Self-reviewed the code

Additional Notes

The snapshots were previously gitignored, causing the E2E tests to fail in CI since there were no baseline images to compare against. This is a common mistake when setting up Playwright visual regression tests - the snapshots need to be version controlled.

The coverage check was also broken because \coverage-final.json\ contains per-file coverage data, not the aggregated totals. The correct file is \coverage-summary.json\ which contains the \ otal\ property with line/branch/function/statement percentages.

Shai added 5 commits February 3, 2026 18:21
- Remove __snapshots__ from .gitignore to track Playwright visual regression snapshots
- Add all E2E test snapshots for examples
- Fix CI coverage check to use coverage-summary.json instead of coverage-final.json
@ShaiSrc ShaiSrc merged commit aab2c98 into main Feb 4, 2026
2 checks passed
@ShaiSrc ShaiSrc deleted the fix/e2e-snapshots-and-ci branch February 4, 2026 05:55
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.

1 participant