mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-31 06:41:35 +00:00
refresh tree before opening scale and settings
This commit is contained in:
@@ -457,6 +457,10 @@ export class DataExplorer {
|
||||
|
||||
/** Opens the Scale & Settings panel for the specified container */
|
||||
async openScaleAndSettings(context: TestContainerContext): Promise<void> {
|
||||
// refresh tree to remove deleted database
|
||||
const refreshButton = this.frame.getByTestId("Sidebar/RefreshButton");
|
||||
await refreshButton.click();
|
||||
|
||||
const containerNode = await this.waitForContainerNode(context.database.id, context.container.id);
|
||||
await containerNode.expand();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ test.describe("Change Partition Key", () => {
|
||||
});
|
||||
|
||||
test.afterAll("Delete Test Database", async () => {
|
||||
await context?.dispose(explorer);
|
||||
await context?.dispose();
|
||||
});
|
||||
|
||||
test("Change partition key path", async () => {
|
||||
|
||||
@@ -24,7 +24,7 @@ test.describe("Autoscale and Manual throughput", () => {
|
||||
});
|
||||
|
||||
test.afterEach("Delete Test Database", async () => {
|
||||
await context?.dispose(explorer);
|
||||
await context?.dispose();
|
||||
});
|
||||
|
||||
test("Update autoscale max throughput", async () => {
|
||||
|
||||
@@ -5,13 +5,12 @@ import { BulkOperationType, Container, CosmosClient, CosmosClientOptions, Databa
|
||||
import { AzureIdentityCredentialAdapter } from "@azure/ms-rest-js";
|
||||
|
||||
import {
|
||||
DataExplorer,
|
||||
generateUniqueName,
|
||||
getAccountName,
|
||||
getAzureCLICredentials,
|
||||
resourceGroupName,
|
||||
subscriptionId,
|
||||
TestAccount,
|
||||
TestAccount
|
||||
} from "./fx";
|
||||
|
||||
export interface TestItem {
|
||||
@@ -70,14 +69,8 @@ export class TestContainerContext {
|
||||
public testData: Map<string, TestItem>,
|
||||
) {}
|
||||
|
||||
async dispose(explorer: DataExplorer) {
|
||||
async dispose() {
|
||||
await this.database.delete();
|
||||
|
||||
// refresh tree to remove deleted database
|
||||
if (explorer) {
|
||||
const refreshButton = explorer.frame.getByTestId("Sidebar/RefreshButton");
|
||||
await refreshButton.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user