Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable IW smoke test #15430

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
54 changes: 27 additions & 27 deletions src/test/smoke/datascience.smoke.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as fs from 'fs-extra';
import * as path from '../../platform/vscode-path/path';
import * as vscode from 'vscode';
import { traceInfo, traceVerbose } from '../../platform/logging';
import { PYTHON_PATH, setAutoSaveDelayInWorkspaceRoot, waitForCondition } from '../common.node';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test comment

import { PYTHON_PATH, openFile, setAutoSaveDelayInWorkspaceRoot, waitForCondition } from '../common.node';
import { EXTENSION_ROOT_DIR_FOR_TESTS, IS_SMOKE_TEST } from '../constants.node';
import { sleep } from '../core';
import { closeActiveWindows, initialize, initializeTest } from '../initialize.node';
Expand Down Expand Up @@ -41,32 +41,32 @@ suite('Smoke Tests', function () {
traceInfo(`End Test Complete ${this.currentTest?.title}`);
});

// test('Run Cell in interactive window', async () => {
// const file = path.join(
// EXTENSION_ROOT_DIR_FOR_TESTS,
// 'src',
// 'test',
// 'pythonFiles',
// 'datascience',
// 'simple_note_book.py'
// );
// const outputFile = path.join(path.dirname(file), 'ds.log');
// if (await fs.pathExists(outputFile)) {
// await fs.unlink(outputFile);
// }
// const textDocument = await openFile(file);

// // Wait for code lenses to get detected.
// console.log('Step0');
// await sleep(1_000);
// console.log('Step1');
// await vscode.commands.executeCommand<void>('jupyter.runallcells', textDocument.uri);
// console.log('Step2');
// const checkIfFileHasBeenCreated = () => fs.pathExists(outputFile);
// console.log('Step3');
// await waitForCondition(checkIfFileHasBeenCreated, timeoutForCellToRun, `"${outputFile}" file not created`);
// console.log('Step4');
// }).timeout(timeoutForCellToRun);
test('Run all Cells in interactive window', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one should still be skipped

const file = path.join(
EXTENSION_ROOT_DIR_FOR_TESTS,
'src',
'test',
Comment on lines +44 to +48
Copy link
Contributor Author

@amunger amunger Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test comment

'pythonFiles',
'datascience',
'simple_note_book.py'
);
const outputFile = path.join(path.dirname(file), 'ds.log');
if (await fs.pathExists(outputFile)) {
await fs.unlink(outputFile);
}
const textDocument = await openFile(file);

// Wait for code lenses to get detected.
console.log('Step0');
await sleep(1_000);
console.log('Step1');
await vscode.commands.executeCommand<void>('jupyter.runallcells', textDocument.uri);
console.log('Step2');
const checkIfFileHasBeenCreated = () => fs.pathExists(outputFile);
console.log('Step3');
await waitForCondition(checkIfFileHasBeenCreated, timeoutForCellToRun, `"${outputFile}" file not created`);
console.log('Step4');
}).timeout(timeoutForCellToRun);

test('Run Cell in Notebook', async function () {
const file = path.join(
Expand Down
Loading