Compare commits

...

3 Commits

Author SHA1 Message Date
Asier Isayas
59a3cc18f0 fix stored procedure test 2026-01-09 13:01:49 -08:00
Asier Isayas
53a172b635 in CI delete every db after test finishes 2026-01-09 12:24:59 -08:00
Asier Isayas
3d182977d6 in stored procedure test, only delete DB when running locally not in CI 2026-01-09 10:56:36 -08:00
8 changed files with 18 additions and 32 deletions

View File

@@ -136,9 +136,7 @@ test.describe.serial("Upload Item", () => {
if (existsSync(uploadDocumentDirPath)) { if (existsSync(uploadDocumentDirPath)) {
rmdirSync(uploadDocumentDirPath); rmdirSync(uploadDocumentDirPath);
} }
if (!process.env.CI) {
await context?.dispose(); await context?.dispose();
}
}); });
test.afterEach("Close Upload Items panel if still open", async () => { test.afterEach("Close Upload Items panel if still open", async () => {

View File

@@ -31,11 +31,9 @@ test.beforeEach("Open new query tab", async ({ page }) => {
}); });
// Delete database only if not running in CI // Delete database only if not running in CI
if (!process.env.CI) { test.afterAll("Delete Test Database", async () => {
test.afterAll("Delete Test Database", async () => {
await context?.dispose(); await context?.dispose();
}); });
}
test("Query results", async () => { test("Query results", async () => {
// Run the query and verify the results // Run the query and verify the results

View File

@@ -24,11 +24,9 @@ test.describe("Change Partition Key", () => {
}); });
// Delete database only if not running in CI // Delete database only if not running in CI
if (!process.env.CI) {
test.afterEach("Delete Test Database", async () => { test.afterEach("Delete Test Database", async () => {
await context?.dispose(); await context?.dispose();
}); });
}
test("Change partition key path", async ({ page }) => { test("Change partition key path", async ({ page }) => {
await expect(explorer.frame.getByText("/partitionKey")).toBeVisible(); await expect(explorer.frame.getByText("/partitionKey")).toBeVisible();

View File

@@ -118,7 +118,5 @@ async function openScaleTab(browser: Browser): Promise<SetupResult> {
} }
async function cleanup({ context }: Partial<SetupResult>) { async function cleanup({ context }: Partial<SetupResult>) {
if (!process.env.CI) {
await context?.dispose(); await context?.dispose();
}
} }

View File

@@ -18,11 +18,9 @@ test.describe("Settings under Scale & Settings", () => {
}); });
// Delete database only if not running in CI // Delete database only if not running in CI
if (!process.env.CI) {
test.afterAll("Delete Test Database", async () => { test.afterAll("Delete Test Database", async () => {
await context?.dispose(); await context?.dispose();
}); });
}
test("Update TTL to On (no default)", async () => { test("Update TTL to On (no default)", async () => {
const ttlOnNoDefaultRadioButton = explorer.frame.getByRole("radio", { name: "ttl-on-no-default-option" }); const ttlOnNoDefaultRadioButton = explorer.frame.getByRole("radio", { name: "ttl-on-no-default-option" });

View File

@@ -43,7 +43,7 @@ test.describe("Stored Procedures", () => {
); );
// Execute stored procedure // Execute stored procedure
const executeButton = explorer.commandBarButton(CommandBarButton.Execute); const executeButton = explorer.commandBarButton(CommandBarButton.Execute).first();
await executeButton.click(); await executeButton.click();
const executeSidePanelButton = explorer.frame.getByTestId("Panel/OkButton"); const executeSidePanelButton = explorer.frame.getByTestId("Panel/OkButton");
await executeSidePanelButton.click(); await executeSidePanelButton.click();

View File

@@ -26,11 +26,9 @@ test.describe("Triggers", () => {
explorer = await DataExplorer.open(page, TestAccount.SQL); explorer = await DataExplorer.open(page, TestAccount.SQL);
}); });
if (!process.env.CI) {
test.afterAll("Delete Test Database", async () => { test.afterAll("Delete Test Database", async () => {
await context?.dispose(); await context?.dispose();
}); });
}
test("Add and delete trigger", async ({ page }, testInfo) => { test("Add and delete trigger", async ({ page }, testInfo) => {
// Open container context menu and click New Trigger // Open container context menu and click New Trigger

View File

@@ -19,11 +19,9 @@ test.describe("User Defined Functions", () => {
explorer = await DataExplorer.open(page, TestAccount.SQL); explorer = await DataExplorer.open(page, TestAccount.SQL);
}); });
if (!process.env.CI) {
test.afterAll("Delete Test Database", async () => { test.afterAll("Delete Test Database", async () => {
await context?.dispose(); await context?.dispose();
}); });
}
test("Add, execute, and delete user defined function", async ({ page }, testInfo) => { test("Add, execute, and delete user defined function", async ({ page }, testInfo) => {
// Open container context menu and click New UDF // Open container context menu and click New UDF