diff --git a/news/3 Code Health/10565.md b/news/3 Code Health/10565.md new file mode 100644 index 00000000000..f7d9aa17610 --- /dev/null +++ b/news/3 Code Health/10565.md @@ -0,0 +1 @@ +Fix 'Special Token Check' test. \ No newline at end of file diff --git a/src/test/datascience/notebook/intellisense/semanticTokens.vscode.test.ts b/src/test/datascience/notebook/intellisense/semanticTokens.vscode.test.ts index 0d4d123b385..9541819ffd4 100644 --- a/src/test/datascience/notebook/intellisense/semanticTokens.vscode.test.ts +++ b/src/test/datascience/notebook/intellisense/semanticTokens.vscode.test.ts @@ -122,7 +122,7 @@ suite('DataScience - VSCode semantic token tests', function () { assert.deepStrictEqual(actualTokens, expectedTokens, 'Tokens not correct after edit'); }); - test.only('Special token check', async function () { + test('Special token check', async function () { await insertCodeCell( 'import sqllite3 as sql\n\nconn = sql.connect("test.db")\ncur = conn.cursor()\n# BLAH BLAH' ); @@ -130,18 +130,9 @@ suite('DataScience - VSCode semantic token tests', function () { '\ndata = [\n ("name", "John", "age", 30)\n ("name", "John", "age", 30)\n ("name", "John", "age", 30)\n ("name", "John", "age", 30)\n ("name", "John", "age", 30)\n]', { index: 1 } ); - // await insertCodeCell('\n'); const cell1 = vscodeNotebook.activeNotebookEditor?.notebook.cellAt(0)!; const cell2 = vscodeNotebook.activeNotebookEditor?.notebook.cellAt(1)!; - // const editor = window.visibleTextEditors.find((e) => e.document.uri === cell2.document.uri); - // await editor?.edit((b) => { - // b.insert( - // new Position(1, 0), - // 'data = [\n ("name", "John", "age", 30)\n ("name", "John", "age", 30)\n ("name", "John", "age", 30)\n ("name", "John", "age", 30)\n ("name", "John", "age", 30)\n]' - // ); - // }); - // Wait for tokens on the first cell (it works with just plain pylance) await waitForCondition( async () => { @@ -154,7 +145,6 @@ suite('DataScience - VSCode semantic token tests', function () { 100, true ); - await captureScreenShot('TokenOk'); // Then get tokens on second cell. const tokens = (await commands.executeCommand( @@ -162,7 +152,6 @@ suite('DataScience - VSCode semantic token tests', function () { cell2.document.uri )) as any; assert.ok(tokens, 'No tokens found on second cell'); - await captureScreenShot('TokenFail'); const expectedTokens: number[] = [1, 0, 4, 14, 1]; const actualTokens: number[] = [...tokens.data]; assert.deepStrictEqual(actualTokens, expectedTokens, 'Expected tokens not returned');