mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-4242] Update e2e login method to account for the changes done for ACA-4197 (#1910)
* build dev instead of e2e * clear localStorage before new login * re-enable all tests * try again build.e2e * enable one test * exclude again * no message * no message
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
@@ -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);
|
||||
});
|
||||
|
@@ -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<void> {
|
||||
await this.header.openMoreMenu();
|
||||
await this.header.menu.clickMenuItem('Sign out');
|
||||
await waitForPresence(new LoginPage().login.submitButton);
|
||||
}
|
||||
|
||||
async clickPersonalFiles(): Promise<void> {
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user