Skip to content

Commit 25182f7

Browse files
committed
fix(platform): type the platform test fixtures, read records with toRecord, and queue the preflight's personal-org read
1 parent 9334996 commit 25182f7

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎apps/sim/app/(product)/workspace/[workspaceId]/logs/_components/run-list/run-list.dom.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const NO_MORE = { hasMore: false, onLoadMore: () => {} }
2929
const runs: RunSummary[] = Array.from({ length: RUN_COUNT }, (_, index) => ({
3030
id: `run-${index}`,
3131
workflow: { id: 'workflow-1', name: `Workflow ${index}` },
32-
status: 'success',
32+
status: 'completed',
3333
trigger: { label: 'Manual' },
3434
startedAt: 1_700_000_000_000 - index * 1000,
3535
durationMs: 1200,

‎apps/sim/app/(product)/workspace/[workspaceId]/settings/_components/sections/custom-blocks/custom-blocks-section.dom.test.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ it('shows a failed workspace read with Retry', async () => {
6464

6565
it('clears a ?block= the settled list does not hold', () => {
6666
reads.blockParam = 'deleted-block'
67-
act(() => root.render(<CustomBlocksSection workspaceId='ws' />))
67+
act(() => root.render(<CustomBlocksSection workspaceId='ws' subpath={[]} />))
6868
expect(reads.setBlock).toHaveBeenCalledWith(null, { history: 'replace' })
6969
})
7070

7171
it('keeps a ?block= while the list is still loading', () => {
7272
reads.blockParam = 'block-1'
7373
reads.blocks = { data: undefined, isPlaceholderData: false }
74-
act(() => root.render(<CustomBlocksSection workspaceId='ws' />))
74+
act(() => root.render(<CustomBlocksSection workspaceId='ws' subpath={[]} />))
7575
expect(reads.setBlock).not.toHaveBeenCalled()
7676
})

‎apps/sim/lib/admin/dashboard-organizations.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ describe('getDashboardMemberTransferPreflight', () => {
8383
})
8484

8585
it('pages workspace choices and exposes an empty default selection above the exact cap', async () => {
86+
// The attachable-workspace filter first looks up the user's personal organization; none here.
87+
queueTableRows(member, [])
8688
queueTableRows(organization, [{ id: 'org-destination' }])
8789
queueTableRows(user, [
8890
{

‎apps/sim/platform/lib/data/logs.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useEffect, useMemo, useRef } from 'react'
44
import { getErrorMessage } from '@sim/utils/errors'
5-
import { isRecordLike } from '@sim/utils/object'
5+
import { toRecord } from '@sim/utils/object'
66
import { useQuery, useQueryClient } from '@tanstack/react-query'
77
import type { inferParserType } from 'nuqs'
88
import { isApiClientError } from '@/lib/api/client/errors'
@@ -409,9 +409,7 @@ function displayChildren(span: LogTraceSpan, id: string): LogTraceSpan[] {
409409
endTime: call.endTime ?? span.endTime,
410410
status: call.error ? 'error' : 'success',
411411
input: call.input,
412-
output: call.error
413-
? { error: call.error, ...(isRecordLike(call.output) ? call.output : {}) }
414-
: call.output,
412+
output: call.error ? { error: call.error, ...toRecord(call.output) } : call.output,
415413
}))
416414
children.sort((left, right) => (spanTime(left.startTime) ?? 0) - (spanTime(right.startTime) ?? 0))
417415
const calledTool = children.some((child) => child.type === 'tool')

‎apps/sim/platform/lib/data/terminal-panel.dom.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function Terminal() {
4242
terminalId: 'term-1',
4343
scopeId: 'scope-1',
4444
onscreen: false,
45-
appearanceTheme: 'default',
45+
appearanceTheme: 'app',
4646
defaultZoom: 100,
4747
focusRequest: 0,
4848
})

0 commit comments

Comments
 (0)