Skip to content

Commit 80801f1

Browse files
committed
test(project-files): read the realtime proof's new file through its content route
The dead-code cleanup removed the Project file metadata GET, so the realtime suite's readability check got a 405. The reader now fetches the file's bytes from /api/projects/[id]/files/[fileId]/content, the source URL the product's file view reads, and checks the created content.
1 parent edf1bc2 commit 80801f1

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎apps/sim/scripts/test-file-list-realtime-e2e.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,14 @@ try {
347347
revision = required(json(await request(`${prefix()}/${fileId}/versions`)).revision)
348348
})
349349
)
350-
assert.equal(
351-
toRecord(json(await request(`${prefix()}/${fileId}`, 'GET', undefined, readerCookie)).file)
352-
.id,
353-
fileId
350+
const readable = await request(
351+
`${prefix()}/${fileId}/content`,
352+
'GET',
353+
undefined,
354+
readerCookie
354355
)
356+
assert.equal(readable.status, 200, 'Unexpected HTTP status; inspect private app logs')
357+
assert.equal(readable.text, 'first version')
355358
assert.equal(retainedMembership.projectId, fixture.projectId)
356359
assert.equal(workspaceEvents.length, 0)
357360
}

0 commit comments

Comments
 (0)