Skip to content

Commit 3a295f2

Browse files
committed
chore(vscode): implementing ui testing
1 parent bfbacf5 commit 3a295f2

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

vscode/extension/src/test/extension.test.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,27 @@ suite('Extension Test Suite', () => {
1212
assert.strictEqual(-1, [1, 2, 3].indexOf(5))
1313
assert.strictEqual(-1, [1, 2, 3].indexOf(0))
1414
})
15+
16+
test('Lineage tab opens', async () => {
17+
// Check if command exists
18+
const allCommands = await vscode.commands.getCommands(true)
19+
const hasLineageViewCommand = allCommands.includes(
20+
'workbench.view.extension.lineage_view',
21+
)
22+
23+
if (!hasLineageViewCommand) {
24+
throw new Error('Lineage view command not found')
25+
}
26+
// Try to open the Lineage webview
27+
await vscode.commands.executeCommand(
28+
'workbench.view.extension.lineage_view',
29+
)
30+
31+
// If command exists but fails, the test will fail with an exception
32+
// Wait a bit for any async operations
33+
await new Promise(resolve => setTimeout(resolve, 500))
34+
35+
// Success if no exception was thrown
36+
assert.ok(true, 'Lineage view command executed without errors')
37+
})
1538
})

0 commit comments

Comments
 (0)