mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-02 02:42:28 +00:00
- Refactor `popover.spec.ts` to use shared helper functions in `helpers/popoverUtils.ts`, resolving potential ReferenceErrors. - Add `ensureTestAssets` check to E2E tests (`ui-modals.spec.ts`, `popover.spec.ts`) to verify `css/tailwind.generated.css` exists before running, preventing confusing 404 errors. - Fix visual regression instability in `kitchen-sink.spec.ts` by enforcing explicit viewport dimensions and resetting body margins in injected styles. - Update `KNOWN_ISSUES.md` to remove the resolved issues. Co-authored-by: PR0M3TH3AN <[email protected]>
1.9 KiB
1.9 KiB
Known Issues
Tests
Unit Tests
npm run test:unitconsistently times out in the CI environment due to resource constraints. Targeted testing (test:dm:unit,test:dm:integration) is recommended.
Visual Regression Tests (test:visual)
- Artifact Retention: Visual tests are configured to retain screenshots, traces, and videos on failure to assist with debugging. These artifacts can be found in
artifacts/test-results/.
CSS / Design System
- The global CSS (
css/tailwind.source.css) was updated to fix a linter error by usingcalc(theme("screens.md") - var(--breakpoint-edge-offset))instead of raw pixels.
Retrospective & Future Improvements
Challenges
- Generated Artifacts: The build process modifies
css/tailwind.generated.css, which creates noise in diffs and potential merge conflicts. It is recommended to ignore this file in version control or enforce a check that it matches the build output without committing it manually in every PR. - Test Environment Isolation: Debugging visual test failures was difficult without access to the live browser UI or artifacts. The reproduction script failed due to environment restrictions on launching browsers.
- Test Flakiness: E2E tests for modals are prone to timeouts, likely due to animation/transition handling or resource loading delays in the CI environment. Using
applyReducedMotionconsistently helps but doesn't solve all timing issues.
Suggestions
- Commit Hooks: Implement a pre-commit hook that runs the linter and potentially the build to ensure generated files are in sync, or configure CI to fail if they are not.
- Dockerized Testing: Running tests in a consistent Docker container with Xvfb properly configured would help reproduce environment-specific failures locally.
- Visual Testing improvements: Ensure that test fixtures (like
moderation/fixtures/index.html) correctly force UI updates after state injection to avoid race conditions.