()
| 7 | import { cleanUpWorkspace, setupWorkspace, waitForEditorsToClose } from '../testUtils'; |
| 8 | |
| 9 | const isPanelVisible = async () => |
| 10 | withinIsolatedEditor(async () => { |
| 11 | // Insert 1000 lines (ie. beyond veritical viewport) |
| 12 | await vscode.window.activeTextEditor!.edit((editBuilder) => { |
| 13 | editBuilder.insert(new vscode.Position(0, 0), 'Line\n'.repeat(1000)); |
| 14 | }); |
| 15 | |
| 16 | // Toggle the panel's visibility to see which has a larger vertical viewport |
| 17 | const initialVisibleLineCount = await getNumberOfVisibleLines(); |
| 18 | await vscode.commands.executeCommand('workbench.action.togglePanel'); |
| 19 | const postToggleVisibleLineCount = await getNumberOfVisibleLines(); |
| 20 | await vscode.commands.executeCommand('workbench.action.togglePanel'); |
| 21 | |
| 22 | return postToggleVisibleLineCount > initialVisibleLineCount; |
| 23 | }); |
| 24 | |
| 25 | const withinIsolatedEditor = async (lambda: () => Thenable<unknown>) => { |
| 26 | await vscode.commands.executeCommand('workbench.action.files.newUntitledFile'); |
no test coverage detected