Merge remote-tracking branch 'origin/main' into play-app-record
# Conflicts: # CHANGELOG.md # docs/pitfalls.md # skills/store-pitfalls/SKILL.md # tests/console-fill.test.ts
This commit is contained in:
commit
ebc45c8c1a
70 changed files with 3729 additions and 290 deletions
|
|
@ -168,6 +168,8 @@ export interface OpenOpts {
|
|||
hosts?: string[];
|
||||
headless?: boolean;
|
||||
platform?: string;
|
||||
/** Tests: Playwright's launch timeout for modes (b) and (c) (default: Playwright's 30 s). */
|
||||
launchTimeoutMs?: number;
|
||||
say: (m: string) => void;
|
||||
}
|
||||
|
||||
|
|
@ -233,7 +235,7 @@ export async function openConsoleBrowser(root: string, o: OpenOpts): Promise<Con
|
|||
copy = await copySession(chromeDir, { ...(o.chromeProfile ? { profile: o.chromeProfile } : {}), ...(o.hosts ? { hosts: o.hosts } : {}) });
|
||||
const c = await chromiumFor(root);
|
||||
const context = await c.launchPersistentContext(copy.dir, {
|
||||
channel: 'chrome', headless: o.headless ?? false, viewport: null, args: KEEP_SESSION_ARGS,
|
||||
channel: 'chrome', headless: o.headless ?? false, viewport: null, args: KEEP_SESSION_ARGS, ...(o.launchTimeoutMs ? { timeout: o.launchTimeoutMs } : {}),
|
||||
// Playwright's mock keychain would hide Chrome's own key, and the cookies could not be read
|
||||
ignoreDefaultArgs: ['--use-mock-keychain', '--password-store=basic'],
|
||||
});
|
||||
|
|
@ -251,7 +253,7 @@ export async function openConsoleBrowser(root: string, o: OpenOpts): Promise<Con
|
|||
}
|
||||
// (c) storebound's persistent profile, the owner signs in there
|
||||
mkdirSync(o.profileDir, { recursive: true });
|
||||
const context = await launchPersistent(root, o.profileDir, { headless: o.headless ?? false, viewport: null, args: KEEP_SESSION_ARGS });
|
||||
const context = await launchPersistent(root, o.profileDir, { headless: o.headless ?? false, viewport: null, args: KEEP_SESSION_ARGS, ...(o.launchTimeoutMs ? { timeout: o.launchTimeoutMs } : {}) });
|
||||
o.say(`browser: storebound's own profile (${o.profileDir}); sign in there once, it is kept for the next run`);
|
||||
const page = await ownTab(context);
|
||||
return wrapContext('profile', context, page, () => { /* kept on purpose */ });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue