Skip to content

Commit 6becc88

Browse files
committed
test(ui-live): name the Activity card's toggle by its heading — the open stream has an Activity chip of its own
Claude-Session: https://claude.ai/code/session_01QSeKYmTYfaPbLQD4BJfomW Co-authored-by: Claude <noreply@anthropic.com>
1 parent 67276c2 commit 6becc88

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎ui/e2e/live/record-history-display.spec.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ test('the timeline stream\'s Changes chip shows display values (localized dates,
101101
// The page-open wait: the same 15 s budget the spec gives its first element.
102102
await expect(timelineSwitch, 'the Timeline switch is off for an object that is not worked').toHaveAttribute('aria-pressed', 'false', { timeout: 15_000 });
103103
const activityCard = page.getByRole('region', { name: /^(Activity|动态)$/ });
104-
const activityToggle = activityCard.getByRole('button', { name: /^(Activity|动态)$/ });
104+
// The toggle is the card heading's button: once open, the stream inside the
105+
// card has an "Activity" filter chip of its own.
106+
const activityToggle = activityCard.getByRole('heading', { name: /^(Activity|动态)$/ }).getByRole('button');
105107
await expect(activityToggle, 'the switched-off timeline is folded into a closed Activity card').toHaveAttribute('aria-expanded', 'false');
106108
await activityToggle.click();
107109
await expect(activityToggle).toHaveAttribute('aria-expanded', 'true');

0 commit comments

Comments
 (0)