(enabled: boolean)
| 64 | let adminPage: Page; |
| 65 | |
| 66 | async function setJIT(enabled: boolean): Promise<void> { |
| 67 | // Also set allowRequestRole=true: the JIT label tests below need a |
| 68 | // RequestQueryButton to render at all (the component returns null |
| 69 | // when allowRequestRole is false — see RequestQueryButton.tsx:131, |
| 70 | // 159-161). The new sample project is born with allowRequestRole=false; |
| 71 | // the JIT tests are about the LABEL flipping, not about whether the |
| 72 | // button shows up. |
| 73 | await env.api.updateProjectSettings(env.project, { |
| 74 | allowRequestRole: true, |
| 75 | allowJustInTimeAccess: enabled, |
| 76 | }); |
| 77 | // Force-reload the viewer's page so the store picks up the new |
| 78 | // project flag. The SQL Editor caches project state per-tab; flipping |
| 79 | // the flag via API does not in-flight invalidate that cache. |
| 80 | await viewerEditor.gotoWithDb(projectId, env.instanceId, env.databaseId); |
| 81 | await viewerPage.waitForTimeout(1500); |
| 82 | } |
| 83 | |
| 84 | test.beforeAll(async ({ browser }) => { |
| 85 | test.setTimeout(180_000); |
no test coverage detected