use randomly generated names for users, nodes

This commit is contained in:
Adina Parpalita
2017-11-10 15:42:10 +02:00
parent dab38d5a47
commit cef78c3713
8 changed files with 70 additions and 104 deletions

View File

@@ -29,20 +29,17 @@ describe('Logout', () => {
const peopleApi = new RepoClient().people;
const johnDoe = {
username: 'john.doe',
password: 'john.doe'
};
const johnDoe = `user-${Utils.random()}`;
beforeAll((done) => {
peopleApi
.createUser(johnDoe.username, johnDoe.password)
.createUser(johnDoe)
.then(done);
});
beforeEach((done) => {
loginPage.load()
.then(() => loginPage.loginWith(johnDoe.username, johnDoe.password))
.then(() => loginPage.loginWith(johnDoe))
.then(done);
});
@@ -59,13 +56,6 @@ describe('Logout', () => {
});
});
xit('redirects to Login page when logging out by URL', () => {
browser.get(APP_ROUTES.LOGOUT)
.then(() => {
expect(browser.getCurrentUrl()).toContain(APP_ROUTES.LOGIN);
});
});
it('redirects to Login page when pressing browser Back after logout', () => {
page.signOut()
.then(() => browser.driver.navigate().back())