Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/e2e/pages/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
);
}
Expand Down
23 changes: 23 additions & 0 deletions test/e2e/tests/connections/connections-duckdb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,40 @@
*--------------------------------------------------------------------------------------------*/

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
});

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);
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/reticulate/reticulate-restart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand Down
Loading