diff --git a/test/e2e/pages/sessions.ts b/test/e2e/pages/sessions.ts index c418651f63f5..7f916daa4bcd 100644 --- a/test/e2e/pages/sessions.ts +++ b/test/e2e/pages/sessions.ts @@ -874,10 +874,10 @@ export class Sessions { * * @param version - The descriptive string of the runtime to verify. */ - async expectSessionPickerToBe(runtimeName: string) { + async expectSessionPickerToBe(runtimeName: string, timeout: number = 15000) { await test.step(`Verify runtime is selected: ${runtimeName}`, async () => { const normalizedRuntimeName = runtimeName.replace(/-\s\d+$/, '').trim(); - await expect(this.sessionPicker).toHaveText(normalizedRuntimeName); + await expect(this.sessionPicker).toHaveText(normalizedRuntimeName, { timeout }); } ); } diff --git a/test/e2e/tests/connections/connections-duckdb.test.ts b/test/e2e/tests/connections/connections-duckdb.test.ts index 28c484c48dfa..6892a22806e9 100644 --- a/test/e2e/tests/connections/connections-duckdb.test.ts +++ b/test/e2e/tests/connections/connections-duckdb.test.ts @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { test, tags } from '../_test.setup'; +import fs from 'node:fs'; +import os from 'node:os'; +import path from 'node:path'; test.use({ suiteId: __filename @@ -11,10 +14,30 @@ test.use({ const randomText = Math.random().toString(36).substring(7); +function configurePasswordStore() { + const home = os.homedir(); // likely /root in your container + // Adjust folder name to your product; for VS Code it's ".vscode" + const argvDir = path.join(home, '.vscode-oss-dev'); + fs.mkdirSync(argvDir, { recursive: true }); + + const argvPath = path.join(argvDir, 'argv.json'); + const argv = { + // use basic Chromium text encryption – fine for throwaway CI machines + 'password-store': 'basic' + }; + + fs.writeFileSync(argvPath, JSON.stringify(argv, null, 2)); +} + + test.describe('DuckDB Connection', { tag: [tags.WEB, tags.CONNECTIONS, tags.WIN, tags.SOFT_FAIL] }, () => { + test.beforeAll(async function ({ app }) { + configurePasswordStore(); + }); + test('Python - Can establish a DuckDB connection', async function ({ python, app }) { await app.workbench.console.pasteCodeToConsole(connectionCode, true); diff --git a/test/e2e/tests/reticulate/reticulate-restart.test.ts b/test/e2e/tests/reticulate/reticulate-restart.test.ts index 5ed3d745b7a5..15a88397f1ef 100644 --- a/test/e2e/tests/reticulate/reticulate-restart.test.ts +++ b/test/e2e/tests/reticulate/reticulate-restart.test.ts @@ -38,7 +38,7 @@ test.describe('Reticulate', { await sessions.start('pythonReticulate'); - await app.workbench.sessions.expectSessionPickerToBe('Python (reticulate)'); + await app.workbench.sessions.expectSessionPickerToBe('Python (reticulate)', 60000); await app.workbench.sessions.restart('Python (reticulate)', { waitForIdle: false });