Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion vscode/extension/tests/bad_setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ test('lineage, no sqlmesh found', async ({
// Checks that if you have another file open like somewhere else, it still checks the workspace first for a successful context
// it's very flaky but runs when debugging
// - the typing in of the file name is very flaky
test.skip('check that the LSP runs correctly by opening lineage when looking at another file before not in workspace', async ({
test('check that the LSP runs correctly by opening lineage when looking at another file before not in workspace', async ({
page,
sharedCodeServer,
tempDir,
Expand Down
10 changes: 6 additions & 4 deletions vscode/extension/tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,19 @@ export const openFile = async (page: Page, file: string): Promise<void> => {
const maxRetries = 3
const retryDelay = 3000

const fileName = path.basename(file)

for (let attempt = 0; attempt < maxRetries; attempt++) {
try {
await page.keyboard.press(
process.platform === 'darwin' ? 'Meta+P' : 'Control+P',
)
await page.waitForSelector('input[aria-label="Search files by name"]', {
timeout: 5000,
})
await page
.getByRole('textbox', { name: 'Search files by name' })
.waitFor({ state: 'visible', timeout: 5000 })
await page.keyboard.type(file)
const commandElement = await page.waitForSelector(
`a:has-text("${file}")`,
`a:has-text("${fileName}")`,
{ timeout: 5000 },
)
await commandElement.click()
Expand Down