Skip to content

Commit

Permalink
chore(e2e): Have multiple connections by default COMPASS-8151 (#6096)
Browse files Browse the repository at this point in the history
* start multiple servers

* assert that the review link works

* don't tie disconnecting together with connecting in anticipation of connecting multiple times

* turn it into a bit more of a warning when we remove a connection that already exists before adding a new one

* test that tabs get closed when a connection disconnects

* make sure it doesn't close the wrong tabs

* refactor the connect commands so we can connect to multiple

* wip

* fix disconnectAll for multiple connections

* drive-by's to change collection rename to work the way our insert-data helpers are intended

* test that we only remove the connection that's being disconnected's tabs

* don't connect to both servers unless it is multiple connections

* close modals that are open before attempting to disconnect

* create the connections once

* comments

* More comments

* use the correct connection name

* fix sidebar tests

* deal with virtual list in the sidebar meaning not all connections are always rendered

* without only

* give in and just add a data-is-connected attribute

* fix boolean types

* connect to just one thing for logging

* don't just close all toasts always

* collapse after closing modals

* too many old screenshots cluttering results

* don't export the function

* remove commented code

* don't set the connection string when we don't mean to

* speed up setConnectFormState

* misplaced disconnect

* fix merge stuffup

* don't try and save connections or use saved connections in compass-web

* remove comment

* feedback
  • Loading branch information
lerouxb authored Aug 13, 2024
1 parent 3623af0 commit 2205fe8
Show file tree
Hide file tree
Showing 59 changed files with 2,086 additions and 1,502 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,21 @@ export function NavigationItem({
}
if (item.type === 'connection') {
return {
'data-is-active': `${isActive}`,
'data-is-active': isActive.toString(),
'data-connection-id': item.connectionInfo.id,
'data-connection-name': item.name,
'data-is-connected': (item.connectionStatus === 'connected').toString(),
};
}
if (item.type === 'database') {
return {
'data-is-active': `${isActive}`,
'data-is-active': isActive.toString(),
'data-connection-id': item.connectionId,
'data-database-name': item.dbName,
};
}
return {
'data-is-active': `${isActive}`,
'data-is-active': isActive.toString(),
'data-connection-id': item.connectionId,
'data-namespace': item.namespace,
};
Expand Down
2 changes: 0 additions & 2 deletions packages/compass-e2e-tests/helpers/commands/add-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ export async function addCollection(
timeoutMsg: `Failed to select a value "${valStr}" for "${key}" in Select after ${clickAttempt} attempt(s)`,
}
);

await browser.screenshot(`custom-collation-${key}-${valStr}.png`);
}

// scroll to the locale one so the screenshot will include it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export async function closeSettingsModal(
const settingsModalElement = await browser.$(Selectors.SettingsModal);

await settingsModalElement.waitForDisplayed();
await browser.screenshot('settings-modal.png');

await browser.clickVisible(Selectors.CloseSettingsModalButton);
await settingsModalElement.waitForDisplayed({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ export async function closeWelcomeModal(
const welcomeModalElement = await browser.$(Selectors.WelcomeModal);
await welcomeModalElement.waitForDisplayed();

await browser.screenshot('welcome-modal.png');

await browser.clickVisible(Selectors.CloseWelcomeModalButton);
await welcomeModalElement.waitForDisplayed({
reverse: true,
Expand Down
Loading

0 comments on commit 2205fe8

Please sign in to comment.