fix indentation, remove fdescribe, added forgotten afterAll

This commit is contained in:
Adina Parpalita
2017-11-14 12:36:27 +02:00
parent 1b879a2205
commit 301771fa16
2 changed files with 10 additions and 8 deletions

View File

@@ -47,12 +47,10 @@ export class LoginPage extends Page {
}); });
} }
loginWith(username: string, password?: string): promise.Promise<void> { loginWith(username: string, password?: string): promise.Promise<any> {
const pass = password || username; const pass = password || username;
return this.login.enterCredentials(username, pass).submit() return this.login.enterCredentials(username, pass).submit()
.then(() => { .then(() => super.waitForApp());
super.waitForApp();
});
} }
loginWithAdmin(): promise.Promise<any> { loginWithAdmin(): promise.Promise<any> {

View File

@@ -22,7 +22,7 @@ import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages';
import { Utils } from '../../utilities/utils'; import { Utils } from '../../utilities/utils';
import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-client'; import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-client';
fdescribe('Empty list views', () => { describe('Empty list views', () => {
const username = `user-${Utils.random()}`; const username = `user-${Utils.random()}`;
const password = username; const password = username;
@@ -38,9 +38,13 @@ fdescribe('Empty list views', () => {
beforeAll(done => { beforeAll(done => {
apis.admin.people.createUser(username) apis.admin.people.createUser(username)
.then(() => loginPage.load() .then(() => loginPage.load())
.then(() => loginPage.loginWith(username)) .then(() => loginPage.loginWith(username))
.then(done)); .then(done);
});
afterAll(done => {
logoutPage.load().then(done);
}); });
it('empty Personal Files', () => { it('empty Personal Files', () => {