Skip to content

Commit 22377c1

Browse files
authored
chore(compass-e2e-tests): tweaks to hovering over the sidebar connection and clicking the connect button for smoketest reliability COMPASS-9778 (#7297)
tweaks to hovering and clicking the connect button for smoketest reliability
1 parent 51dbe84 commit 22377c1

File tree

1 file changed

+13
-0
lines changed
  • packages/compass-e2e-tests/helpers/commands

1 file changed

+13
-0
lines changed

packages/compass-e2e-tests/helpers/commands/connect.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,21 @@ export async function connectByName(
187187
connectionName: string,
188188
options: ConnectionResultOptions = {}
189189
) {
190+
// make sure the connection shows up before we try and hover over it
191+
await browser
192+
.$(Selectors.sidebarConnection(connectionName))
193+
.waitForDisplayed();
194+
195+
// focus the filter input so that we can be sure the window is focused and the
196+
// mouse pointer is away from the connection itself
197+
await browser.clickVisible(Selectors.SidebarFilterInput);
198+
199+
// hover over the connection and hope the connect button shows up
190200
await browser.hover(Selectors.sidebarConnection(connectionName));
201+
202+
// hopefully the connect button showed up on hover and we can click it
191203
await browser.clickVisible(Selectors.sidebarConnectionButton(connectionName));
204+
192205
await browser.waitForConnectionResult(connectionName, options);
193206
}
194207

0 commit comments

Comments
 (0)