@specific.dev/spectest 0.47.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/recorder.ts CHANGED
@@ -47,6 +47,15 @@ interface BaseEvent {
47
47
  * timelines. The parent event is identified by its `seq`.
48
48
  */
49
49
  parentSeq?: number;
50
+ /**
51
+ * Set when this event is not an op of its own but *another view of its
52
+ * parent's value* — what a fake helper's `annotate(...)` records
53
+ * (`annotate.ts`). The two kinds of `parentSeq` child read differently
54
+ * and render differently: a `ctx.poll` iteration is work the step did,
55
+ * and belongs below it; an annotation is the same value drawn better,
56
+ * and belongs in place of it (the dashboard tabs between the two).
57
+ */
58
+ annotation?: boolean;
50
59
  }
51
60
 
52
61
  export interface ExecEvent extends BaseEvent {
@@ -348,14 +357,17 @@ export interface EmailEventMessage {
348
357
  attachments?: { filename: string; contentType: string; size: number }[];
349
358
  }
350
359
 
351
- /** One row of a mailbox listing embedded on an {@link EmailEvent}. */
352
- export interface EmailEventSummary {
353
- from?: string;
354
- to?: string[];
355
- subject?: string;
356
- /** Plain-text preview of the body. */
360
+ /**
361
+ * One row of a mailbox listing embedded on an {@link EmailEvent}. A row is a
362
+ * message: the dashboard lists rows as `to` + subject and expands the one you
363
+ * click into the same view a single-message op renders, so whatever body the
364
+ * producer has belongs here. Mailpit's list API returns no bodies, so
365
+ * `email()`'s own listings fill only the header fields plus `snippet` — a row
366
+ * with no body expands to its preview instead.
367
+ */
368
+ export interface EmailEventSummary extends EmailEventMessage {
369
+ /** Plain-text preview of the body, shown when the row carries no body. */
357
370
  snippet?: string;
358
- date?: string;
359
371
  }
360
372
 
361
373
  /**
@@ -370,9 +382,13 @@ export interface EmailEventSummary {
370
382
  */
371
383
  export interface EmailEvent extends BaseEvent {
372
384
  kind: "email";
373
- /** Service key of the mail server (`ctx.svc.<service>`). */
385
+ /** Service key of the mail server (`ctx.svc.<service>`) — or the fake's
386
+ * name, when a fake helper annotated its return with `annotate(v, "email")`
387
+ * (`annotate.ts`) and this event hangs off that call's `fake` one as a
388
+ * `parentSeq` child. */
374
389
  service: string;
375
- /** Helper called, e.g. `"lastEmail"`. */
390
+ /** Helper called, e.g. `"lastEmail"` — the fake's member name for an
391
+ * annotated fake-helper call. */
376
392
  op: string;
377
393
  /** Human-readable match criteria, e.g. `to alice@example.com`. */
378
394
  query?: string;
@@ -445,6 +461,9 @@ export interface BrowserEvent extends BaseEvent {
445
461
  key?: string;
446
462
  /** Attribute name (getAttribute). */
447
463
  attribute?: string;
464
+ /** File names given to an `<input type="file">` (setInputFiles). Names
465
+ * only — a built file's bytes stay out of the timeline. */
466
+ files?: string[];
448
467
  /** Scroll/click coordinates. */
449
468
  dx?: number;
450
469
  dy?: number;