chore: make localStorage optional when setting storage state

This commit is contained in:
Simon Knott 2025-02-05 14:20:52 +01:00
parent 311625b891
commit 15535b9fe0
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
6 changed files with 8 additions and 8 deletions

View file

@ -61,7 +61,7 @@ Methods like [`method: APIRequestContext.get`] take the base URL into considerat
- `sameSite` <[SameSiteAttribute]<"Strict"|"Lax"|"None">>
- `origins` <[Array]<[Object]>>
- `origin` <[string]>
- `localStorage` <[Array]<[Object]>>
- `localStorage` ?<[Array]<[Object]>>
- `name` <[string]>
- `value` <[string]>
- `indexedDB` ?<[Array]<[Object]>> indexedDB to set for context

View file

@ -261,7 +261,7 @@ Specify environment variables that will be visible to the browser. Defaults to `
- `sameSite` <[SameSiteAttribute]<"Strict"|"Lax"|"None">> sameSite flag
- `origins` <[Array]<[Object]>>
- `origin` <[string]>
- `localStorage` <[Array]<[Object]>> localStorage to set for context
- `localStorage` ?<[Array]<[Object]>> localStorage to set for context
- `name` <[string]>
- `value` <[string]>
- `indexedDB` ?<[Array]<[Object]>> indexedDB to set for context

View file

@ -165,7 +165,7 @@ scheme.IndexedDBDatabase = tObject({
});
scheme.SetOriginStorage = tObject({
origin: tString,
localStorage: tArray(tType('NameValue')),
localStorage: tOptional(tArray(tType('NameValue'))),
indexedDB: tOptional(tArray(tType('IndexedDBDatabase'))),
});
scheme.OriginStorage = tObject({

View file

@ -10103,7 +10103,7 @@ export interface Browser {
/**
* localStorage to set for context
*/
localStorage: Array<{
localStorage?: Array<{
name: string;
value: string;
@ -17681,7 +17681,7 @@ export interface APIRequest {
origins: Array<{
origin: string;
localStorage: Array<{
localStorage?: Array<{
name: string;
value: string;
@ -22410,7 +22410,7 @@ export interface BrowserContextOptions {
/**
* localStorage to set for context
*/
localStorage: Array<{
localStorage?: Array<{
name: string;
value: string;

View file

@ -295,7 +295,7 @@ export type IndexedDBDatabase = {
export type SetOriginStorage = {
origin: string,
localStorage: NameValue[],
localStorage?: NameValue[],
indexedDB?: IndexedDBDatabase[],
};

View file

@ -263,7 +263,7 @@ SetOriginStorage:
properties:
origin: string
localStorage:
type: array
type: array?
items: NameValue
indexedDB:
type: array?