[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:
Akash Rathod
2023-08-18 15:09:04 +02:00
committed by GitHub
parent ff8a9844d8
commit 9f1b8a0ac6
16 changed files with 595 additions and 14 deletions

View File

@@ -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();
}
}

View File

@@ -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();