feat(cli): implement non-invasive UX Journey testing framework#23030
feat(cli): implement non-invasive UX Journey testing framework#23030NTaylorMullen wants to merge 3 commits into
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes a foundational framework for non-invasive UX testing within the Gemini CLI. It allows developers to verify the presence and state of React components in the terminal UI without altering the production code. By integrating automatic component discovery, deterministic waiting mechanisms, and an SVG-based audit trail, the framework significantly enhances the reliability and maintainability of visual tests, ensuring a consistent user experience. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
6de1e0c to
cd37a59
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a robust and non-invasive UX Journey testing framework, which is a significant improvement for UI testing reliability. The approach of using a modified reconciler to inject test metadata, combined with custom matchers and SVG audit trails, is well-executed and avoids polluting production code. The new waitForComponent and toVisuallyContain utilities provide a clean API for writing these tests. I have one suggestion to further improve the maintainability and type safety of the new test utilities.
998967d to
daf5114
Compare
|
Size Change: -4 B (0%) Total Size: 26.2 MB
ℹ️ View Unchanged
|
…sting - Expose Ink rootNode in AppRig and render utilities for tree traversal - Add toVisuallyContain matcher to verify component presence in the Ink DOM - Inject component metadata as comments into generated SVGs for auditing - Add waitForComponent to AppRig for deterministic UI state synchronization - Implement visual journey test for SuggestionsDisplay
…sting - Enhance AppRig and matchers to support robust component discovery via node attributes and styles - Update SuggestionsDisplay to support logical component tagging - Fix act() warnings and stability issues in SuggestionsDisplay tests - Refresh snapshots and rebase on origin/main
daf5114 to
05bf04c
Compare
- Replace 'any' with 'TestableDOMNode' for Ink tree traversal in AppRig and custom matchers - Rename 'toVisuallyContain' to 'toContainComponent' for clarity - Remove SVG audit trail (component injection) to prevent snapshot churn
Summary
This PR introduces a robust "UX Journey" testing framework for Gemini CLI, enabling non-invasive verification of React component presence and visual state in the terminal.
Details
The framework allows for "White Box" testing of the terminal UI without requiring manual instrumentation (sentinels) of production components. Key features include:
SuggestionsDisplay).rig.waitForComponent('Name')to handle asynchronous UI transitions reliably.<!-- component: SuggestionsDisplay -->), allowing for logical verification of "hidden" or flickering components in PR reviews.Related Issues
Part of the effort to improve visual testing reliability.
How to Validate
Run the new UX journey test:
npm test -w @google/gemini-cli -- src/ui/components/SuggestionsDisplay.ux.test.tsxPre-Merge Checklist