Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harden app delete e2e test to reduce chance of concurrency failures #2942

Merged
merged 4 commits into from
Sep 11, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/test-e2e/application/application-delete-e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ describe('Application Delete', function () {
// We created the app after the wall loaded, so refresh to make sure app wall shows the new app
appWall.appList.refresh();

let appCount = 0;
appWall.appList.getTotalResults().then(count => appCount = count);
appWall.appList.header.setSearchText(testAppName);
expect(appWall.appList.getTotalResults()).toBe(1);

e2e.sleep(5000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know these aren't due to your PR - but why do we have two 5s delays ? We should avoid using sleep... we must be waiting for something, so we should wait for it.


Expand Down Expand Up @@ -122,8 +122,8 @@ describe('Application Delete', function () {
// We deleted the app, so don't try and do this on cleanup
app = null;

// Check that we have 1 less app
appWall.appList.getTotalResults().then(count => expect(count).toBe(appCount - 1));
appWall.appList.header.setSearchText(testAppName);
expect(appWall.appList.getTotalResults()).toBe(0);
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/test-e2e/login/login-e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('Login', () => {

it('- should reach log in page', () => {
expect(loginPage.isLoginPage()).toBeTruthy();
expect<any>(loginPage.getTitle()).toEqual('STRATOS');
expect<any>(loginPage.getTitle()).toEqual('');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this altogether - it won't work on forks, if they unhide the title.

expect(loginPage.loginButton().isPresent()).toBeTruthy();
});

Expand Down