Skip to content

Commit e40d8a2

Browse files
committed
fix(platform): keep usage Description at Settings width and follow the 700px column in checks
- Usage events: Description now shows from the compact breakpoint. At Settings' 700px column the table sits under the 48rem wide breakpoint, so a wide-only Description never painted, breaking "Description shows at the Settings column width". - Links (live): at Settings' width the table keeps Name and Destination and splits them evenly, with the wide-only columns' facts under each name. The check asserts that layout instead of Destination's wide-table share, and finds the link by the row's own button, whose name now carries that summary. - Extension: the saved link opens from the row's target. The row center now lands on Destination text, whose tooltip host stacks above the row overlay. - Integrations: the skill removal confirm names the skill, and Dataverse's Connect is a menu now that it offers a Microsoft app credential. - Workspace pages: the record bar is the outermost block holding Back and not the heading. PageOverflow made the nav's parent a wrapper, so the Logs check passed without testing anything.
1 parent 8a1b530 commit e40d8a2

6 files changed

Lines changed: 40 additions & 16 deletions

File tree

‎apps/sim/app/(product)/o/[organizationId]/settings/_components/sections/usage/usage-events.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { useUsageEvents, useUsageView } from '@/platform/lib/data/usage'
1010
const COLUMNS = [
1111
{ key: 'when', label: 'When', kind: 'text' },
1212
{ key: 'label', label: 'Event', kind: 'text' },
13-
{ key: 'description', label: 'Description', kind: 'text', showFrom: 'wide' },
13+
{ key: 'description', label: 'Description', kind: 'text', showFrom: 'compact' },
1414
{ key: 'credits', label: 'Credits', kind: 'text' },
1515
] as const
1616

‎apps/sim/platform/checks/integrations.spec.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ test('app discovery preserves editable installed skills and sends templates to t
3838
if (!removeBox || !saveBox) throw new Error('Skill footer controls are not visible')
3939
expect(removeBox.x + removeBox.width).toBeLessThan(saveBox.x)
4040
await remove.click()
41-
const confirmation = page.getByRole('dialog', { name: 'Remove skill', exact: true })
41+
const confirmation = page.getByRole('dialog', {
42+
name: 'Remove fetch-secret-for-runtime',
43+
exact: true,
44+
})
4245
await confirmation.getByRole('button', { name: 'Cancel', exact: true }).click()
4346
await expect(remove).toBeFocused()
4447
await expect(field).toHaveValue(updated)
@@ -519,6 +522,7 @@ test('Dataverse retains an immutable environment binding when reconnecting a nam
519522
await page.goto(fixtureUrl('/integrations/microsoft_dataverse?state=full'))
520523
const main = page.getByRole('main')
521524
await main.getByRole('button', { name: 'Connect integration', exact: true }).click()
525+
await page.getByRole('menuitem', { name: 'Connect with OAuth', exact: true }).click()
522526
const connect = page.getByRole('dialog', { name: 'Connect Microsoft Dataverse', exact: true })
523527
await connect
524528
.getByRole('textbox', { name: 'Display name', exact: true })

‎apps/sim/platform/checks/live/links.spec.ts‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,23 @@ test('Links: header, Chrome install, columns, and a list that reads on as it scr
4949
)
5050
await signIn(page, memberEmail(), liveRoute('/settings/links'))
5151
await expect(page.getByRole('heading', { level: 1, name: 'Links' })).toBeVisible()
52-
const columnWidth = async (name: string) =>
53-
(await page.getByRole('columnheader', { name, exact: true }).boundingBox())?.width ?? 0
54-
const destination = await columnWidth('Destination')
55-
for (const other of ['Name', 'Description', 'Created by', 'Access', 'Updated'])
56-
expect(destination, `Destination is wider than ${other}`).toBeGreaterThan(
57-
await columnWidth(other)
58-
)
52+
// Settings' column is narrower than the table's wide layout: Name and Destination stay, and
53+
// what the wide-only columns hold reads under each name instead.
54+
await expect(page.getByRole('columnheader', { name: 'Name', exact: true })).toBeVisible()
55+
await expect(page.getByRole('columnheader', { name: 'Destination', exact: true })).toBeVisible()
56+
for (const wideOnly of ['Description', 'Created by', 'Access', 'Updated'])
57+
await expect(page.getByRole('columnheader', { name: wideOnly, exact: true })).toBeHidden()
5958

6059
const store = context.waitForEvent('page')
6160
await page.getByRole('button', { name: 'Install Sim for Chrome' }).click()
6261
await expect(await store).toHaveURL(/chromewebstore\.google\.com/)
6362

6463
await expect(rowFor(page, 'handbook')).toBeVisible()
64+
await expect(
65+
rowFor(page, 'handbook')
66+
.getByText('The company handbook', { exact: true })
67+
.filter({ visible: true })
68+
).toHaveCount(1)
6569
const pages: string[] = []
6670
page.on('request', (request) => {
6771
if (request.url().includes('/sim-links') && request.url().includes('cursor='))

‎apps/sim/platform/checks/live/settings-a.spec.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ test('links: create, find, open, edit and delete on the Platform', async ({ page
170170
await expect(dialog).toHaveCount(0)
171171
await page.getByLabel('Search links').fill(name)
172172
await expect(page).toHaveURL(new RegExp(`search=${name}`))
173-
await expect(page.getByRole('button', { name, exact: true })).toBeVisible()
173+
// At Settings' width the row's button also reads the facts its hidden columns would hold.
174+
const row = page.getByRole('button').filter({ has: page.getByText(name, { exact: true }) })
175+
await expect(row).toBeVisible()
174176

175177
await context.route('https://example.com/**', (route) =>
176178
route.fulfill({ status: 200, contentType: 'text/html', body: 'Destination stand-in' })
@@ -180,7 +182,7 @@ test('links: create, find, open, edit and delete on the Platform', async ({ page
180182
(request) => new URL(request.url()).pathname === `/sim/${name}`
181183
)
182184
const opened = context.waitForEvent('page')
183-
await page.getByRole('button', { name, exact: true }).click()
185+
await row.click()
184186
await resolved
185187
await expect(await opened).toHaveURL('https://example.com/')
186188
await (await opened).close()

‎apps/sim/platform/checks/workspace-pages.spec.ts‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ function main(page: Page) {
99
return page.locator('main:visible')
1010
}
1111

12+
/**
13+
* A record's bar: the outermost block holding its Back navigation and not its heading, so a wrapper
14+
* around Back cannot stand in for the bar.
15+
*/
16+
function recordBar(page: Page, back: string) {
17+
return main(page)
18+
.locator('div')
19+
.filter({ has: page.getByRole('navigation', { name: `${back} navigation` }) })
20+
.filter({ hasNot: page.getByRole('heading', { level: 1 }) })
21+
.first()
22+
}
23+
1224
/** Record every DOM state of the content region while `action` runs. */
1325
async function watchFrames(page: Page, action: () => Promise<void>) {
1426
await page.evaluate(() => {
@@ -208,7 +220,7 @@ test('a record keeps its identifiers in its facts, and the rail line spans only
208220
await page.goto(fixtureUrl('/workspace/it/issues/IT-136?state=full'))
209221
const facts = page.getByRole('complementary', { name: 'Facts' })
210222
await expect(facts.locator('dd', { hasText: /^IT-136$/ })).toBeVisible()
211-
const bar = main(page).getByRole('navigation', { name: 'Issues navigation' }).locator('xpath=..')
223+
const bar = recordBar(page, 'Issues')
212224
await expect(bar).toContainText('Approve')
213225
await expect(bar).not.toContainText('IT-136')
214226
const rail = await facts.evaluate((aside) => {
@@ -246,9 +258,7 @@ test('a run opens its trace and selected step, with its execution ID among its f
246258
const executionId = new URL(page.url()).pathname.split('/').at(-1) ?? ''
247259
const runFacts = main(page).getByLabel('Run facts')
248260
await expect(runFacts.locator('dd', { hasText: new RegExp(`^${executionId}$`) })).toBeVisible()
249-
await expect(
250-
main(page).getByRole('navigation', { name: 'Logs navigation' }).locator('xpath=..')
251-
).not.toContainText(executionId)
261+
await expect(recordBar(page, 'Logs')).not.toContainText(executionId)
252262
const trace = main(page).getByRole('list', { name: /steps$/ })
253263
await trace.getByRole('button', { name: /search_knowledge/ }).click()
254264
await expect(main(page).getByRole('region', { name: 'search_knowledge step' })).toContainText(

‎apps/sim/scripts/test-browser-extension-e2e.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,11 @@ try {
15411541
await sql`select name, url from sim_link where organization_id=${organizationId}`
15421542
assert.equal(row?.name, 'qa-draft')
15431543
assert.equal(row?.url, destination)
1544-
const link = draft.getByRole('row').filter({ hasText: 'qa-draft' })
1544+
// The row opens from its own target: a text cell's tooltip host stacks above it.
1545+
const link = draft
1546+
.getByRole('row')
1547+
.getByRole('button')
1548+
.filter({ has: draft.getByText('qa-draft', { exact: true }) })
15451549
await expect(link).toBeVisible()
15461550
await screenshot('create-link-saved', draft)
15471551
const opened = browserContext.waitForEvent('page')

0 commit comments

Comments
 (0)