refresh tree before opening scale and settings

This commit is contained in:
Asier Isayas
2025-12-30 11:22:23 -05:00
parent 1736e24429
commit 459b2c7050
4 changed files with 8 additions and 11 deletions

View File

@@ -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();

View File

@@ -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 () => {

View File

@@ -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 () => {

View File

@@ -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();
}
}
}