Stabilize and Standardize VRT Infrastructure - #9651
Conversation
- Centralize setup (auth mock, server reset, UI freeze) and teardown (timer stop) in Playwright fixtures. - Aggressively disable animations, transitions, and scrollbars via `freezeUIForVRT` (CSS injection). - Automatically mask `.variable-text-container` in `takeScreenshot` globally. - Improve mobile viewport VRT with layout awaiting and explicit clipping. - Clean up spec files by removing redundant boilerplate. Co-authored-by: arii <342438+arii@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
👋 Welcome to HRM!Thanks for your contribution. This repository uses Gemini AI for automated triage, code review, and generation. 🤖 Gemini Manual Trigger Quick Reference
For more details and GitHub CLI examples, see the Manual Trigger Guide. |
ℹ️ Gemini Review DisabledAutomatic review is currently disabled via Via Comment: Via GitHub Actions:
Via GitHub CLI: gh workflow run reusable-gemini-review.yml -f pr_number=9651🤖 Gemini Manual Trigger GuideTo re-enable: Set repository variable |
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
- Centralize setup (auth mock, server reset, UI freeze) and teardown (timer stop) in Playwright fixtures. - Aggressively disable animations, transitions, and scrollbars via `freezeUIForVRT` (CSS injection). - Automatically mask `.variable-text-container` in `takeScreenshot` globally. - Improve mobile viewport VRT with layout awaiting and explicit clipping. - Clean up spec files by removing redundant boilerplate. - Fixed linting errors (unused imports and prettier formatting). Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
🤖 AI Technical AuditPR #9651: VRT Infrastructure Stabilization Review🏗️ Architectural ImpactThis PR significantly shifts the burden of test environment consistency from individual test files to Playwright fixtures. By leveraging 🛡️ ANTI-AI-SLOP DIRECTIVES
📁 File-by-File Analysis
|
- Refactor Playwright fixtures to use provided `context`, improving lifecycle management. - Remove redundant boilerplate and verbose comments in fixtures and spec files. - Simplify `freezeUIForVRT` by removing redundant `addStyleTag` and keeping only `addInitScript`. - Clean up JSDocs in `setup.ts`. - Refine masking logic in `takeScreenshot` for better readability and robustness. - Fix linting errors in `mocks.ts`. - Maintain all previous stabilization improvements (auth mock, server reset, mobile viewport clipping). Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
This PR significantly stabilizes and standardizes the Visual Regression Testing (VRT) infrastructure, which is a critical improvement for the project's quality assurance. The changes demonstrate a strong adherence to the VRT stabilization standards outlined in Key improvements include:
Overall, this PR is a well-executed refactor that significantly enhances the reliability and maintainability of our VRT suite. The changes align perfectly with our guiding principles for code quality and conciseness.
🤖 Gemini Manual Trigger Guide |
- Refactor Playwright fixtures to use provided `context`, improving lifecycle management. - Remove redundant boilerplate and verbose comments in fixtures and spec files. - Simplify `freezeUIForVRT` by removing redundant `addStyleTag` and keeping only `addInitScript`. - Clean up JSDocs in `setup.ts`. - Refine masking logic in `takeScreenshot` for better readability and robustness. - Fix linting errors in `mocks.ts`. - Maintain all previous stabilization improvements (auth mock, server reset, mobile viewport clipping). Co-authored-by: arii <342438+arii@users.noreply.github.com>
🤖 Gemini Review SkippedReview was skipped for the following reason: 🤖 Gemini Manual Trigger Guide |
This PR stabilizes the Visual Regression Testing (VRT) infrastructure by centralizing state management and UI stabilization into Playwright fixtures. It addresses flakiness caused by animations, scrollbars, and state leakage across tests.
Key changes:
dashboardPage,controlPage,mockPage, andconnectPagenow automatically handle authentication mocking, server state resets, and UI freezing.freezeUIForVRThelper aggressively disables all CSS animations, transitions, and scrollbars before the React tree mounts.takeScreenshotutility now automatically masks.variable-text-containerelements.vrt-dashboard.spec.ts,vrt-timer-controls.spec.ts, andvrt-components.spec.tsto use the new fixtures, reducing boilerplate and increasing maintainability.Fixes #9649
PR created automatically by Jules for task 3688477558357611503 started by @arii