Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/compass-e2e-tests/helpers/commands/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,21 @@ export async function connectByName(
connectionName: string,
options: ConnectionResultOptions = {}
) {
// make sure the connection shows up before we try and hover over it
await browser
.$(Selectors.sidebarConnection(connectionName))
.waitForDisplayed();

// focus the filter input so that we can be sure the window is focused and the
// mouse pointer is away from the connection itself
await browser.clickVisible(Selectors.SidebarFilterInput);

// hover over the connection and hope the connect button shows up
await browser.hover(Selectors.sidebarConnection(connectionName));

// hopefully the connect button showed up on hover and we can click it
await browser.clickVisible(Selectors.sidebarConnectionButton(connectionName));

await browser.waitForConnectionResult(connectionName, options);
}

Expand Down
Loading