@unotest/web 0.54.0 → 0.55.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.
@@ -1,6 +1,6 @@
1
1
  import { InjectedDomHelpers } from '@unotest/grounder-client/dom-walker';
2
2
  import { PickerMode } from '@unotest/protocol';
3
- import { E as ElementHint, A as AnimationInfo } from '../interfaces-BU-PQbt4.js';
3
+ import { E as ElementHint, A as AnimationInfo } from '../interfaces-CNvyInrY.js';
4
4
  import '../config/schema.js';
5
5
  import 'zod';
6
6
 
@@ -398,6 +398,8 @@ interface PageNetworkEntry {
398
398
  /** 0 when the request failed before any response. */
399
399
  status: number;
400
400
  ok: boolean;
401
+ /** The response's headers, names in lower case; empty without a response. */
402
+ headers: Readonly<Record<string, string>>;
401
403
  failureText?: string;
402
404
  /** A `mockRoute` answered or aborted it. */
403
405
  mocked?: true;
@@ -694,6 +696,14 @@ interface DriverContext {
694
696
  * always (500 entries per context), unlike `networkEntries()`.
695
697
  */
696
698
  pageNetwork(): ReadonlyArray<PageNetworkEntry>;
699
+ /**
700
+ * An entry of the active page `accept` takes — of those recorded, the
701
+ * one sent first; else the first to finish — or null after `timeoutMs`.
702
+ * What to take is the caller's choice: the driver hands entries over.
703
+ */
704
+ waitForPageResponse(accept: (entry: PageNetworkEntry) => boolean, opts: {
705
+ timeoutMs: number;
706
+ }): Promise<PageNetworkEntry | null>;
697
707
  /**
698
708
  * The first download of this context the scenario has not taken yet,
699
709
  * waiting up to `timeoutMs` (default: the navigation budget) for one.