diff --git a/packages/compass-e2e-tests/tests/shell.test.ts b/packages/compass-e2e-tests/tests/shell.test.ts index 85ca1183919..5561017d485 100644 --- a/packages/compass-e2e-tests/tests/shell.test.ts +++ b/packages/compass-e2e-tests/tests/shell.test.ts @@ -11,7 +11,6 @@ import { } from '../helpers/compass'; import type { Compass } from '../helpers/compass'; import * as Selectors from '../helpers/selectors'; -import { expect } from 'chai'; describe('Shell', function () { let compass: Compass; @@ -67,9 +66,8 @@ describe('Shell', function () { it('shows and hides shell based on settings', async function () { await browser.connectWithConnectionString(); - let shellSection = await browser.$(Selectors.ShellSection); - let isShellSectionExisting = await shellSection.isExisting(); - expect(isShellSectionExisting).to.be.equal(true); + // Will fail if shell is not on the screen eventually + await browser.$(Selectors.ShellSection).waitForExist(); await browser.openSettingsModal(); const settingsModal = await browser.$(Selectors.SettingsModal); @@ -82,8 +80,7 @@ describe('Shell', function () { // wait for the modal to go away await settingsModal.waitForDisplayed({ reverse: true }); - shellSection = await browser.$(Selectors.ShellSection); - isShellSectionExisting = await shellSection.isExisting(); - expect(isShellSectionExisting).to.be.equal(false); + // Will fail if shell eventually doesn't go away from the screen + await browser.$(Selectors.ShellSection).waitForExist({ reverse: true }); }); });