Skip to content

Commit f4691fc

Browse files
committed
Perform dismissal earlier
1 parent cf58b17 commit f4691fc

File tree

1 file changed

+8
-8
lines changed
  • packages/compass-e2e-tests/helpers/commands

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ export async function waitForConnectionResult(
140140
): Promise<string | undefined> {
141141
const waitOptions = typeof timeout !== 'undefined' ? { timeout } : undefined;
142142

143+
if (dismissEndOfLifeModal) {
144+
await browser.$(Selectors.EndOfLifeConnectionModal).waitForDisplayed();
145+
await browser.clickVisible(Selectors.EndOfLifeConnectionModalConfirmButton);
146+
await browser
147+
.$(Selectors.EndOfLifeConnectionModal)
148+
.waitForDisplayed({ reverse: true });
149+
}
150+
143151
if (
144152
(await browser.$(Selectors.SidebarFilterInput).isDisplayed()) &&
145153
(await browser
@@ -151,14 +159,6 @@ export async function waitForConnectionResult(
151159
await browser.setValueVisible(Selectors.SidebarFilterInput, '');
152160
}
153161

154-
if (dismissEndOfLifeModal) {
155-
await browser.$(Selectors.EndOfLifeConnectionModal).waitForDisplayed();
156-
await browser.clickVisible(Selectors.EndOfLifeConnectionModalConfirmButton);
157-
await browser
158-
.$(Selectors.EndOfLifeConnectionModal)
159-
.waitForDisplayed({ reverse: true });
160-
}
161-
162162
if (connectionStatus === 'either') {
163163
// For the very rare cases where we don't care whether it fails or succeeds.
164164
// Usually because the exact result is a race condition.

0 commit comments

Comments
 (0)