@unotest/web 0.29.0 → 0.30.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.
@@ -234,6 +234,13 @@ interface CookieOptions {
234
234
  secure?: boolean;
235
235
  sameSite?: "Strict" | "Lax" | "None";
236
236
  }
237
+ /** What an attaching client applies to a context it did not create. Only
238
+ * the dialog policy: the rest of {@link ContextOptions} was decided by the
239
+ * process that owns the browser. Without a `dialog` listener Playwright
240
+ * dismisses every dialog on behalf of the client that has none — and a
241
+ * second client watching the run's page would answer `confirm()` with
242
+ * "no" before the run's own accept lands. */
243
+ type AttachOptions = Pick<ContextOptions, "dialogPolicy">;
237
244
 
238
245
  interface WebDriver {
239
246
  /**
@@ -263,7 +270,7 @@ interface WebDriver {
263
270
  */
264
271
  wsEndpoint(): string | undefined;
265
272
  connectShared(wsEndpoint: string, browser: LaunchOptions["browser"]): Promise<void>;
266
- attachExisting(): DriverContext;
273
+ attachExisting(opts?: AttachOptions): DriverContext;
267
274
  }
268
275
  /** One captured network request/response, recorded only under
269
276
  * `UNOTEST_NETWORK`. `status`/`ok` come from the response; `failureText`
@@ -526,4 +533,4 @@ interface AncestorHint {
526
533
  className?: string;
527
534
  }
528
535
 
529
- export { type ActionTimeout as A, type ContextOptions as C, type DriverContext as D, type ElementHint as E, type FillOptions as F, type GotoOptions as G, type HoverOptions as H, type LaunchOptions as L, type NetworkEntry as N, type PressOptions as P, type ReloadOptions as R, type ScreenshotOptions as S, type Viewport as V, type WebDriver as W, type CheckOptions as a, type ClickOptions as b, type CookieOptions as c, type DriverPage as d, type NavigationOptions as e, type SelectOptions as f, type WaitOptions as g, type WaitState as h, type LocatorValue as i, type LocatorStep as j, appendStep as k, describeLocator as l, isLocatorValue as m, rootedAt as r };
536
+ export { type AttachOptions as A, type ContextOptions as C, type DriverContext as D, type ElementHint as E, type FillOptions as F, type GotoOptions as G, type HoverOptions as H, type LaunchOptions as L, type NetworkEntry as N, type PressOptions as P, type ReloadOptions as R, type ScreenshotOptions as S, type Viewport as V, type WebDriver as W, type ActionTimeout as a, type CheckOptions as b, type ClickOptions as c, type CookieOptions as d, type DriverPage as e, type NavigationOptions as f, type SelectOptions as g, type WaitOptions as h, type WaitState as i, type LocatorValue as j, type LocatorStep as k, appendStep as l, describeLocator as m, isLocatorValue as n, rootedAt as r };