-
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 most e2e tests to multiple connections COMPASS-7925 C…
- Loading branch information
Showing
56 changed files
with
1,373 additions
and
384 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
34 changes: 34 additions & 0 deletions
34
packages/compass-e2e-tests/helpers/commands/connection-workspaces.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,34 @@ | ||
import { TEST_MULTIPLE_CONNECTIONS } from '../compass'; | ||
import type { CompassBrowser } from '../compass-browser'; | ||
import * as Selectors from '../selectors'; | ||
|
||
export async function navigateToConnectionTab( | ||
browser: CompassBrowser, | ||
connectionName: string, | ||
tabName: 'Performance' | 'Databases' | ||
): Promise<void> { | ||
if (TEST_MULTIPLE_CONNECTIONS) { | ||
if (tabName === 'Databases') { | ||
await browser.clickVisible(Selectors.sidebarConnection(connectionName)); | ||
} else { | ||
// TODO(COMPASS-8002): click the three dots menu then the relevant option. (View performance metrics) | ||
} | ||
|
||
await waitUntilActiveConnectionTab(browser, connectionName, tabName); | ||
} else { | ||
const itemSelector = Selectors.sidebarInstanceNavigationItem(tabName); | ||
await browser.clickVisible(itemSelector); | ||
await waitUntilActiveConnectionTab(browser, connectionName, tabName); | ||
} | ||
} | ||
|
||
export async function waitUntilActiveConnectionTab( | ||
browser: CompassBrowser, | ||
connectionName: string, | ||
tabName: 'Performance' | 'Databases' | ||
) { | ||
// TODO(COMPASS-8002): we should differentiate by connectionName somehow | ||
await browser | ||
.$(Selectors.instanceWorkspaceTab(tabName, true)) | ||
.waitForDisplayed(); | ||
} |
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.