when refreshing containers, open console window to check for status completion

This commit is contained in:
Asier Isayas
2025-12-31 10:10:33 -05:00
parent 87d5f84f2e
commit d235be6a3b
4 changed files with 37 additions and 18 deletions

View File

@@ -461,9 +461,10 @@ export class DataExplorer {
await containerNode.expand();
// refresh tree to remove deleted database
const consoleMessages = await this.getConsoleMessages();
const refreshButton = this.frame.getByTestId("Sidebar/RefreshButton");
await refreshButton.click();
await expect(this.getConsoleMessage()).toContainText("Successfully refreshed databases", {
await expect(consoleMessages).toContainText("Successfully refreshed databases", {
timeout: ONE_MINUTE_MS,
});
@@ -474,10 +475,16 @@ export class DataExplorer {
}
/** Gets the console message element */
getConsoleMessage(): Locator {
getConsoleHeaderStatus(): Locator {
return this.frame.getByTestId("notification-console/header-status");
}
async getConsoleMessages(): Promise<Locator> {
const expandCollapseConsoleLogsButton = this.frame.getByTestId("NotificationConsole/ExpandCollapseButton");
await expandCollapseConsoleLogsButton.click();
return this.frame.getByTestId("NotificationConsole/Contents");
}
async getDropdownItemByName(name: string, ariaLabel?: string): Promise<Locator> {
const dropdownItemsWrapper = this.frame.locator("div.ms-Dropdown-items");
if (ariaLabel) {