mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-06-12 15:37:27 +01:00
dont delete database
This commit is contained in:
@@ -25,9 +25,12 @@ test.describe("Change Partition Key", () => {
|
|||||||
await PartitionKeyTab.click();
|
await PartitionKeyTab.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
test.afterEach("Delete Test Database", async () => {
|
// Delete database only if not running in CI
|
||||||
await context?.dispose();
|
if (!process.env.CI) {
|
||||||
});
|
test.afterEach("Delete Test Database", async () => {
|
||||||
|
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();
|
||||||
|
|||||||
@@ -24,9 +24,12 @@ test.describe("Computed Properties", () => {
|
|||||||
await computedPropertiesTab.click();
|
await computedPropertiesTab.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
test.afterAll("Delete Test Database", async () => {
|
// Delete database only if not running in CI
|
||||||
await context?.dispose();
|
if (!process.env.CI) {
|
||||||
});
|
test.afterEach("Delete Test Database", async () => {
|
||||||
|
await context?.dispose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
test("Add valid computed property", async ({ page }) => {
|
test("Add valid computed property", async ({ page }) => {
|
||||||
await clearComputedPropertiesTextBoxContent({ page });
|
await clearComputedPropertiesTextBoxContent({ page });
|
||||||
|
|||||||
@@ -118,5 +118,7 @@ async function openScaleTab(browser: Browser): Promise<SetupResult> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function cleanup({ context }: Partial<SetupResult>) {
|
async function cleanup({ context }: Partial<SetupResult>) {
|
||||||
await context?.dispose();
|
if (!process.env.CI) {
|
||||||
|
await context?.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,12 @@ test.describe("Settings under Scale & Settings", () => {
|
|||||||
await settingsTab.click();
|
await settingsTab.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
test.afterAll("Delete Test Database", async () => {
|
// Delete database only if not running in CI
|
||||||
await context?.dispose();
|
if (!process.env.CI) {
|
||||||
});
|
test.afterEach("Delete Test Database", async () => {
|
||||||
|
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" });
|
||||||
|
|||||||
@@ -13,12 +13,15 @@ test.describe("Stored Procedures", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test.beforeEach("Open container", async ({ page }) => {
|
test.beforeEach("Open container", async ({ page }) => {
|
||||||
explorer = await DataExplorer.open(page, TestAccount.SQL);
|
explorer = await DataExplorer.open(page, TestAccount.SQL2);
|
||||||
});
|
});
|
||||||
|
|
||||||
test.afterAll("Delete Test Database", async () => {
|
// Delete database only if not running in CI
|
||||||
await context?.dispose();
|
if (!process.env.CI) {
|
||||||
});
|
test.afterEach("Delete Test Database", async () => {
|
||||||
|
await context?.dispose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
test("Add, execute, and delete stored procedure", async ({ page }, testInfo) => {
|
test("Add, execute, and delete stored procedure", async ({ page }, testInfo) => {
|
||||||
void page;
|
void page;
|
||||||
|
|||||||
@@ -25,12 +25,15 @@ test.describe("Triggers", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test.beforeEach("Open container", async ({ page }) => {
|
test.beforeEach("Open container", async ({ page }) => {
|
||||||
explorer = await DataExplorer.open(page, TestAccount.SQL);
|
explorer = await DataExplorer.open(page, TestAccount.SQL2);
|
||||||
});
|
});
|
||||||
|
|
||||||
test.afterAll("Delete Test Database", async () => {
|
// Delete database only if not running in CI
|
||||||
await context?.dispose();
|
if (!process.env.CI) {
|
||||||
});
|
test.afterEach("Delete Test Database", async () => {
|
||||||
|
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
|
||||||
|
|||||||
@@ -18,12 +18,15 @@ test.describe("User Defined Functions", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test.beforeEach("Open container", async ({ page }) => {
|
test.beforeEach("Open container", async ({ page }) => {
|
||||||
explorer = await DataExplorer.open(page, TestAccount.SQL);
|
explorer = await DataExplorer.open(page, TestAccount.SQL2);
|
||||||
});
|
});
|
||||||
|
|
||||||
test.afterAll("Delete Test Database", async () => {
|
// Delete database only if not running in CI
|
||||||
await context?.dispose();
|
if (!process.env.CI) {
|
||||||
});
|
test.afterEach("Delete Test Database", async () => {
|
||||||
|
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
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ export async function createTestSQLContainer({
|
|||||||
const adaptedCredentials = new AzureIdentityCredentialAdapter(credentials);
|
const adaptedCredentials = new AzureIdentityCredentialAdapter(credentials);
|
||||||
const armClient = new CosmosDBManagementClient(adaptedCredentials, subscriptionId);
|
const armClient = new CosmosDBManagementClient(adaptedCredentials, subscriptionId);
|
||||||
const accountName = getAccountName(testAccount);
|
const accountName = getAccountName(testAccount);
|
||||||
console.log(accountName);
|
|
||||||
const account = await armClient.databaseAccounts.get(resourceGroupName, accountName);
|
const account = await armClient.databaseAccounts.get(resourceGroupName, accountName);
|
||||||
|
|
||||||
const clientOptions: CosmosClientOptions = {
|
const clientOptions: CosmosClientOptions = {
|
||||||
|
|||||||
Reference in New Issue
Block a user