Christian Byrne
83f4e7060a
test(infra): AssetHelper with builder pattern + deterministic fixtures (#10545)
## What
Adds `AssetHelper` — a builder-pattern helper for mocking asset-related
API endpoints in Playwright E2E tests, plus deterministic fixture data.
## Why
12+ asset-related API endpoints need mocking for asset browser tests
(PNL-02), cloud dialog testing (DLG-08), and other asset-dependent E2E
scenarios. Random mock data from existing `createMockAssets()` is
unsuitable for deterministic E2E assertions.
## What's included
### `AssetHelper.ts` (307 LOC)
- Fluent builder API: `assetHelper.withModels(3).withImages(5).mock()`
- Stateful mock store (Map) for upload→verify→delete flows
- Endpoint coverage: GET/POST/PUT/DELETE `/assets`, download progress
- `mockError()` for error state testing
- `clearMocks()` cleanup matching QueueHelper/FeatureFlagHelper pattern
### `assetFixtures.ts` (304 LOC)
- 11 stable named constants (checkpoints, loras, VAE, embedding, inputs,
outputs)
- Factory functions: `generateModels()`, `generateInputFiles()`,
`generateOutputAssets()`
- Fixed IDs/dates/sizes — no randomness, safe for screenshot comparisons
### ComfyPage integration
- Available as `comfyPage.assets` in all tests
## Testing
- TypeScript compiles clean
- Follows existing QueueHelper/FeatureFlagHelper conventions
## Unblocks
- PNL-02: Asset browser tests (@Jaewon Yoon)
- DLG-08: Assets modal / cloud dialog testing
Part of: Test Coverage Q2 Overhaul
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-10545-test-infra-AssetHelper-with-builder-pattern-deterministic-fixtures-32f6d73d365081d3985ef079ff3dbede)
by [Unito](https://www.unito.io)
---------
Co-authored-by: GitHub Action <action@github.com>
2026-04-07 14:23:36 -07:00
..
2026-03-15 22:46:47 +09:00
2026-03-15 22:46:47 +09:00
2026-03-29 16:02:19 -07:00
2025-12-29 15:03:34 -08:00
2026-03-27 09:11:26 +09:00
2026-03-15 22:46:47 +09:00
2026-03-28 13:08:52 -07:00
2026-03-29 14:45:56 -07:00
2026-03-28 13:08:52 -07:00
2026-03-15 22:46:47 +09:00
2026-03-15 22:46:47 +09:00
2026-03-27 16:04:36 -04:00
2026-03-28 23:19:04 -07:00
2026-03-27 09:11:26 +09:00
2026-03-15 22:46:47 +09:00
2025-12-08 19:48:11 -07:00
2026-03-15 22:46:47 +09:00
2025-12-08 19:48:11 -07:00
2026-03-27 00:19:17 -04:00
2026-01-16 22:11:00 -07:00
2026-03-29 15:57:42 -07:00
2026-04-04 19:26:55 -07:00
2026-03-15 22:46:47 +09:00
2026-03-15 22:46:47 +09:00
2026-03-24 12:25:18 -07:00
2026-03-12 01:10:26 -07:00
2026-03-17 10:46:19 -07:00
2026-04-07 13:53:37 -07:00
2026-04-07 08:50:13 -07:00
2026-03-29 08:27:53 +09:00
2026-04-03 07:07:31 +09:00
2026-03-27 09:11:26 +09:00
2026-04-02 21:04:50 +01:00
2026-03-15 22:46:47 +09:00
2026-03-30 19:24:09 +00:00
2026-04-07 13:53:01 -07:00
2026-04-07 13:53:01 -07:00
2026-04-07 13:53:01 -07:00
2026-04-07 14:23:36 -07:00
2026-02-03 12:29:40 -08:00
2026-03-17 02:24:22 -07:00
2026-02-12 16:27:11 +09:00
2026-03-28 13:08:52 -07:00
2026-04-07 13:53:01 -07:00
2026-04-07 13:53:01 -07:00
2026-02-23 13:33:41 -08:00
2026-03-27 11:54:07 -07:00
2026-03-28 22:34:37 -07:00
2026-04-01 13:49:12 +09:00
2026-03-24 12:25:18 -07:00
2026-02-03 12:29:40 -08:00
2026-04-06 09:49:32 -07:00
2026-03-27 10:08:41 +09:00
2026-03-20 03:24:09 +01:00
2026-02-03 12:29:40 -08:00
2026-03-24 16:12:59 +01:00
2026-03-28 13:08:52 -07:00
2026-03-28 13:08:52 -07:00
2026-03-27 09:11:26 +09:00
2026-03-27 09:11:26 +09:00
2026-02-03 12:29:40 -08:00
2026-02-21 18:43:58 +09:00
2026-03-17 02:24:22 -07:00
2026-03-21 08:03:55 +09:00
2026-03-16 06:51:22 -07:00
2026-03-15 18:47:47 +00:00
2026-03-28 13:08:52 -07:00
2026-03-13 06:13:18 -07:00
2026-03-27 18:15:11 -07:00
2026-03-12 08:44:11 -07:00
2026-03-28 13:08:52 -07:00
2026-03-17 02:24:22 -07:00
2026-03-20 12:24:31 +01:00
2026-02-03 12:29:40 -08:00
2026-03-20 14:18:54 -07:00
2026-02-03 12:29:40 -08:00
2026-03-28 13:08:52 -07:00
2026-02-03 12:29:40 -08:00
2026-03-27 16:04:36 -04:00
2026-02-23 13:33:41 -08:00
2026-03-28 23:19:04 -07:00
2026-04-01 17:59:02 +09:00
2026-03-18 15:31:29 -07:00
2026-02-03 12:29:40 -08:00
2026-03-17 11:14:44 +09:00
2026-02-06 13:42:38 -08:00
2026-03-28 13:08:52 -07:00
2026-03-16 06:51:22 -07:00
2026-03-28 13:08:52 -07:00
2026-02-20 01:10:03 -08:00
2026-03-17 02:24:22 -07:00
2026-02-03 12:29:40 -08:00
2026-03-27 00:19:17 -04:00
2026-03-16 07:21:05 -07:00
2026-03-28 13:54:26 -07:00
2026-03-17 11:14:44 +09:00
2026-02-20 01:10:03 -08:00
2026-03-29 15:45:06 +09:00
2026-02-20 22:06:09 -08:00
2026-03-13 08:43:18 -07:00
2026-03-06 20:02:19 +00:00
2026-04-06 09:49:32 -07:00
2026-03-19 04:12:06 -07:00
2026-03-17 02:24:22 -07:00
2026-02-17 16:17:23 -08:00
2026-03-16 23:37:40 -07:00
2026-02-24 21:23:52 -08:00
2026-04-04 14:03:50 +01:00
2026-02-03 12:29:40 -08:00
2026-04-01 17:10:30 +09:00
2026-02-20 00:37:38 -08:00
2026-04-06 09:49:32 -07:00
2026-03-16 23:37:40 -07:00
2026-01-29 16:34:56 -08:00
2026-02-12 16:27:11 +09:00
2026-02-03 12:29:40 -08:00
2026-02-03 12:29:40 -08:00
2026-03-28 13:08:52 -07:00
2026-03-16 06:51:22 -07:00
2026-04-06 09:49:32 -07:00
2026-03-28 13:08:52 -07:00
2026-03-28 13:08:52 -07:00