Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions apps/website/e2e/models-performance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,11 @@ test('catalogue browsing stays within its JavaScript budget', async ({
.getByTestId('workshop-model-card')
.first()
).toContainText('Kling')
const scripts = await requestedScripts(page)
const catalogueBytes = scripts
const catalogueBytes = (await requestedScripts(page))
.filter(([name]) => !shared.has(name))
.reduce((total, [, bytes]) => total + bytes, 0)
expect(catalogueBytes).toBeGreaterThan(0)
expect(catalogueBytes).toBeLessThan(900_000)
// The whole-route ceiling stays as well: catalogue code that migrated into
// a chunk the homepage also loads would pass the delta and still be paid
// for by every visitor to /models/.
const totalBytes = scripts.reduce((total, [, bytes]) => total + bytes, 0)
expect(totalBytes).toBeLessThan(1_815_000)
})

test('video cards load on screen and stop playing when scrolled away', async ({
Expand Down
Loading