From 0b7ce448ab055507f6947a96e2d5e114924d2c38 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Tue, 3 Nov 2026 09:35:19 +1100 Subject: [PATCH] fix(e2e): checks follow the sidebar navigation; trim stray button and caption whitespace (#1789) --- e2e/checks/accessibility.cjs | 4 ++-- e2e/checks/org-selector.cjs | 11 ++++++----- ui/src/settings/CanaryStatusCard.vue | 4 +--- ui/src/settings/ConnectionCard.vue | 4 +--- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/e2e/checks/accessibility.cjs b/e2e/checks/accessibility.cjs index 2be0adaa5..4c06e38fb 100644 --- a/e2e/checks/accessibility.cjs +++ b/e2e/checks/accessibility.cjs @@ -35,8 +35,8 @@ module.exports = async ({ page, go, shot, settled }) => { assert.ok(await skip.evaluate(el => el === document.activeElement), 'Skip link is not the first keyboard stop'); await page.keyboard.press('Enter'); assert.equal(await page.evaluate(() => document.activeElement?.id), 'main-content'); - await page.getByRole('button', { name: 'Sections', exact: true }).click(); - await page.getByRole('navigation', { name: 'Sections', exact: true }).getByRole('link', { name: 'Tasks', exact: true }).click(); + await page.getByRole('button', { name: 'Toggle Sidebar', exact: true }).click(); + await page.getByRole('list', { name: 'Sections', exact: true }).getByRole('link', { name: 'Tasks', exact: true }).click(); await page.waitForFunction(() => document.activeElement?.id === 'main-content', null, { timeout: 5000 }).catch(() => {}); assert.equal(await page.evaluate(() => document.activeElement?.id), 'main-content', 'route navigation did not focus main'); await page.getByRole('button', { name: 'Jump to', exact: true }).click(); diff --git a/e2e/checks/org-selector.cjs b/e2e/checks/org-selector.cjs index 015c4acd4..c75fd4cfe 100644 --- a/e2e/checks/org-selector.cjs +++ b/e2e/checks/org-selector.cjs @@ -1,4 +1,4 @@ -// The topbar org selector: choosing a member org reloads the dashboard into it, +// The sidebar org switcher: choosing a member org reloads the dashboard into it, // Tasks and Workflows then show only that org's work, and the API refuses an // org the caller is not a member of. const assert = require('node:assert/strict'); @@ -8,11 +8,12 @@ module.exports = async ({ page, go, shot, settled, tolerate }) => { tolerate(ABSENT); await go('/tasks'); await page.getByText('Fix flaky login test').first().waitFor(); - const picker = page.getByRole('combobox', { name: 'Organisation' }); + const picker = page.getByRole('button', { name: /^Organisation: / }); await picker.waitFor(); const offered = await (async () => { await picker.click(); - const names = await page.getByRole('option').allInnerTexts(); + await page.getByRole('menuitem').first().waitFor(); + const names = (await page.getByRole('menuitem').allInnerTexts()).map(t => t.trim().split('\n').pop().trim()); await page.keyboard.press('Escape'); return names; })(); @@ -22,9 +23,9 @@ module.exports = async ({ page, go, shot, settled, tolerate }) => { await shot('home-org-workflows'); await picker.click(); - await Promise.all([page.waitForEvent('load'), page.getByRole('option', { name: 'Beta', exact: true }).click()]); + await Promise.all([page.waitForEvent('load'), page.getByRole('menuitem', { name: 'Beta' }).click()]); await settled('/workflows'); - await page.getByRole('combobox', { name: 'Organisation' }).waitFor(); + await page.getByRole('button', { name: /^Organisation: / }).waitFor(); assert.equal(await page.getByText('Parked', { exact: true }).count(), 0, 'workflow run counts leaked across orgs'); await shot('beta-workflows'); await go('/tasks'); diff --git a/ui/src/settings/CanaryStatusCard.vue b/ui/src/settings/CanaryStatusCard.vue index 069f6cc21..db328717d 100644 --- a/ui/src/settings/CanaryStatusCard.vue +++ b/ui/src/settings/CanaryStatusCard.vue @@ -178,9 +178,7 @@ onUnmounted(() => { {{ elapsedText }} of 24h elapsed (default window)

-

- Install time not recorded, so the window cannot be measured. -

+

Install time not recorded, so the window cannot be measured.

diff --git a/ui/src/settings/ConnectionCard.vue b/ui/src/settings/ConnectionCard.vue index d28672df0..39dff221f 100644 --- a/ui/src/settings/ConnectionCard.vue +++ b/ui/src/settings/ConnectionCard.vue @@ -129,9 +129,7 @@ const unavailable = computed(() => !!connection.value.type && !extensions.forges /> {{ operation }} - +