MCPcopy Create free account
hub / github.com/bytebase/bytebase / openAs

Function openAs

frontend/tests/e2e/sql-editor/sql-editor-permissions.spec.ts:78–86  ·  view source on GitHub ↗
(
  browser: Browser,
  user: { email: string; authFile: string },
)

Source from the content-addressed store, hash-verified

76const roleContexts = new Map<string, RoleContext>();
77
78async function openAs(
79 browser: Browser,
80 user: { email: string; authFile: string },
81): Promise<RoleContext> {
82 const context = await browser.newContext({ storageState: user.authFile });
83 const page = await context.newPage();
84 const sqlEditor = new SqlEditorPage(page, env.baseURL);
85 return { context, page, sqlEditor };
86}
87
88// beforeAll runs 4 user creates + 3 IAM grants + 4 API logins + 4
89// page.goto + 4 storage-state writes + 4 context opens. Sequentially

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected