Skip to content

chore(vscode): implementing ui testing #4416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions vscode/extension/src/test/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,27 @@ suite('Extension Test Suite', () => {
assert.strictEqual(-1, [1, 2, 3].indexOf(5))
assert.strictEqual(-1, [1, 2, 3].indexOf(0))
})

test('Lineage tab opens', async () => {
// Check if command exists
const allCommands = await vscode.commands.getCommands(true)
const hasLineageViewCommand = allCommands.includes(
'workbench.view.extension.lineage_view',
)

if (!hasLineageViewCommand) {
throw new Error('Lineage view command not found')
}
// Try to open the Lineage webview
await vscode.commands.executeCommand(
'workbench.view.extension.lineage_view',
)

// If command exists but fails, the test will fail with an exception
// Wait a bit for any async operations
await new Promise(resolve => setTimeout(resolve, 500))

// Success if no exception was thrown
assert.ok(true, 'Lineage view command executed without errors')
})
})