Skip to content
Merged
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
36 changes: 5 additions & 31 deletions vscode/extension/tests/find_references.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ test.describe('Model References', () => {
).toBeVisible()
})

test.skip('Find All Model References from Audit', async ({
test('Find All Model References from Audit', async ({
page,
sharedCodeServer,
tempDir,
Expand Down Expand Up @@ -288,36 +288,10 @@ test.describe('Model References', () => {
// Step 5: Use Find All References to see all occurrences across the project
await findAllReferences(page)

// Step 6: Click on a reference to navigate to customer_revenue_by_day.sql
let clickedReference = false

const referenceItems = page.locator(
'.monaco-list-row, .reference-item, .monaco-tl-row',
)
const count = await referenceItems.count()

for (let i = 0; i < count; i++) {
const item = referenceItems.nth(i)
const text = await item.textContent()

// Look for a reference that contains customer_revenue_by_day
if (text && text.includes('customer_revenue_by_day.sql')) {
await item.click()
clickedReference = true
break
}
}

expect(clickedReference).toBe(true)

// Step 7: Verify successful navigation by checking for SQL JOIN statement
await expect(page.locator('text=LEFT JOIN')).toBeVisible()

// Step 8: Interact with the file to verify it's fully loaded and check its content
await page.locator('text=LEFT JOIN').first().click()
await expect(
page.locator('text=FROM sushi.order_items AS oi'),
).toBeVisible()
// Assert that the references panel shows the correct files
await page.waitForSelector('text=References')
await page.waitForSelector('text=customer_revenue_by_day.sql')
await page.waitForSelector('text=items.py')
})
})

Expand Down