mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-08-07 17:48:27 +00:00
[ACS-5650] viewer user actions test (#3373)
* viewer action files e2e migration * viewer action files e2e remove comment * review code fix * [ci:force] * [ACS-5650]viewer test with new user * remove commented code
This commit is contained in:
@@ -38,6 +38,8 @@ export class LoginPage extends BasePage {
|
||||
private username = this.page.locator('#username');
|
||||
private password = this.page.locator('#password');
|
||||
private submitButton = this.page.locator('#login-button');
|
||||
private userProfileButton = this.page.locator('aca-user-menu button');
|
||||
private userLogOutButton = this.page.locator('aca-logout button');
|
||||
|
||||
async loginUser(userData: { username: string; password: string } | UserModel, options?: LoginOptions): Promise<void> {
|
||||
if (options?.withNavigation) {
|
||||
@@ -51,4 +53,9 @@ export class LoginPage extends BasePage {
|
||||
await Promise.all([this.page.waitForLoadState('domcontentloaded'), this.spinner.waitForReload()]);
|
||||
}
|
||||
}
|
||||
|
||||
async logoutUser(): Promise<void> {
|
||||
await this.userProfileButton.click();
|
||||
await this.userLogOutButton.click();
|
||||
}
|
||||
}
|
||||
|
@@ -25,7 +25,15 @@
|
||||
import { Page } from '@playwright/test';
|
||||
import { BasePage } from './base.page';
|
||||
import { AcaHeader } from '../components/aca-header.component';
|
||||
import { AdfInfoDrawerComponent, AdfLibraryDialogComponent, DataTableComponent, MatMenuComponent } from '../components';
|
||||
import {
|
||||
AdfInfoDrawerComponent,
|
||||
AdfLibraryDialogComponent,
|
||||
DataTableComponent,
|
||||
MatMenuComponent,
|
||||
ViewerComponent,
|
||||
ViewerOverlayDialogComponent,
|
||||
ContentNodeSelectorDialog
|
||||
} from '../components';
|
||||
|
||||
export class MyLibrariesPage extends BasePage {
|
||||
private static pageUrl = 'libraries';
|
||||
@@ -38,6 +46,9 @@ export class MyLibrariesPage extends BasePage {
|
||||
public libraryDialog = new AdfLibraryDialogComponent(this.page);
|
||||
public dataTable = new DataTableComponent(this.page);
|
||||
public libraryDetails = new AdfInfoDrawerComponent(this.page);
|
||||
public viewer = new ViewerComponent(this.page);
|
||||
public viewerDialog = new ViewerOverlayDialogComponent(this.page);
|
||||
public copyMoveDialog = new ContentNodeSelectorDialog(this.page);
|
||||
|
||||
async selectCreateLibrary(): Promise<void> {
|
||||
await this.acaHeader.createButton.click();
|
||||
|
Reference in New Issue
Block a user