Skip to content

Commit 64604b4

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents 6802ac4 + 31d597d commit 64604b4

File tree

6 files changed

+67
-14
lines changed

6 files changed

+67
-14
lines changed

package-lock.json

Lines changed: 39 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ async function resetForDisconnect(
4848
closeToasts?: boolean;
4949
} = {}
5050
) {
51-
if (await browser.$(Selectors.LGModal).isDisplayed()) {
52-
// close any modals that might be in the way
53-
await browser.clickVisible(Selectors.LGModalClose);
54-
await browser.$(Selectors.LGModal).waitForDisplayed({ reverse: true });
55-
}
51+
await browser.hideVisibleModal();
5652

5753
// Collapse all the connections so that they will all hopefully fit on screen
5854
// and therefore be rendered.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import type { CompassBrowser } from '../compass-browser';
2+
import * as Selectors from '../selectors';
3+
4+
import Debug from 'debug';
5+
6+
const debug = Debug('compass-e2e-tests');
7+
8+
export async function hideVisibleModal(browser: CompassBrowser): Promise<void> {
9+
// If there's some race condition where something else is closing the modal at
10+
// the same time we're trying to close the modal, then make it error out
11+
// quickly so it can be ignored and we move on.
12+
13+
if (await browser.$(Selectors.LGModal).isDisplayed()) {
14+
// close any modals that might be in the way
15+
const waitOptions = { timeout: 2_000 };
16+
try {
17+
await browser.clickVisible(Selectors.LGModalClose, waitOptions);
18+
await browser.$(Selectors.LGModal).waitForDisplayed({ reverse: true });
19+
} catch (err) {
20+
// if the modal disappears by itself in the meantime, that's fine
21+
debug('ignoring', err);
22+
}
23+
}
24+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@ export * from './create-index';
5959
export * from './drop-index';
6060
export * from './hide-index';
6161
export * from './unhide-index';
62+
export * from './hide-visible-modal';
6263
export * from './hide-visible-toasts';
6364
export * from './sidebar-collection';

packages/compass-e2e-tests/helpers/commands/remove-connections.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import type { CompassBrowser } from '../compass-browser';
33
import * as Selectors from '../selectors';
44

55
async function resetForRemove(browser: CompassBrowser) {
6-
if (await browser.$(Selectors.LGModal).isDisplayed()) {
7-
// close any modals that might be in the way
8-
await browser.clickVisible(Selectors.LGModalClose);
9-
await browser.$(Selectors.LGModal).waitForDisplayed({ reverse: true });
10-
}
6+
await browser.hideVisibleModal();
117

128
// Collapse all the connections so that they will all hopefully fit on screen
139
// and therefore be rendered.

packages/hadron-build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"lodash": "^4.17.21",
4747
"moment": "^2.29.4",
4848
"mongodb-js-cli": "^0.0.3",
49-
"node-abi": "^3.65.0",
49+
"node-abi": "^3.67.0",
5050
"normalize-package-data": "^2.3.5",
5151
"parse-github-repo-url": "^1.3.0",
5252
"semver": "^7.6.2",

0 commit comments

Comments
 (0)