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
6 changes: 2 additions & 4 deletions vscode/extension/tests/bad_setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import {
test('missing LSP dependencies shows install prompt', async ({
page,
sharedCodeServer,
}, testInfo) => {
testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation
}) => {
const tempDir = await fs.mkdtemp(
path.join(os.tmpdir(), 'vscode-test-tcloud-'),
)
Expand Down Expand Up @@ -111,8 +110,7 @@ test('lineage, no sqlmesh found', async ({
test.skip('check that the LSP runs correctly by opening lineage when looking at another file before not in workspace', async ({
page,
sharedCodeServer,
}, testInfo) => {
testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation
}) => {
const tempDir = await fs.mkdtemp(
path.join(os.tmpdir(), 'vscode-test-tcloud-'),
)
Expand Down
18 changes: 3 additions & 15 deletions vscode/extension/tests/python_env.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,7 @@ async function setupEnvironment(): Promise<{
}

test.describe('python environment variable injection on sqlmesh_lsp', () => {
test('normal setup - error ', async ({
page,
sharedCodeServer,
}, testInfo) => {
testInfo.setTimeout(120_000)

test('normal setup - error ', async ({ page, sharedCodeServer }) => {
const { tempDir } = await setupEnvironment()
writeEnvironmentConfig(tempDir)
await runTest(page, sharedCodeServer, tempDir)
Expand Down Expand Up @@ -120,22 +115,15 @@ async function setupTcloudProject(
}

test.describe('tcloud version', () => {
test('normal setup - error ', async ({
page,
sharedCodeServer,
}, testInfo) => {
testInfo.setTimeout(120_000)

test('normal setup - error ', async ({ page, sharedCodeServer }) => {
const { tempDir, pythonDetails } = await setupEnvironment()
await setupTcloudProject(tempDir, pythonDetails)
writeEnvironmentConfig(tempDir)
await runTest(page, sharedCodeServer, tempDir)
await page.waitForSelector('text=Error creating context')
})

test('normal setup - set', async ({ page, sharedCodeServer }, testInfo) => {
testInfo.setTimeout(120_000)

test('normal setup - set', async ({ page, sharedCodeServer }) => {
const { tempDir, pythonDetails } = await setupEnvironment()
await setupTcloudProject(tempDir, pythonDetails)
writeEnvironmentConfig(tempDir)
Expand Down
9 changes: 3 additions & 6 deletions vscode/extension/tests/tcloud.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ async function setupPythonEnvironment(envDir: string): Promise<string> {
return pythonDetails.pythonPath
}

test('not signed in, shows sign in window', async ({ page }, testInfo) => {
testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation
test('not signed in, shows sign in window', async ({ page }) => {
const tempDir = await fs.mkdtemp(
path.join(os.tmpdir(), 'vscode-test-tcloud-'),
)
Expand Down Expand Up @@ -189,8 +188,7 @@ test('signed in and not installed shows installation window', async ({

test('tcloud sqlmesh_lsp command starts the sqlmesh_lsp in old version when ready', async ({
page,
}, testInfo) => {
testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation
}) => {
const tempDir = await fs.mkdtemp(
path.join(os.tmpdir(), 'vscode-test-tcloud-'),
)
Expand Down Expand Up @@ -351,8 +349,7 @@ test('tcloud sqlmesh_lsp command starts the sqlmesh_lsp in new version when read
// but the test is still useful when running it manually.
test.skip('tcloud not signed in and not installed, shows sign in window and then fact that loaded', async ({
page,
}, testInfo) => {
testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation
}) => {
const tempDir = await fs.mkdtemp(
path.join(os.tmpdir(), 'vscode-test-tcloud-'),
)
Expand Down
3 changes: 1 addition & 2 deletions vscode/extension/tests/venv_naming.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import {
SUSHI_SOURCE_PATH,
} from './utils'

test('venv being named .env', async ({ page, sharedCodeServer }, testInfo) => {
testInfo.setTimeout(120_000) // 2 minutes for venv creation and package installation
test('venv being named .env', async ({ page, sharedCodeServer }) => {
const tempDir = await fs.mkdtemp(
path.join(os.tmpdir(), 'vscode-test-tcloud-'),
)
Expand Down