55
66import * as assert from 'assert' ;
77import { join } from 'path' ;
8- import { CancellationTokenSource , commands , MarkdownString , TabKindNotebook , Position , QuickPickItem , Selection , StatusBarAlignment , TabKindTextDiff , TextEditor , TextEditorSelectionChangeKind , TextEditorViewColumnChangeEvent , TabKindText , Uri , ViewColumn , window , workspace } from 'vscode' ;
8+ import { CancellationTokenSource , commands , MarkdownString , TabInputNotebook , Position , QuickPickItem , Selection , StatusBarAlignment , TextEditor , TextEditorSelectionChangeKind , TextEditorViewColumnChangeEvent , TabInputText , Uri , ViewColumn , window , workspace , TabInputTextDiff } from 'vscode' ;
99import { assertNoRpc , closeAllEditors , createRandomFile , pathEquals } from '../utils' ;
1010
1111
@@ -371,28 +371,28 @@ suite('vscode API - window', () => {
371371 } ) ;
372372
373373 //#region Tabs API tests
374- test ( 'Tabs - move tab' , async function ( ) {
375- const [ docA , docB , docC ] = await Promise . all ( [
376- workspace . openTextDocument ( await createRandomFile ( ) ) ,
377- workspace . openTextDocument ( await createRandomFile ( ) ) ,
378- workspace . openTextDocument ( await createRandomFile ( ) )
379- ] ) ;
374+ // test('Tabs - move tab', async function () {
375+ // const [docA, docB, docC] = await Promise.all([
376+ // workspace.openTextDocument(await createRandomFile()),
377+ // workspace.openTextDocument(await createRandomFile()),
378+ // workspace.openTextDocument(await createRandomFile())
379+ // ]);
380380
381- await window . showTextDocument ( docA , { viewColumn : ViewColumn . One , preview : false } ) ;
382- await window . showTextDocument ( docB , { viewColumn : ViewColumn . One , preview : false } ) ;
383- await window . showTextDocument ( docC , { viewColumn : ViewColumn . Two , preview : false } ) ;
381+ // await window.showTextDocument(docA, { viewColumn: ViewColumn.One, preview: false });
382+ // await window.showTextDocument(docB, { viewColumn: ViewColumn.One, preview: false });
383+ // await window.showTextDocument(docC, { viewColumn: ViewColumn.Two, preview: false });
384384
385- const tabGroups = window . tabGroups ;
386- assert . strictEqual ( tabGroups . all . length , 2 ) ;
385+ // const tabGroups = window.tabGroups;
386+ // assert.strictEqual(tabGroups.all.length, 2);
387387
388- const group1Tabs = tabGroups . all [ 0 ] . tabs ;
389- assert . strictEqual ( group1Tabs . length , 2 ) ;
388+ // const group1Tabs = tabGroups.all[0].tabs;
389+ // assert.strictEqual(group1Tabs.length, 2);
390390
391- const group2Tabs = tabGroups . all [ 1 ] . tabs ;
392- assert . strictEqual ( group2Tabs . length , 1 ) ;
391+ // const group2Tabs = tabGroups.all[1].tabs;
392+ // assert.strictEqual(group2Tabs.length, 1);
393393
394- await tabGroups . move ( group1Tabs [ 0 ] , ViewColumn . One , 1 ) ;
395- } ) ;
394+ // await tabGroups.move(group1Tabs[0], ViewColumn.One, 1);
395+ // });
396396
397397 // TODO @lramos 15 re-enable these once shape is more stable
398398 test ( 'Tabs - vscode.open & vscode.diff' , async function ( ) {
@@ -423,14 +423,14 @@ suite('vscode API - window', () => {
423423
424424 const tabs = window . tabGroups . all . map ( g => g . tabs ) . flat ( 1 ) ;
425425 assert . strictEqual ( tabs . length , 5 ) ;
426- assert . ok ( tabs [ 0 ] . kind instanceof TabKindText ) ;
427- assert . strictEqual ( tabs [ 0 ] . kind . uri . toString ( ) , docA . uri . toString ( ) ) ;
428- assert . ok ( tabs [ 1 ] . kind instanceof TabKindText ) ;
429- assert . strictEqual ( tabs [ 1 ] . kind . uri . toString ( ) , docB . uri . toString ( ) ) ;
430- assert . ok ( tabs [ 2 ] . kind instanceof TabKindText ) ;
431- assert . strictEqual ( tabs [ 2 ] . kind . uri . toString ( ) , docC . uri . toString ( ) ) ;
432- assert . ok ( tabs [ 3 ] . kind instanceof TabKindText ) ;
433- assert . strictEqual ( tabs [ 3 ] . kind . uri . toString ( ) , commandFile . toString ( ) ) ;
426+ assert . ok ( tabs [ 0 ] . input instanceof TabInputText ) ;
427+ assert . strictEqual ( tabs [ 0 ] . input . uri . toString ( ) , docA . uri . toString ( ) ) ;
428+ assert . ok ( tabs [ 1 ] . input instanceof TabInputText ) ;
429+ assert . strictEqual ( tabs [ 1 ] . input . uri . toString ( ) , docB . uri . toString ( ) ) ;
430+ assert . ok ( tabs [ 2 ] . input instanceof TabInputText ) ;
431+ assert . strictEqual ( tabs [ 2 ] . input . uri . toString ( ) , docC . uri . toString ( ) ) ;
432+ assert . ok ( tabs [ 3 ] . input instanceof TabInputText ) ;
433+ assert . strictEqual ( tabs [ 3 ] . input . uri . toString ( ) , commandFile . toString ( ) ) ;
434434 } ) ;
435435
436436 test ( 'Tabs - Ensure tabs getter is correct' , async function ( ) {
@@ -459,17 +459,17 @@ suite('vscode API - window', () => {
459459 assert . strictEqual ( tabs . length , 5 ) ;
460460
461461 // All resources should match the text documents as they're the only tabs currently open
462- assert . ok ( tabs [ 0 ] . kind instanceof TabKindText ) ;
463- assert . strictEqual ( tabs [ 0 ] . kind . uri . toString ( ) , docA . uri . toString ( ) ) ;
464- assert . ok ( tabs [ 1 ] . kind instanceof TabKindNotebook ) ;
465- assert . strictEqual ( tabs [ 1 ] . kind . uri . toString ( ) , notebookDoc . uri . toString ( ) ) ;
466- assert . ok ( tabs [ 2 ] . kind instanceof TabKindText ) ;
467- assert . strictEqual ( tabs [ 2 ] . kind . uri . toString ( ) , docB . uri . toString ( ) ) ;
468- assert . ok ( tabs [ 3 ] . kind instanceof TabKindText ) ;
469- assert . strictEqual ( tabs [ 3 ] . kind . uri . toString ( ) , docC . uri . toString ( ) ) ;
462+ assert . ok ( tabs [ 0 ] . input instanceof TabInputText ) ;
463+ assert . strictEqual ( tabs [ 0 ] . input . uri . toString ( ) , docA . uri . toString ( ) ) ;
464+ assert . ok ( tabs [ 1 ] . input instanceof TabInputNotebook ) ;
465+ assert . strictEqual ( tabs [ 1 ] . input . uri . toString ( ) , notebookDoc . uri . toString ( ) ) ;
466+ assert . ok ( tabs [ 2 ] . input instanceof TabInputText ) ;
467+ assert . strictEqual ( tabs [ 2 ] . input . uri . toString ( ) , docB . uri . toString ( ) ) ;
468+ assert . ok ( tabs [ 3 ] . input instanceof TabInputText ) ;
469+ assert . strictEqual ( tabs [ 3 ] . input . uri . toString ( ) , docC . uri . toString ( ) ) ;
470470 // Diff editor and side by side editor report the right side as the resource
471- assert . ok ( tabs [ 4 ] . kind instanceof TabKindTextDiff ) ;
472- assert . strictEqual ( tabs [ 4 ] . kind . modified . toString ( ) , rightDiff . toString ( ) ) ;
471+ assert . ok ( tabs [ 4 ] . input instanceof TabInputTextDiff ) ;
472+ assert . strictEqual ( tabs [ 4 ] . input . modified . toString ( ) , rightDiff . toString ( ) ) ;
473473
474474 assert . strictEqual ( tabs [ 0 ] . group . viewColumn , ViewColumn . One ) ;
475475 assert . strictEqual ( tabs [ 1 ] . group . viewColumn , ViewColumn . One ) ;
@@ -495,20 +495,20 @@ suite('vscode API - window', () => {
495495 await window . showTextDocument ( docA , { viewColumn : ViewColumn . One , preview : false } ) ;
496496 let activeTab = getActiveTabInActiveGroup ( ) ;
497497 assert . ok ( activeTab ) ;
498- assert . ok ( activeTab . kind instanceof TabKindText ) ;
499- assert . strictEqual ( activeTab . kind . uri . toString ( ) , docA . uri . toString ( ) ) ;
498+ assert . ok ( activeTab . input instanceof TabInputText ) ;
499+ assert . strictEqual ( activeTab . input . uri . toString ( ) , docA . uri . toString ( ) ) ;
500500
501501 await window . showTextDocument ( docB , { viewColumn : ViewColumn . Two , preview : false } ) ;
502502 activeTab = getActiveTabInActiveGroup ( ) ;
503503 assert . ok ( activeTab ) ;
504- assert . ok ( activeTab . kind instanceof TabKindText ) ;
505- assert . strictEqual ( activeTab . kind . uri . toString ( ) , docB . uri . toString ( ) ) ;
504+ assert . ok ( activeTab . input instanceof TabInputText ) ;
505+ assert . strictEqual ( activeTab . input . uri . toString ( ) , docB . uri . toString ( ) ) ;
506506
507507 await window . showTextDocument ( docC , { viewColumn : ViewColumn . Three , preview : false } ) ;
508508 activeTab = getActiveTabInActiveGroup ( ) ;
509509 assert . ok ( activeTab ) ;
510- assert . ok ( activeTab . kind instanceof TabKindText ) ;
511- assert . strictEqual ( activeTab . kind . uri . toString ( ) , docC . uri . toString ( ) ) ;
510+ assert . ok ( activeTab . input instanceof TabInputText ) ;
511+ assert . strictEqual ( activeTab . input . uri . toString ( ) , docC . uri . toString ( ) ) ;
512512
513513 await commands . executeCommand ( 'workbench.action.closeActiveEditor' ) ;
514514 await commands . executeCommand ( 'workbench.action.closeActiveEditor' ) ;
0 commit comments