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

Fix test without oplog by waiting a successful login on changing users #9146

Merged
merged 1 commit into from
Dec 15, 2017
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jquery@1.11.10
kadira:blaze-layout@2.3.0
kadira:flow-router@2.12.1
keepnox:perfect-scrollbar@0.6.8
kenton:accounts-sandstorm@0.7.0
Copy link
Member Author

Choose a reason for hiding this comment

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

missing from #9062

konecty:change-case@2.3.0
konecty:delayed-task@1.0.0
konecty:mongo-counter@0.0.5_3
Expand Down
2 changes: 1 addition & 1 deletion tests/chimp-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
// chai: false,
screenshotsOnError: true,
screenshotsPath: '.screenshots',
captureAllStepScreenshots: true,
captureAllStepScreenshots: false,
Copy link
Member Author

Choose a reason for hiding this comment

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

we don't need ALL screenshots

saveScreenshotsToDisk: true,
// // Note: With a large viewport size and captureAllStepScreenshots enabled,
// // you may run out of memory. Use browser.setViewportSize to make the
Expand Down
4 changes: 2 additions & 2 deletions tests/data/checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function checkIfUserIsValid(username, email, password) {
sideNav.logout.click();

loginPage.open();
loginPage.login({email, password});
loginPage.loginSucceded({email, password});
mainContent.mainContent.waitForExist(5000);
} else {
console.log(' User already logged');
Expand Down Expand Up @@ -77,7 +77,7 @@ export function checkIfUserIsAdmin(username, email, password) {
sideNav.logout.click();

loginPage.open();
loginPage.login({email, password});
loginPage.loginSucceded({email, password});
} else {
console.log(' User already logged');
}
Expand Down
7 changes: 7 additions & 0 deletions tests/pageobjects/login.page.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Page from './Page';
import mainContent from './main-content.page';

class LoginPage extends Page {
get registerButton() { return browser.element('button.register'); }
Expand Down Expand Up @@ -66,6 +67,12 @@ class LoginPage extends Page {
this.submit();
}

loginSucceded({email, password}) {
this.login({email, password});

mainContent.mainContent.waitForVisible(5000);
}

submit() {
this.submitButton.waitForVisible(5000);
this.submitButton.click();
Expand Down