Skip to content

Commit c17e83c

Browse files
author
laurennat
authored
launch with new ui disabled in tests (#19015)
1 parent 613f554 commit c17e83c

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

test/e2e/activityBar.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ test.describe("MSSQL Extension - Activity Bar", async () => {
1313
let vsCodePage: Page;
1414

1515
test.beforeAll(async () => {
16-
const { electronApp, page } = await launchVsCodeWithMssqlExtension();
16+
// Launch with new UI off
17+
const { electronApp, page } =
18+
await launchVsCodeWithMssqlExtension(true);
1719
vsCodeApp = electronApp;
1820
vsCodePage = page;
1921
});

test/e2e/connection.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ test.describe("MSSQL Extension - Database Connection", async () => {
2626
let vsCodePage: Page;
2727

2828
test.beforeAll(async () => {
29-
const { electronApp, page } = await launchVsCodeWithMssqlExtension();
29+
// Launch with new UI off
30+
const { electronApp, page } =
31+
await launchVsCodeWithMssqlExtension(true);
3032
vsCodeApp = electronApp;
3133
vsCodePage = page;
3234
});

test/e2e/queryExecution.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ test.describe("MSSQL Extension - Query Execution", async () => {
3434
let profileName: string;
3535

3636
test.beforeAll(async () => {
37-
const { electronApp, page } = await launchVsCodeWithMssqlExtension();
37+
// Launch with new UI off
38+
const { electronApp, page } =
39+
await launchVsCodeWithMssqlExtension(true);
3840
vsCodeApp = electronApp;
3941
vsCodePage = page;
4042

test/e2e/utils/launchVscodeWithMsSqlExt.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as path from "path";
99
import { ElectronApplication, Page } from "@playwright/test";
1010
import { getVsCodeVersionName } from "./envConfigReader";
1111

12-
export async function launchVsCodeWithMssqlExtension(): Promise<{
12+
export async function launchVsCodeWithMssqlExtension(oldUi?: boolean): Promise<{
1313
electronApp: ElectronApplication;
1414
page: Page;
1515
}> {
@@ -18,6 +18,11 @@ export async function launchVsCodeWithMssqlExtension(): Promise<{
1818
await downloadAndUnzipVSCode(vsCodeVersionName);
1919

2020
const mssqlExtensionPath = path.resolve(__dirname, "../../../");
21+
22+
const settingsOption = oldUi
23+
? `--user-data-dir=${path.join(process.cwd(), "test", "resources", "launchDir")}`
24+
: "";
25+
2126
const electronApp = await electron.launch({
2227
executablePath: vsCodeExecutablePath,
2328
args: [
@@ -30,6 +35,7 @@ export async function launchVsCodeWithMssqlExtension(): Promise<{
3035
"--profile-temp", // "debug in a clean environment"
3136
"--skip-release-notes",
3237
"--skip-welcome",
38+
settingsOption,
3339
],
3440
});
3541

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"mssql.openQueryResultsInTabByDefaultDoNotShowPrompt": false,
3+
"mssql.enableRichExperiences": false,
4+
"mssql.autoDisableNonTSqlLanguageService": false
5+
}

0 commit comments

Comments
 (0)