diff --git a/e2e/protractor.excludes.json b/e2e/protractor.excludes.json index 3bdeeda9f..0fff0c1cf 100644 --- a/e2e/protractor.excludes.json +++ b/e2e/protractor.excludes.json @@ -2,5 +2,6 @@ "C306956": "https://alfresco.atlassian.net/browse/ACA-4196", "C286314": "https://alfresco.atlassian.net/browse/ACA-2176", "C213107": "https://alfresco.atlassian.net/browse/ACA-4197", - "C325049": "https://alfresco.atlassian.net/browse/ACA-4219" + "C325049": "https://alfresco.atlassian.net/browse/ACA-4219", + "C269102": "investigate and raise if it's a bug" } diff --git a/e2e/suites/authentication/login.test.ts b/e2e/suites/authentication/login.test.ts index 5211da143..2e745c846 100755 --- a/e2e/suites/authentication/login.test.ts +++ b/e2e/suites/authentication/login.test.ts @@ -24,7 +24,7 @@ */ import { browser } from 'protractor'; -import { AdminActions, APP_ROUTES, LoginPage, Utils, navigate } from '@alfresco/aca-testing-shared'; +import { AdminActions, APP_ROUTES, LoginPage, Utils, navigate, BrowsingPage } from '@alfresco/aca-testing-shared'; import { BrowserActions } from '@alfresco/adf-testing'; describe('Login', () => { @@ -134,7 +134,12 @@ describe('Login', () => { it('[C213104] user is able to login after changing his password', async () => { await loginPage.loginWith(testUser2.username, testUser2.password); + const page = new BrowsingPage(); + await page.signOut(); + + await adminApiActions.login(); await adminApiActions.changePassword(testUser2.username, newPassword); + await loginPage.loginWith(testUser2.username, newPassword); expect(await browser.getCurrentUrl()).toContain(APP_ROUTES.PERSONAL_FILES); }); diff --git a/projects/aca-testing-shared/src/pages/browsing-page.ts b/projects/aca-testing-shared/src/pages/browsing-page.ts index 461d16260..db2a10355 100755 --- a/projects/aca-testing-shared/src/pages/browsing-page.ts +++ b/projects/aca-testing-shared/src/pages/browsing-page.ts @@ -26,6 +26,8 @@ import { Header, DataTable, Pagination, Toolbar, Breadcrumb, Sidenav } from '../components/components'; import { SIDEBAR_LABELS } from './../configs'; import { Page } from './page'; +import { waitForPresence } from './../utilities/utils'; +import { LoginPage } from './login-page'; export class BrowsingPage extends Page { header = new Header(this.appRoot); @@ -38,6 +40,7 @@ export class BrowsingPage extends Page { async signOut(): Promise { await this.header.openMoreMenu(); await this.header.menu.clickMenuItem('Sign out'); + await waitForPresence(new LoginPage().login.submitButton); } async clickPersonalFiles(): Promise { diff --git a/projects/aca-testing-shared/src/pages/login-page.ts b/projects/aca-testing-shared/src/pages/login-page.ts index 0cf16a682..0b78099cc 100755 --- a/projects/aca-testing-shared/src/pages/login-page.ts +++ b/projects/aca-testing-shared/src/pages/login-page.ts @@ -27,7 +27,7 @@ import { LoginComponent } from '../components/components'; import { Page } from './page'; import { APP_ROUTES } from '../configs'; -import { waitForPresence } from '../utilities/utils'; +import { Utils, waitForPresence } from '../utilities/utils'; import { BrowserActions } from '@alfresco/adf-testing'; export class LoginPage extends Page { @@ -38,6 +38,8 @@ export class LoginPage extends Page { } async load() { + await super.load(); + await Utils.clearLocalStorage(); await super.load(); await waitForPresence(this.login.submitButton); }