You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Test only the element properties panel feature at http://localhost:5175.
57
+
"Test the arrow-key navigation and selection label feature at http://localhost:5175.
56
58
Do not explore unrelated flows. If a step is blocked after one retry, fail with evidence.
57
59
58
60
react-grab is a browser overlay tool that lets you inspect React elements.
59
61
When active, hovering over elements shows a selection label with the element
60
-
tag name and component name.
62
+
tag name and component name (e.g. 'h1' or 'MyComponent.div').
61
63
62
64
Important repo-specific testing notes:
63
65
1. This GitHub Actions run is on Linux, so the default activation shortcut is Ctrl+C.
@@ -73,27 +75,32 @@ jobs:
73
75
document.querySelector('[data-react-grab]')?.shadowRoot, especially
74
76
[data-react-grab-selection-label].
75
77
6. After activation, hover an element, click it to select it, then use ArrowUp / ArrowDown
76
-
to navigate and verify the panel updates.
77
-
78
-
What changed in this branch:
79
-
The old inspect stack (a list of ancestor elements you could arrow-navigate through)
80
-
has been replaced with an element properties panel that appears below the selection
81
-
label when you arrow-navigate. This panel shows:
82
-
- Size: width x height in pixels.
83
-
- CSS Properties: color (with color swatch), background color (with swatch), font size + family, margin, padding, display, flex direction, gap, grid columns, position, overflow.
84
-
- className: the elements CSS classes (line-clamped to 3 lines).
85
-
- React Props section: props from the nearest React composite fiber (excluding children, key, ref). Values are formatted (strings quoted, functions as fn(), arrays as [length], objects as {count}).
86
-
- Accessibility section: accessible name (aria-label / aria-labelledby / alt), role (explicit or implicit), keyboard-focusable indicator (check/X icon).
87
-
- Contrast badge: when both foreground color and non-transparent background exist, shows the WCAG contrast ratio with AA/AAA pass/fail badges (green = pass, red = fail).
88
-
- Box model overlay: margin regions rendered as semi-transparent overlay around the selection, padding regions rendered inside.
78
+
to navigate between elements. ArrowUp moves to a parent/stacked element,
79
+
ArrowDown reverses that. ArrowLeft navigates to parent, ArrowRight to child.
80
+
7. When arrow navigation is active, an arrow navigation menu appears inside the
81
+
selection label showing the list of stacked/ancestor elements. Each item shows
82
+
the tag name and optionally the React component name. The active item is fully
83
+
opaque while inactive items are dimmed.
84
+
85
+
IMPORTANT: Run every test scenario to completion. If a step fails, record the failure
86
+
with evidence (screenshot or error) but continue testing remaining steps. Do not bail early.
89
87
90
88
Test scenarios:
91
-
1. Activate react-grab with Ctrl+C, hover over the Todo List heading, click to select it, then press ArrowUp to navigate to parent — verify the properties panel appears showing size, font info, and class names.
92
-
2. Select a button element (e.g. Submit button in the form section) — navigate with arrows and verify the panel shows the buttons role as button and keyboard-focusable as Yes.
93
-
3. Select a text element and check that color swatches appear next to Color and Background values.
94
-
4. Select a table cell and verify the accessibility section shows role cell.
95
-
5. Select an input element and verify it shows role textbox and is keyboard-focusable.
96
-
6. Navigate between elements with arrow keys and verify the panel updates with new element properties each time."
89
+
1. Activate react-grab with Ctrl+C, hover over a list item, click to select it — verify the selection label appears showing the element tag name.
90
+
2. Press ArrowUp — verify the selection box moves to a parent or stacked element and the selection label updates to show the new element tag name.
91
+
3. Press ArrowDown to reverse the ArrowUp navigation — verify the selection returns to the previous element.
92
+
4. Press ArrowLeft from a child element — verify navigation moves to the parent element and the selection box grows larger.
93
+
5. Press ArrowRight from a container element — verify navigation moves to a child element.
94
+
6. Navigate between multiple elements with arrow keys — verify the selection label updates with the correct tag name each time and the overlay remains visible throughout."
95
+
96
+
- name: Upload session recording
97
+
if: always()
98
+
uses: actions/upload-artifact@v4
99
+
with:
100
+
name: expect-session-recording
101
+
path: /tmp/expect-replays/
102
+
if-no-files-found: ignore
103
+
retention-days: 14
97
104
98
105
- name: Print expect debug logs
99
106
if: always()
@@ -103,3 +110,9 @@ jobs:
103
110
else
104
111
echo "No .expect/logs.md file found"
105
112
fi
113
+
114
+
- name: Fail if expect tests failed
115
+
if: steps.expect.outcome == 'failure'
116
+
run: |
117
+
echo "::error::expect tests failed — see logs and artifacts above"
0 commit comments