Skip to content

Commit

Permalink
chore(e2e): update the test to reduce the flake (#5987)
Browse files Browse the repository at this point in the history
* chore(e2e): update the test to reduce the flake

* chore(e2e): remove unused import

* chore(e2e): fix typo
  • Loading branch information
gribnoysup authored Jul 1, 2024
1 parent 0472a06 commit b0acc2d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/compass-e2e-tests/tests/shell.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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 });
});
});

0 comments on commit b0acc2d

Please sign in to comment.