diff --git a/src/Explorer/Explorer.tsx b/src/Explorer/Explorer.tsx index 0b32b3ded..3b4295bf7 100644 --- a/src/Explorer/Explorer.tsx +++ b/src/Explorer/Explorer.tsx @@ -437,13 +437,14 @@ export default class Explorer { public onRefreshResourcesClick = async (): Promise => { if (isFabricMirroredKey()) { scheduleRefreshFabricToken(true).then(() => this.refreshAllDatabases()); - return; + } else { + await (userContext.authType === AuthType.ResourceToken + ? this.refreshDatabaseForResourceToken() + : this.refreshAllDatabases()); + await this.refreshNotebookList(); } - await (userContext.authType === AuthType.ResourceToken - ? this.refreshDatabaseForResourceToken() - : this.refreshAllDatabases()); - await this.refreshNotebookList(); + logConsoleInfo("Successfully refreshed databases"); }; // Facade diff --git a/src/Explorer/Tree/Collection.ts b/src/Explorer/Tree/Collection.ts index e4382de53..d41eb51a0 100644 --- a/src/Explorer/Tree/Collection.ts +++ b/src/Explorer/Tree/Collection.ts @@ -599,6 +599,16 @@ export default class Collection implements ViewModels.Collection { useSelectedNode.getState().setSelectedNode(this); const throughputCap = userContext.databaseAccount?.properties.capacity?.totalThroughputLimit; throughputCap && throughputCap !== -1 ? await useDatabases.getState().loadAllOffers() : await this.loadOffer(); + // if (throughputCap && throughputCap !== -1) { + // try { + // await useDatabases.getState().loadAllOffers(); + // } catch { + // console.log("Fail quietly"); + // return; + // } + // } else { + // await this.loadOffer(); + // } this.selectedSubnodeKind(ViewModels.CollectionTabKind.Settings); TelemetryProcessor.trace(Action.SelectItem, ActionModifiers.Mark, { description: "Settings node", diff --git a/test/fx.ts b/test/fx.ts index 7b7742c38..f59e053c6 100644 --- a/test/fx.ts +++ b/test/fx.ts @@ -457,12 +457,15 @@ export class DataExplorer { /** Opens the Scale & Settings panel for the specified container */ async openScaleAndSettings(context: TestContainerContext): Promise { + const containerNode = await this.waitForContainerNode(context.database.id, context.container.id); + await containerNode.expand(); + // 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(); + await expect(this.getConsoleMessage()).toContainText("Successfully refreshed databases", { + timeout: ONE_MINUTE_MS, + }); const scaleAndSettingsButton = this.frame.getByTestId( `TreeNode:${context.database.id}/${context.container.id}/Scale & Settings`, diff --git a/test/sql/scaleAndSettings/scale.spec.ts b/test/sql/scaleAndSettings/scale.spec.ts index 57e3b8008..3311a301a 100644 --- a/test/sql/scaleAndSettings/scale.spec.ts +++ b/test/sql/scaleAndSettings/scale.spec.ts @@ -123,4 +123,4 @@ test.describe("Autoscale and Manual throughput", () => { }, ); }; -}); \ No newline at end of file +}); diff --git a/test/testData.ts b/test/testData.ts index 9cb55caa9..9729a90b4 100644 --- a/test/testData.ts +++ b/test/testData.ts @@ -10,7 +10,7 @@ import { getAzureCLICredentials, resourceGroupName, subscriptionId, - TestAccount + TestAccount, } from "./fx"; export interface TestItem {