chore: make localStorage optional when setting storage state
This commit is contained in:
parent
311625b891
commit
15535b9fe0
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
6
packages/playwright-core/types/types.d.ts
vendored
6
packages/playwright-core/types/types.d.ts
vendored
|
|
@ -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;
|
||||
|
|
|
|||
2
packages/protocol/src/channels.d.ts
vendored
2
packages/protocol/src/channels.d.ts
vendored
|
|
@ -295,7 +295,7 @@ export type IndexedDBDatabase = {
|
|||
|
||||
export type SetOriginStorage = {
|
||||
origin: string,
|
||||
localStorage: NameValue[],
|
||||
localStorage?: NameValue[],
|
||||
indexedDB?: IndexedDBDatabase[],
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ SetOriginStorage:
|
|||
properties:
|
||||
origin: string
|
||||
localStorage:
|
||||
type: array
|
||||
type: array?
|
||||
items: NameValue
|
||||
indexedDB:
|
||||
type: array?
|
||||
|
|
|
|||
Loading…
Reference in a new issue