diff --git a/package-lock.json b/package-lock.json index 0663caa6d..b3f8d655e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -116,8 +116,8 @@ "tinykeys": "2.1.0", "underscore": "1.12.1", "utility-types": "3.10.0", - "web-vitals": "4.2.4", "uuid": "9.0.0", + "web-vitals": "4.2.4", "zustand": "3.5.0" }, "devDependencies": { diff --git a/test/cassandra/container.spec.ts b/test/cassandra/container.spec.ts index e1b6d59dc..a8262ca50 100644 --- a/test/cassandra/container.spec.ts +++ b/test/cassandra/container.spec.ts @@ -8,7 +8,8 @@ test("Cassandra keyspace and table CRUD", async ({ page }) => { const explorer = await DataExplorer.open(page, TestAccount.Cassandra); - await explorer.globalCommandButton("New Table").click(); + const newTableButton = await explorer.globalCommandButton("New Table"); + await newTableButton.click(); await explorer.whilePanelOpen( "Add Table", async (panel, okButton) => { diff --git a/test/fx.ts b/test/fx.ts index 56e571635..369b8099b 100644 --- a/test/fx.ts +++ b/test/fx.ts @@ -352,8 +352,9 @@ export class DataExplorer { * * There's only a single "primary" button, but we still require you to pass the label to confirm you're selecting the right button. */ - globalCommandButton(label: string): Locator { - return this.frame.getByTestId("GlobalCommands").getByText(label); + async globalCommandButton(label: string): Promise { + await this.frame.getByTestId("GlobalCommands").click(); + return this.frame.getByRole("menuitem", { name: label }); } /** Select the command bar button with the specified label */ diff --git a/test/gremlin/container.spec.ts b/test/gremlin/container.spec.ts index 5abaa481a..87baac821 100644 --- a/test/gremlin/container.spec.ts +++ b/test/gremlin/container.spec.ts @@ -9,7 +9,8 @@ test("Gremlin graph CRUD", async ({ page }) => { const explorer = await DataExplorer.open(page, TestAccount.Gremlin); // Create new database and graph - await explorer.globalCommandButton("New Graph").click(); + const newGraphButton = await explorer.globalCommandButton("New Graph"); + await newGraphButton.click(); await explorer.whilePanelOpen( "New Graph", async (panel, okButton) => { diff --git a/test/mongo/container.spec.ts b/test/mongo/container.spec.ts index c3d8c8895..5f31c3ab8 100644 --- a/test/mongo/container.spec.ts +++ b/test/mongo/container.spec.ts @@ -14,7 +14,8 @@ import { DataExplorer, TEST_AUTOSCALE_THROUGHPUT_RU, TestAccount, generateUnique const explorer = await DataExplorer.open(page, accountType); - await explorer.globalCommandButton("New Collection").click(); + const newCollectionButton = await explorer.globalCommandButton("New Collection"); + await newCollectionButton.click(); await explorer.whilePanelOpen( "New Collection", async (panel, okButton) => { diff --git a/test/sql/container.spec.ts b/test/sql/container.spec.ts index 23340844c..ea02b2105 100644 --- a/test/sql/container.spec.ts +++ b/test/sql/container.spec.ts @@ -8,7 +8,8 @@ test("SQL database and container CRUD", async ({ page }) => { const explorer = await DataExplorer.open(page, TestAccount.SQL); - await explorer.globalCommandButton("New Container").click(); + const newContainerButton = await explorer.globalCommandButton("New Container"); + await newContainerButton.click(); await explorer.whilePanelOpen( "New Container", async (panel, okButton) => { diff --git a/test/tables/container.spec.ts b/test/tables/container.spec.ts index c3fc70f66..0e7564555 100644 --- a/test/tables/container.spec.ts +++ b/test/tables/container.spec.ts @@ -7,7 +7,8 @@ test("Tables CRUD", async ({ page }) => { const explorer = await DataExplorer.open(page, TestAccount.Tables); - await explorer.globalCommandButton("New Table").click(); + const newTableButton = await explorer.globalCommandButton("New Table"); + await newTableButton.click(); await explorer.whilePanelOpen( "New Table", async (panel, okButton) => {