-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(e2e): Port usage of saving favourites including all of the in-u…
…se-encryption e2e tests to multiple connections COMPASS-8003 (#6021) * prettier weirdness * WIP * port in-use-encryption tests to multiple connections * remove debugging * scope some selectors * inverted check * rename disconnect to disconnectAll * move numLines * non-standard usage
- Loading branch information
Showing
20 changed files
with
413 additions
and
347 deletions.
There are no files selected for viewing
11 changes: 7 additions & 4 deletions
11
packages/compass-e2e-tests/helpers/commands/connect-with-connection-form.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/compass-e2e-tests/helpers/commands/remove-connection.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { TEST_MULTIPLE_CONNECTIONS } from '../compass'; | ||
import type { CompassBrowser } from '../compass-browser'; | ||
import * as Selectors from '../selectors'; | ||
|
||
export async function removeConnection( | ||
browser: CompassBrowser, | ||
connectionName: string | ||
): Promise<void> { | ||
if (!TEST_MULTIPLE_CONNECTIONS) { | ||
return; | ||
} | ||
|
||
// make sure there's no filter because if the connection is not displayed then we can't remove it | ||
if (await browser.$(Selectors.SidebarFilterInput).isExisting()) { | ||
await browser.clickVisible(Selectors.SidebarFilterInput); | ||
await browser.setValueVisible(Selectors.SidebarFilterInput, ''); | ||
|
||
// wait for a connection to appear. It must because if there are no | ||
// connections the filter field wouldn't exist in the first place | ||
await browser.$(Selectors.SidebarTreeItems).waitForDisplayed(); | ||
} | ||
|
||
const selector = Selectors.sidebarConnection(connectionName); | ||
if (await browser.$(selector).isExisting()) { | ||
await browser.selectConnectionMenuItem( | ||
connectionName, | ||
Selectors.Multiple.RemoveConnectionItem | ||
); | ||
await browser.$(selector).waitForExist({ reverse: true }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.