mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-08 12:07:06 +00:00
Don't refresh databases when opening Scale+Settings and only delete database if running locally
This commit is contained in:
16
test/fx.ts
16
test/fx.ts
@@ -460,14 +460,14 @@ export class DataExplorer {
|
|||||||
const containerNode = await this.waitForContainerNode(context.database.id, context.container.id);
|
const containerNode = await this.waitForContainerNode(context.database.id, context.container.id);
|
||||||
await containerNode.expand();
|
await containerNode.expand();
|
||||||
|
|
||||||
// refresh tree to remove deleted database
|
// // refresh tree to remove deleted database
|
||||||
const consoleMessages = await this.getNotificationConsoleMessages();
|
// const consoleMessages = await this.getNotificationConsoleMessages();
|
||||||
const refreshButton = this.frame.getByTestId("Sidebar/RefreshButton");
|
// const refreshButton = this.frame.getByTestId("Sidebar/RefreshButton");
|
||||||
await refreshButton.click();
|
// await refreshButton.click();
|
||||||
await expect(consoleMessages).toContainText("Successfully refreshed databases", {
|
// await expect(consoleMessages).toContainText("Successfully refreshed databases", {
|
||||||
timeout: ONE_MINUTE_MS,
|
// timeout: ONE_MINUTE_MS,
|
||||||
});
|
// });
|
||||||
await this.collapseNotificationConsole();
|
// await this.collapseNotificationConsole();
|
||||||
|
|
||||||
const scaleAndSettingsButton = this.frame.getByTestId(
|
const scaleAndSettingsButton = this.frame.getByTestId(
|
||||||
`TreeNode:${context.database.id}/${context.container.id}/Scale & Settings`,
|
`TreeNode:${context.database.id}/${context.container.id}/Scale & Settings`,
|
||||||
|
|||||||
@@ -23,9 +23,11 @@ test.describe("Change Partition Key", () => {
|
|||||||
await PartitionKeyTab.click();
|
await PartitionKeyTab.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
// test.afterAll("Delete Test Database", async () => {
|
if (!process.env.CI) {
|
||||||
// await context?.dispose();
|
test.afterEach("Delete Test Database", async () => {
|
||||||
// });
|
await context?.dispose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
test("Change partition key path", async () => {
|
test("Change partition key path", async () => {
|
||||||
await expect(explorer.frame.getByText("/partitionKey")).toBeVisible();
|
await expect(explorer.frame.getByText("/partitionKey")).toBeVisible();
|
||||||
|
|||||||
@@ -13,11 +13,10 @@ test.describe("Autoscale and Manual throughput", () => {
|
|||||||
let context: TestContainerContext = null!;
|
let context: TestContainerContext = null!;
|
||||||
let explorer: DataExplorer = null!;
|
let explorer: DataExplorer = null!;
|
||||||
|
|
||||||
test.beforeAll("Create Test Database", async () => {
|
test.beforeAll("Create Test Database", async () => {});
|
||||||
context = await createTestSQLContainer();
|
|
||||||
});
|
|
||||||
|
|
||||||
test.beforeEach("Open container settings", async ({ page }) => {
|
test.beforeEach("Open container settings", async ({ page }) => {
|
||||||
|
context = await createTestSQLContainer();
|
||||||
explorer = await DataExplorer.open(page, TestAccount.SQL);
|
explorer = await DataExplorer.open(page, TestAccount.SQL);
|
||||||
|
|
||||||
// Click Scale & Settings and open Scale tab
|
// Click Scale & Settings and open Scale tab
|
||||||
@@ -26,9 +25,11 @@ test.describe("Autoscale and Manual throughput", () => {
|
|||||||
await scaleTab.click();
|
await scaleTab.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
// test.afterEach("Delete Test Database", async () => {
|
if (!process.env.CI) {
|
||||||
// await context?.dispose();
|
test.afterEach("Delete Test Database", async () => {
|
||||||
// });
|
await context?.dispose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
test("Update autoscale max throughput", async () => {
|
test("Update autoscale max throughput", async () => {
|
||||||
// By default the created container has manual throughput (Containers created via JS SDK v4.7.0 cannot be created with autoscale throughput)
|
// By default the created container has manual throughput (Containers created via JS SDK v4.7.0 cannot be created with autoscale throughput)
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ test.describe("Settings under Scale & Settings", () => {
|
|||||||
let context: TestContainerContext = null!;
|
let context: TestContainerContext = null!;
|
||||||
let explorer: DataExplorer = null!;
|
let explorer: DataExplorer = null!;
|
||||||
|
|
||||||
test.beforeAll("Create Test Database", async () => {
|
// test.beforeAll("Create Test Database", async () => {
|
||||||
context = await createTestSQLContainer();
|
// });
|
||||||
});
|
|
||||||
|
|
||||||
test.beforeEach("Open container settings", async ({ page }) => {
|
test.beforeEach("Open container settings", async ({ page }) => {
|
||||||
|
context = await createTestSQLContainer();
|
||||||
explorer = await DataExplorer.open(page, TestAccount.SQL);
|
explorer = await DataExplorer.open(page, TestAccount.SQL);
|
||||||
|
|
||||||
// Click Scale & Settings and open Scale tab
|
// Click Scale & Settings and open Scale tab
|
||||||
@@ -22,6 +22,11 @@ test.describe("Settings under Scale & Settings", () => {
|
|||||||
// test.afterEach("Delete Test Database", async () => {
|
// test.afterEach("Delete Test Database", async () => {
|
||||||
// await context?.dispose();
|
// 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" });
|
||||||
|
|||||||
Reference in New Issue
Block a user