This commit is contained in:
Logan Ramos
2022-03-14 13:26:45 -04:00
parent 04f6cdc4ff
commit 53aaa205e6
7 changed files with 32 additions and 33 deletions

View File

@@ -383,12 +383,12 @@ suite('vscode API - window', () => {
await window.showTextDocument(docC, { viewColumn: ViewColumn.Two, preview: false });
const tabGroups = window.tabGroups;
assert.strictEqual(tabGroups.all.length, 2);
assert.strictEqual(tabGroups.groups.length, 2);
const group1Tabs = tabGroups.all[0].tabs;
const group1Tabs = tabGroups.groups[0].tabs;
assert.strictEqual(group1Tabs.length, 2);
const group2Tabs = tabGroups.all[1].tabs;
const group2Tabs = tabGroups.groups[1].tabs;
assert.strictEqual(group2Tabs.length, 1);
await group1Tabs[0].move(1, ViewColumn.One);
@@ -397,7 +397,7 @@ suite('vscode API - window', () => {
test('Tabs - vscode.open & vscode.diff', async function () {
// Simple function to get the active tab
const getActiveTab = () => {
return window.tabGroups.all.find(g => g.isActive)?.activeTab;
return window.tabGroups.groups.find(g => g.isActive)?.activeTab;
};
const [docA, docB, docC] = await Promise.all([
@@ -420,7 +420,7 @@ suite('vscode API - window', () => {
await commands.executeCommand('vscode.diff', leftDiff, rightDiff, 'Diff', { viewColumn: ViewColumn.Four, preview: false });
assert.strictEqual(getActiveTab()?.viewColumn, ViewColumn.Four);
const tabs = window.tabGroups.all.map(g => g.tabs).flat(1);
const tabs = window.tabGroups.groups.map(g => g.tabs).flat(1);
assert.strictEqual(tabs.length, 5);
assert.strictEqual(tabs[0].resource?.toString(), docA.uri.toString());
assert.strictEqual(tabs[1].resource?.toString(), docB.uri.toString());
@@ -451,7 +451,7 @@ suite('vscode API - window', () => {
const rightDiff = await createRandomFile();
await commands.executeCommand('vscode.diff', leftDiff, rightDiff, 'Diff', { viewColumn: ViewColumn.Three, preview: false });
const tabs = window.tabGroups.all.map(g => g.tabs).flat(1);
const tabs = window.tabGroups.groups.map(g => g.tabs).flat(1);
assert.strictEqual(tabs.length, 5);
// All resources should match the text documents as they're the only tabs currently open
@@ -480,7 +480,7 @@ suite('vscode API - window', () => {
// Function to acquire the active tab within the active group
const getActiveTabInActiveGroup = () => {
const activeGroup = window.tabGroups.all.filter(group => group.isActive)[0];
const activeGroup = window.tabGroups.groups.filter(group => group.isActive)[0];
return activeGroup.activeTab;
};