Skip to content

Commit 245e8c9

Browse files
authored
chore(vscode): reenabling tests (#5071)
1 parent b32f3ae commit 245e8c9

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

vscode/extension/tests/bad_setup.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ test('lineage, no sqlmesh found', async ({
9191
// Checks that if you have another file open like somewhere else, it still checks the workspace first for a successful context
9292
// it's very flaky but runs when debugging
9393
// - the typing in of the file name is very flaky
94-
test.skip('check that the LSP runs correctly by opening lineage when looking at another file before not in workspace', async ({
94+
test('check that the LSP runs correctly by opening lineage when looking at another file before not in workspace', async ({
9595
page,
9696
sharedCodeServer,
9797
tempDir,

vscode/extension/tests/utils.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,19 @@ export const openFile = async (page: Page, file: string): Promise<void> => {
175175
const maxRetries = 3
176176
const retryDelay = 3000
177177

178+
const fileName = path.basename(file)
179+
178180
for (let attempt = 0; attempt < maxRetries; attempt++) {
179181
try {
180182
await page.keyboard.press(
181183
process.platform === 'darwin' ? 'Meta+P' : 'Control+P',
182184
)
183-
await page.waitForSelector('input[aria-label="Search files by name"]', {
184-
timeout: 5000,
185-
})
185+
await page
186+
.getByRole('textbox', { name: 'Search files by name' })
187+
.waitFor({ state: 'visible', timeout: 5000 })
186188
await page.keyboard.type(file)
187189
const commandElement = await page.waitForSelector(
188-
`a:has-text("${file}")`,
190+
`a:has-text("${fileName}")`,
189191
{ timeout: 5000 },
190192
)
191193
await commandElement.click()

0 commit comments

Comments
 (0)