Skip to content

Commit 3ee65c5

Browse files
test: webkit flake. (#83)
1 parent 73436ac commit 3ee65c5

2 files changed

Lines changed: 25 additions & 4 deletions

File tree

playwright/helpers/app-test-helpers.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,15 @@ export const ensureDiagnosticsDrawerOpen = async (page: Page) => {
293293
const isExpanded = await toggle.getAttribute('aria-expanded')
294294

295295
if (isExpanded !== 'true') {
296-
await toggle.click()
296+
try {
297+
await toggle.click({ timeout: 2_000 })
298+
} catch {
299+
/* WebKit can report pointer interception from the drawer during transitions. */
300+
await toggle.focus()
301+
await page.keyboard.press('Enter')
302+
}
303+
304+
await expect(toggle).toHaveAttribute('aria-expanded', 'true')
297305
}
298306

299307
await expect(page.getByRole('complementary', { name: 'Diagnostics' })).toBeVisible()

src/styles/ai-controls.css

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,21 +350,34 @@
350350
align-items: center;
351351
gap: 6px;
352352
margin-left: 2px;
353+
--workspaces-toggle-color: color-mix(in srgb, #60a5fa 84%, var(--panel-text));
354+
--workspaces-toggle-color-disabled: color-mix(
355+
in srgb,
356+
var(--text-muted) 82%,
357+
var(--panel-text)
358+
);
353359
color: color-mix(in srgb, var(--panel-text) 84%, var(--text-subtle));
354360
}
355361

356362
.diagnostics-toggle.workspaces-toggle:hover:not(:disabled) {
357-
color: color-mix(in srgb, var(--accent) 82%, var(--panel-text));
363+
color: var(--workspaces-toggle-color);
364+
}
365+
366+
.diagnostics-toggle.workspaces-toggle:disabled {
367+
opacity: 0.64;
368+
cursor: not-allowed;
369+
--workspaces-toggle-color: var(--workspaces-toggle-color-disabled);
370+
color: color-mix(in srgb, var(--text-muted) 82%, var(--panel-text));
358371
}
359372

360373
.workspaces-toggle__icon {
361374
width: 16px;
362375
height: 16px;
363-
fill: currentColor;
376+
fill: var(--workspaces-toggle-color);
364377
}
365378

366379
.workspaces-toggle__icon path {
367-
fill: currentColor;
380+
fill: var(--workspaces-toggle-color);
368381
}
369382

370383
.github-pr-context-close {

0 commit comments

Comments
 (0)