Skip to content

Commit

Permalink
fix flaky test
Browse files Browse the repository at this point in the history
This test asserts that the settingsMenuLink is not  present, and the appropriate test should be `isPresent()` not `isDisplayed()`
  • Loading branch information
megahirt committed Mar 10, 2022
1 parent 8bfaf45 commit fb2885d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/app/bellows/project-settings.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Bellows E2E Project Settings app', () => {
await loginPage.loginAsMember();
await projectsPage.get();
await projectsPage.clickOnProject(constants.testProjectName);
expect<boolean>(await settingsPage.settingsMenuLink.isDisplayed()).toBe(false);
expect<boolean>(await settingsPage.settingsMenuLink.isPresent()).toBe(false);
});

it('System Admin can manage project', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Lexicon E2E Configuration Fields', () => {
});

it('can go to Configuration and select unified Fields tab', async () => {
expect<any>(await configPage.settingsMenuLink.isDisplayed()).toBe(true);
expect<any>(await configPage.settingsMenuLink.isPresent()).toBe(true);
await configPage.get();
expect<any>(await configPage.applyButton.isDisplayed()).toBe(true);
expect<any>(await configPage.applyButton.isEnabled()).toBe(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ describe('Lexicon E2E Configuration Input Systems', () => {
await loginPage.loginAsUser();
await projectsPage.get();
await projectsPage.clickOnProject(constants.testProjectName);
expect<boolean>(await configPage.settingsMenuLink.isDisplayed()).toBe(false);
expect<boolean>(await configPage.settingsMenuLink.isPresent()).toBe(false);
});

it('setup: login as manager, select test project, goto configuration', async () => {
await loginPage.loginAsManager();
await projectsPage.get();
await projectsPage.clickOnProject(constants.testProjectName);
expect<any>(await configPage.settingsMenuLink.isDisplayed()).toBe(true);
expect<any>(await configPage.settingsMenuLink.isPresent()).toBe(true);
await configPage.get();
expect<any>(await configPage.applyButton.isDisplayed()).toBe(true);
expect<any>(await configPage.applyButton.isEnabled()).toBe(false);
Expand Down

0 comments on commit fb2885d

Please sign in to comment.