From 40813f9a58b033be207717f15d348af3ac07496b Mon Sep 17 00:00:00 2001 From: datguycheb Date: Fri, 26 Jan 2024 11:00:39 +0100 Subject: [PATCH 1/8] [ACS-5882] infoDrawer comments tests migrated to Playwright --- e2e/playwright/info-drawer/.eslintrc.json | 26 +++ e2e/playwright/info-drawer/exclude.tests.json | 1 + .../info-drawer/playwright.config.ts | 44 +++++ e2e/playwright/info-drawer/project.json | 22 +++ .../info-drawer/src/tests/comments.spec.ts | 153 ++++++++++++++++++ .../info-drawer/tsconfig.e2e.adf.json | 15 ++ e2e/playwright/info-drawer/tsconfig.e2e.json | 15 ++ .../src/api/api-client-factory.ts | 5 +- .../components/adf-info-drawer.component.ts | 30 +++- .../src/page-objects/pages/favorites.page.ts | 9 +- .../page-objects/pages/personal-files.page.ts | 8 +- .../page-objects/pages/recent-files.page.ts | 10 +- .../src/page-objects/pages/shared.page.ts | 4 +- 13 files changed, 336 insertions(+), 6 deletions(-) create mode 100644 e2e/playwright/info-drawer/.eslintrc.json create mode 100644 e2e/playwright/info-drawer/exclude.tests.json create mode 100644 e2e/playwright/info-drawer/playwright.config.ts create mode 100644 e2e/playwright/info-drawer/project.json create mode 100755 e2e/playwright/info-drawer/src/tests/comments.spec.ts create mode 100644 e2e/playwright/info-drawer/tsconfig.e2e.adf.json create mode 100755 e2e/playwright/info-drawer/tsconfig.e2e.json diff --git a/e2e/playwright/info-drawer/.eslintrc.json b/e2e/playwright/info-drawer/.eslintrc.json new file mode 100644 index 0000000000..9e1357d874 --- /dev/null +++ b/e2e/playwright/info-drawer/.eslintrc.json @@ -0,0 +1,26 @@ +{ + "extends": "../../../.eslintrc.json", + "ignorePatterns": [ + "!**/*" + ], + "overrides": [ + { + "files": [ + "*.ts" + ], + "parserOptions": { + "project": [ + "e2e/playwright/list-views/tsconfig.e2e.json" + ], + "createDefaultProgram": true + }, + "plugins": [ + "rxjs", + "unicorn" + ], + "rules": { + "@typescript-eslint/no-floating-promises": "off" + } + } + ] +} diff --git a/e2e/playwright/info-drawer/exclude.tests.json b/e2e/playwright/info-drawer/exclude.tests.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/e2e/playwright/info-drawer/exclude.tests.json @@ -0,0 +1 @@ +{} diff --git a/e2e/playwright/info-drawer/playwright.config.ts b/e2e/playwright/info-drawer/playwright.config.ts new file mode 100644 index 0000000000..8b7f9faa6e --- /dev/null +++ b/e2e/playwright/info-drawer/playwright.config.ts @@ -0,0 +1,44 @@ +/*! + * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Alfresco Example Content Application + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * from Hyland Software. If not, see . + */ + +import { PlaywrightTestConfig } from '@playwright/test'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/playwright-shared'; +import EXCLUDED_JSON from './exclude.tests.json'; + +const config: PlaywrightTestConfig = { + ...getGlobalConfig, + + grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'List Views'), + projects: [ + { + name: 'List Views', + testDir: './src/tests', + use: { + users: ['hruser', 'admin'] + } + } + ] +}; + +export default config; diff --git a/e2e/playwright/info-drawer/project.json b/e2e/playwright/info-drawer/project.json new file mode 100644 index 0000000000..39fbbd7b07 --- /dev/null +++ b/e2e/playwright/info-drawer/project.json @@ -0,0 +1,22 @@ +{ + "name": "info-drawer-e2e", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "e2e/playwright/info-drawer", + "projectType": "application", + "targets": { + "e2e": { + "executor": "nx:run-commands", + "options": { + "commands": ["npx playwright test --config=e2e/playwright/info-drawer/playwright.config.ts"] + }, + "configurations": { + "production": { + "devServerTarget": "content-ce:serve:production" + } + } + }, + "lint": { + "executor": "@angular-eslint/builder:lint" + } + } +} diff --git a/e2e/playwright/info-drawer/src/tests/comments.spec.ts b/e2e/playwright/info-drawer/src/tests/comments.spec.ts new file mode 100755 index 0000000000..d8729023d7 --- /dev/null +++ b/e2e/playwright/info-drawer/src/tests/comments.spec.ts @@ -0,0 +1,153 @@ +/*! + * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Alfresco Example Content Application + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * from Hyland Software. If not, see . + */ + +import { expect } from '@playwright/test'; +import { ApiClientFactory, Utils, test, TrashcanApi, FavoritesPageApi, NodesApi, FileActionsApi } from '@alfresco/playwright-shared'; + +test.describe('Personal Files', () => { + const apiClientFactory = new ApiClientFactory(); + let nodesApi: NodesApi; + let trashcanApi: TrashcanApi; + let fileActionsApi: FileActionsApi; + let favoritesActions: FavoritesPageApi; + const username = `user-e2e-${Utils.random()}`; + const commentText = `comment-e2e-${Utils.random()}`; + const persFolderName = `persFolder-e2e-${Utils.random()}`; + const favFolderName = `favFolder-e2e-${Utils.random()}`; + const sharedFileName = `sharedFile-e2e-${Utils.random()}`; + + test.beforeAll(async () => { + try { + await apiClientFactory.setUpAcaBackend('admin'); + await apiClientFactory.createUser({ username }); + nodesApi = await NodesApi.initialize(username, username); + trashcanApi = await TrashcanApi.initialize(username, username); + favoritesActions = await FavoritesPageApi.initialize(username, username); + fileActionsApi = await FileActionsApi.initialize(username, username); + } catch (error) { + console.error(`beforeAll failed : ${error}`); + } + }); + + test.beforeEach(async ({ loginPage }) => { + try { + await loginPage.loginUser({ username: username, password: username }, { withNavigation: true, waitForLoading: true }); + } catch (error) { + console.error(`Main beforeEach failed: ${error}`); + } + }); + + test.afterAll(async () => { + try { + await nodesApi.deleteCurrentUserNodes(); + await trashcanApi.emptyTrashcan(); + } catch {} + }); + + test('[C299173] from Personal Files - Comments tab default fields', async ({ personalFiles }) => { + await nodesApi.createFolder(persFolderName); + await fileActionsApi.waitForNodes(persFolderName, { expect: 1 }); + await personalFiles.navigate(); + await expect(personalFiles.dataTable.getRowByName(persFolderName)).toBeVisible(); + await personalFiles.dataTable.getRowByName(persFolderName).click(); + await personalFiles.acaHeader.viewDetails.click(); + await personalFiles.infoDrawer.commentsTab.click(); + await expect(personalFiles.infoDrawer.commentInputField).toBeVisible(); + expect(await personalFiles.infoDrawer.checkCommentsHeaderCount()).toEqual(0); + expect(await personalFiles.infoDrawer.addCommentButton).toBeDisabled(); + }); + + test('[C299209] from Favorites - Add a comment on a folder', async ({ favoritePage }) => { + const folderFavId: string = (await nodesApi.createFolder(favFolderName)).entry.id; + await favoritesActions.addFavoritesByIds('folder', [folderFavId]); + await fileActionsApi.waitForNodes(favFolderName, { expect: 1 }); + await favoritePage.navigate(); + await expect(favoritePage.dataTable.getRowByName(favFolderName)).toBeVisible(); + await favoritePage.dataTable.getRowByName(favFolderName).click(); + await favoritePage.acaHeader.viewDetails.click(); + await favoritePage.infoDrawer.commentsTab.click(); + await expect(favoritePage.infoDrawer.commentInputField).toBeVisible(); + await favoritePage.addCommentToNode(commentText); + await expect(favoritePage.infoDrawer.addCommentButton).toBeDisabled(); + expect(await favoritePage.infoDrawer.checkCommentsHeaderCount()).toEqual(1); + expect(await favoritePage.infoDrawer.verifyCommentsCountFromList(1)); + }); + + test('[C299189] from Shared Files - Comments are displayed ordered by created date in descending order', async ({ sharedPage }) => { + const e2eCommentFirst = `e2e-comment-${Utils.random()}`; + const e2eCommentSecond = `e2e-comment-${Utils.random()}`; + const sharedFileId: string = (await nodesApi.createFile(sharedFileName)).entry.id; + await fileActionsApi.waitForNodes(sharedFileName, { expect: 1 }); + await apiClientFactory.commentsApi.createComment(sharedFileId, { content: e2eCommentFirst }); + await apiClientFactory.commentsApi.createComment(sharedFileId, { content: e2eCommentSecond }); + await apiClientFactory.share.createSharedLink({ nodeId: sharedFileId }); + await fileActionsApi.waitForNodes(sharedFileName, { expect: 1 }); + await sharedPage.navigate(); + await expect(sharedPage.dataTable.getRowByName(sharedFileName)).toBeVisible(); + await sharedPage.dataTable.getRowByName(sharedFileName).click(); + await sharedPage.acaHeader.viewDetails.click(); + await sharedPage.infoDrawer.commentsTab.click(); + await sharedPage.infoDrawer.waitForComments(); + expect(await sharedPage.infoDrawer.checkCommentsHeaderCount()).toEqual(2); + expect(await sharedPage.infoDrawer.commentTextContent.nth(0).textContent()).toEqual(e2eCommentSecond); + expect(await sharedPage.infoDrawer.commentTextContent.nth(1).textContent()).toEqual(e2eCommentFirst); + }); + + test('[C299195] from Recent Files - Add a comment on a file', async ({ recentFilesPage }) => { + const recentFile = `e2e-recentfile-${Utils.random()}`; + await nodesApi.createFile(recentFile); + await fileActionsApi.waitForNodes(recentFile, { expect: 1 }); + await recentFilesPage.navigate(); + await expect(recentFilesPage.dataTable.getRowByName(recentFile)).toBeVisible(); + await recentFilesPage.dataTable.getRowByName(recentFile).click(); + await recentFilesPage.acaHeader.viewDetails.click(); + await recentFilesPage.infoDrawer.commentsTab.click(); + await expect(recentFilesPage.infoDrawer.commentInputField).toBeVisible(); + await recentFilesPage.addCommentToNode(commentText); + await expect(recentFilesPage.infoDrawer.addCommentButton).toBeDisabled(); + expect(await recentFilesPage.infoDrawer.checkCommentsHeaderCount()).toEqual(1); + expect(await recentFilesPage.infoDrawer.verifyCommentsCountFromList(1)); + }); + + test('[C299196] Comment info display - File from Favorites', async ({ favoritePage }) => { + const e2eCommentFirst = `e2e-comment-${Utils.random()}`; + const commentInfoFileName = `e2e-commentFile-${Utils.random()}`; + const commentInfoFileId: string = (await nodesApi.createFile(commentInfoFileName)).entry.id; + await favoritesActions.addFavoritesByIds('file', [commentInfoFileId]); + await fileActionsApi.waitForNodes(commentInfoFileName, { expect: 1 }); + await apiClientFactory.commentsApi.createComment(commentInfoFileId, { content: e2eCommentFirst }); + await apiClientFactory.share.createSharedLink({ nodeId: commentInfoFileId }); + await fileActionsApi.waitForNodes(commentInfoFileName, { expect: 1 }); + await favoritePage.navigate(); + await expect(favoritePage.dataTable.getRowByName(commentInfoFileName)).toBeVisible(); + await favoritePage.dataTable.getRowByName(commentInfoFileName).click(); + await favoritePage.acaHeader.viewDetails.click(); + await favoritePage.infoDrawer.commentsTab.click(); + await favoritePage.infoDrawer.waitForComments(); + expect(await favoritePage.infoDrawer.checkCommentsHeaderCount()).toEqual(1); + expect(await favoritePage.infoDrawer.commentTextContent.nth(0).textContent()).toEqual(e2eCommentFirst); + expect(await favoritePage.infoDrawer.commentTimestamp.nth(0).textContent()).toEqual('less than a minute ago'); + expect(await favoritePage.infoDrawer.commentUsername.nth(0).textContent()).toEqual('Administrator'); + }); +}); diff --git a/e2e/playwright/info-drawer/tsconfig.e2e.adf.json b/e2e/playwright/info-drawer/tsconfig.e2e.adf.json new file mode 100644 index 0000000000..87cbcf775a --- /dev/null +++ b/e2e/playwright/info-drawer/tsconfig.e2e.adf.json @@ -0,0 +1,15 @@ +{ + "extends": "../../../tsconfig.adf.json", + "compilerOptions": { + "outDir": "../../out-tsc/e2e", + "baseUrl": "./", + "module": "commonjs", + "target": "es2017", + "types": ["jasmine", "jasminewd2", "node"], + "skipLibCheck": true, + "paths": { + "@alfresco/playwright-shared": ["../../../projects/aca-playwright-shared/src/index.ts"] + } + }, + "exclude": ["node_modules"] +} diff --git a/e2e/playwright/info-drawer/tsconfig.e2e.json b/e2e/playwright/info-drawer/tsconfig.e2e.json new file mode 100755 index 0000000000..c317985239 --- /dev/null +++ b/e2e/playwright/info-drawer/tsconfig.e2e.json @@ -0,0 +1,15 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/e2e", + "baseUrl": "./", + "module": "commonjs", + "target": "es2017", + "types": ["jasmine", "jasminewd2", "node", "@playwright/test"], + "skipLibCheck": true, + "paths": { + "@alfresco/playwright-shared": ["../../../projects/aca-playwright-shared/src/index.ts"] + } + }, + "exclude": ["node_modules"] +} diff --git a/projects/aca-playwright-shared/src/api/api-client-factory.ts b/projects/aca-playwright-shared/src/api/api-client-factory.ts index 7adaa41133..1eec3b96fe 100644 --- a/projects/aca-playwright-shared/src/api/api-client-factory.ts +++ b/projects/aca-playwright-shared/src/api/api-client-factory.ts @@ -39,7 +39,8 @@ import { SharedlinksApi, FavoritesApi, TrashcanApi, - PersonEntry + PersonEntry, + CommentsApi } from '@alfresco/js-api'; import { ActionTypes, Rule } from './rules-api'; import { users } from '../base-config'; @@ -83,6 +84,7 @@ export class ApiClientFactory { public share: SharedlinksApi; public favorites: FavoritesApi; public trashCan: TrashcanApi; + public commentsApi: CommentsApi; constructor() { this.alfrescoApi = new AlfrescoApi(config); @@ -105,6 +107,7 @@ export class ApiClientFactory { this.share = new SharedlinksApi(this.alfrescoApi); this.favorites = new FavoritesApi(this.alfrescoApi); this.trashCan = new TrashcanApi(this.alfrescoApi); + this.commentsApi = new CommentsApi(this.alfrescoApi); return this; } diff --git a/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts b/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts index b6fe6d5bcb..25820cf6f2 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts @@ -23,7 +23,7 @@ */ import { BaseComponent } from './base.component'; -import { Page } from '@playwright/test'; +import { Page, expect } from '@playwright/test'; export class AdfInfoDrawerComponent extends BaseComponent { private static rootElement = 'adf-info-drawer'; @@ -36,4 +36,32 @@ export class AdfInfoDrawerComponent extends BaseComponent { public getIdField = (labelText: string) => this.getChild('[data-automation-id="library-id-properties-wrapper"]', { hasText: labelText }); public getVisibilityField = (labelText: string) => this.getChild('[data-automation-id="library-visibility-properties-wrapper"]', { hasText: labelText }); public getDescriptionField = this.getChild('[data-automation-id="library-description-properties-wrapper"] textarea'); + public propertiesTab = this.getChild('.mat-tab-label-content').nth(0); + public commentsTab = this.getChild('.mat-tab-label-content').nth(1); + public commentInputField = this.getChild('mat-form-field'); + public commentsHeader = this.getChild('#comment-header'); + public addCommentButton = this.getChild('[data-automation-id="comments-input-add"]'); + public commentsList = this.getChild('.adf-comment-list-item'); + public commentUsername = this.getChild('.mat-line.adf-comment-user-name'); + public commentTextContent = this.getChild('.mat-line.adf-comment-message'); + public commentTimestamp = this.getChild('.mat-line.adf-comment-message-time'); + public commentProfileIcon = this.getChild('.adf-comment-user-icon.ng-star-inserted'); + + + async checkCommentsHeaderCount() { + let commentsCountTextContent: string = await this.commentsHeader.textContent(); + let commentsCountSplit: string = commentsCountTextContent.split("Comments (")[1]; + let commentsCountString: string = commentsCountSplit.split(")")[0]; + let commentsCount: number = parseInt(commentsCountString); + return commentsCount; + } + + async verifyCommentsCountFromList(expectedNumber: number) { + let commentsCountFromList = await this.commentsList.count(); + expect(commentsCountFromList).toEqual(expectedNumber); + } + + async waitForComments() { + await this.commentsList.first().waitFor(); + } } diff --git a/projects/aca-playwright-shared/src/page-objects/pages/favorites.page.ts b/projects/aca-playwright-shared/src/page-objects/pages/favorites.page.ts index 6a7c47c07e..4f561f5b3e 100644 --- a/projects/aca-playwright-shared/src/page-objects/pages/favorites.page.ts +++ b/projects/aca-playwright-shared/src/page-objects/pages/favorites.page.ts @@ -24,7 +24,7 @@ import { Page } from '@playwright/test'; import { BasePage } from './base.page'; -import { DataTableComponent, MatMenuComponent, ViewerComponent, SidenavComponent, PaginationComponent, Breadcrumb } from '../components'; +import { DataTableComponent, MatMenuComponent, ViewerComponent, SidenavComponent, PaginationComponent, Breadcrumb, AdfInfoDrawerComponent } from '../components'; import { AcaHeader } from '../components/aca-header.component'; import { AdfFolderDialogComponent, ViewerOverlayDialogComponent } from '../components/dialogs'; @@ -44,8 +44,15 @@ export class FavoritesPage extends BasePage { public sidenav = new SidenavComponent(this.page); public pagination = new PaginationComponent(this.page); public breadcrumb = new Breadcrumb(this.page); + public infoDrawer = new AdfInfoDrawerComponent(this.page); async waitForPageLoad() { await this.page.waitForURL(`**/${FavoritesPage.pageUrl}`); } + + async addCommentToNode(commentText: any) { + await this.infoDrawer.commentInputField.click(); + await this.page.keyboard.type(commentText); + await this.infoDrawer.addCommentButton.click(); + } } diff --git a/projects/aca-playwright-shared/src/page-objects/pages/personal-files.page.ts b/projects/aca-playwright-shared/src/page-objects/pages/personal-files.page.ts index 3c119c73f6..bfa28c743e 100644 --- a/projects/aca-playwright-shared/src/page-objects/pages/personal-files.page.ts +++ b/projects/aca-playwright-shared/src/page-objects/pages/personal-files.page.ts @@ -39,7 +39,8 @@ import { PaginationComponent, ErrorComponent, ShareDialogComponent, - AdfConfirmDialogComponent + AdfConfirmDialogComponent, + AdfInfoDrawerComponent } from '../components'; export class PersonalFilesPage extends BasePage { @@ -64,6 +65,7 @@ export class PersonalFilesPage extends BasePage { public errorDialog = new ErrorComponent(this.page); public shareDialog= new ShareDialogComponent(this.page); public confirmDialog = new AdfConfirmDialogComponent(this.page); + public infoDrawer = new AdfInfoDrawerComponent(this.page); async selectCreateFolder(): Promise { await this.acaHeader.createButton.click(); @@ -93,4 +95,8 @@ export class PersonalFilesPage extends BasePage { await this.contentNodeSelector.selectDestination(destinationName); await this.contentNodeSelector.actionButton.click(); } + + async clickInfoDrawerButton(): Promise { + await this.acaHeader.viewDetails.click(); + } } diff --git a/projects/aca-playwright-shared/src/page-objects/pages/recent-files.page.ts b/projects/aca-playwright-shared/src/page-objects/pages/recent-files.page.ts index 98d0ddb3fc..ffe4aa3066 100644 --- a/projects/aca-playwright-shared/src/page-objects/pages/recent-files.page.ts +++ b/projects/aca-playwright-shared/src/page-objects/pages/recent-files.page.ts @@ -24,7 +24,7 @@ import { Page } from '@playwright/test'; import { BasePage } from './base.page'; -import { DataTableComponent, MatMenuComponent, ViewerComponent, SidenavComponent, Breadcrumb } from '../components'; +import { DataTableComponent, MatMenuComponent, ViewerComponent, SidenavComponent, Breadcrumb, AdfInfoDrawerComponent } from '../components'; import { AcaHeader } from '../components/aca-header.component'; import { AdfFolderDialogComponent } from '../components/dialogs'; @@ -42,4 +42,12 @@ export class RecentFilesPage extends BasePage { public viewer = new ViewerComponent(this.page); public sidenav = new SidenavComponent(this.page); public breadcrumb = new Breadcrumb(this.page); + public infoDrawer = new AdfInfoDrawerComponent(this.page); + + + async addCommentToNode(commentText: any) { + await this.infoDrawer.commentInputField.click(); + await this.page.keyboard.type(commentText); + await this.infoDrawer.addCommentButton.click(); + } } diff --git a/projects/aca-playwright-shared/src/page-objects/pages/shared.page.ts b/projects/aca-playwright-shared/src/page-objects/pages/shared.page.ts index 84ecb34ee0..27db27c583 100644 --- a/projects/aca-playwright-shared/src/page-objects/pages/shared.page.ts +++ b/projects/aca-playwright-shared/src/page-objects/pages/shared.page.ts @@ -24,7 +24,7 @@ import { Page } from '@playwright/test'; import { BasePage } from './base.page'; -import { DataTableComponent, MatMenuComponent, ViewerComponent, SidenavComponent, Breadcrumb } from '../components'; +import { DataTableComponent, MatMenuComponent, ViewerComponent, SidenavComponent, Breadcrumb, AdfInfoDrawerComponent } from '../components'; import { AcaHeader } from '../components/aca-header.component'; import { AdfFolderDialogComponent, ViewerOverlayDialogComponent } from '../components/dialogs'; @@ -43,4 +43,6 @@ export class SharedPage extends BasePage { public viewerDialog = new ViewerOverlayDialogComponent(this.page); public sidenav = new SidenavComponent(this.page); public breadcrumb = new Breadcrumb(this.page); + public infoDrawer = new AdfInfoDrawerComponent(this.page); + } From 8c10d7083305fd097dd514d78757d97c49d2b132 Mon Sep 17 00:00:00 2001 From: datguycheb Date: Fri, 26 Jan 2024 12:11:04 +0100 Subject: [PATCH 2/8] [ACS-5882] Update string names --- e2e/playwright/info-drawer/playwright.config.ts | 4 ++-- e2e/playwright/info-drawer/src/tests/comments.spec.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/playwright/info-drawer/playwright.config.ts b/e2e/playwright/info-drawer/playwright.config.ts index 8b7f9faa6e..2f5d2d83ff 100644 --- a/e2e/playwright/info-drawer/playwright.config.ts +++ b/e2e/playwright/info-drawer/playwright.config.ts @@ -29,10 +29,10 @@ import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, - grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'List Views'), + grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Info Drawer'), projects: [ { - name: 'List Views', + name: 'Info Drawer', testDir: './src/tests', use: { users: ['hruser', 'admin'] diff --git a/e2e/playwright/info-drawer/src/tests/comments.spec.ts b/e2e/playwright/info-drawer/src/tests/comments.spec.ts index d8729023d7..5abe16f3ad 100755 --- a/e2e/playwright/info-drawer/src/tests/comments.spec.ts +++ b/e2e/playwright/info-drawer/src/tests/comments.spec.ts @@ -25,7 +25,7 @@ import { expect } from '@playwright/test'; import { ApiClientFactory, Utils, test, TrashcanApi, FavoritesPageApi, NodesApi, FileActionsApi } from '@alfresco/playwright-shared'; -test.describe('Personal Files', () => { +test.describe('Info Drawer - Comments', () => { const apiClientFactory = new ApiClientFactory(); let nodesApi: NodesApi; let trashcanApi: TrashcanApi; From 1ae110a701226fa67ca8353587a1fe08ab8b1cb3 Mon Sep 17 00:00:00 2001 From: datguycheb Date: Fri, 26 Jan 2024 12:11:04 +0100 Subject: [PATCH 3/8] [ACS-5882] fixed issues from pull request comments --- .../info-drawer/src/tests/comments.spec.ts | 4 +-- .../components/adf-info-drawer.component.ts | 28 +++++++++++-------- .../src/page-objects/pages/favorites.page.ts | 6 ---- .../page-objects/pages/recent-files.page.ts | 7 ----- 4 files changed, 18 insertions(+), 27 deletions(-) diff --git a/e2e/playwright/info-drawer/src/tests/comments.spec.ts b/e2e/playwright/info-drawer/src/tests/comments.spec.ts index 5abe16f3ad..7ecd57d3fa 100755 --- a/e2e/playwright/info-drawer/src/tests/comments.spec.ts +++ b/e2e/playwright/info-drawer/src/tests/comments.spec.ts @@ -88,7 +88,7 @@ test.describe('Info Drawer - Comments', () => { await favoritePage.acaHeader.viewDetails.click(); await favoritePage.infoDrawer.commentsTab.click(); await expect(favoritePage.infoDrawer.commentInputField).toBeVisible(); - await favoritePage.addCommentToNode(commentText); + await favoritePage.infoDrawer.addCommentToNode(commentText); await expect(favoritePage.infoDrawer.addCommentButton).toBeDisabled(); expect(await favoritePage.infoDrawer.checkCommentsHeaderCount()).toEqual(1); expect(await favoritePage.infoDrawer.verifyCommentsCountFromList(1)); @@ -124,7 +124,7 @@ test.describe('Info Drawer - Comments', () => { await recentFilesPage.acaHeader.viewDetails.click(); await recentFilesPage.infoDrawer.commentsTab.click(); await expect(recentFilesPage.infoDrawer.commentInputField).toBeVisible(); - await recentFilesPage.addCommentToNode(commentText); + await recentFilesPage.infoDrawer.addCommentToNode(commentText); await expect(recentFilesPage.infoDrawer.addCommentButton).toBeDisabled(); expect(await recentFilesPage.infoDrawer.checkCommentsHeaderCount()).toEqual(1); expect(await recentFilesPage.infoDrawer.verifyCommentsCountFromList(1)); diff --git a/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts b/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts index 25820cf6f2..1f7a164908 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts @@ -36,32 +36,36 @@ export class AdfInfoDrawerComponent extends BaseComponent { public getIdField = (labelText: string) => this.getChild('[data-automation-id="library-id-properties-wrapper"]', { hasText: labelText }); public getVisibilityField = (labelText: string) => this.getChild('[data-automation-id="library-visibility-properties-wrapper"]', { hasText: labelText }); public getDescriptionField = this.getChild('[data-automation-id="library-description-properties-wrapper"] textarea'); - public propertiesTab = this.getChild('.mat-tab-label-content').nth(0); - public commentsTab = this.getChild('.mat-tab-label-content').nth(1); + public propertiesTab = this.getChild('.adf-info-drawer-tab').nth(0); + public commentsTab = this.getChild('.adf-info-drawer-tab').nth(1); public commentInputField = this.getChild('mat-form-field'); public commentsHeader = this.getChild('#comment-header'); public addCommentButton = this.getChild('[data-automation-id="comments-input-add"]'); public commentsList = this.getChild('.adf-comment-list-item'); - public commentUsername = this.getChild('.mat-line.adf-comment-user-name'); - public commentTextContent = this.getChild('.mat-line.adf-comment-message'); - public commentTimestamp = this.getChild('.mat-line.adf-comment-message-time'); - public commentProfileIcon = this.getChild('.adf-comment-user-icon.ng-star-inserted'); + public commentUsername = this.getChild('.adf-comment-user-name'); + public commentTextContent = this.getChild('.adf-comment-message'); + public commentTimestamp = this.getChild('.adf-comment-message-time'); + public commentProfileIcon = this.getChild('.adf-comment-user-icon'); async checkCommentsHeaderCount() { - let commentsCountTextContent: string = await this.commentsHeader.textContent(); - let commentsCountSplit: string = commentsCountTextContent.split("Comments (")[1]; - let commentsCountString: string = commentsCountSplit.split(")")[0]; - let commentsCount: number = parseInt(commentsCountString); - return commentsCount; + const commentsCountTextContent: string = await this.commentsHeader.textContent(); + const commentsCountString = commentsCountTextContent.match(/\d+/g)[0]; + return parseInt(commentsCountString); } async verifyCommentsCountFromList(expectedNumber: number) { - let commentsCountFromList = await this.commentsList.count(); + const commentsCountFromList = await this.commentsList.count(); expect(commentsCountFromList).toEqual(expectedNumber); } async waitForComments() { await this.commentsList.first().waitFor(); } + + async addCommentToNode(commentText: string) { + await this.commentInputField.click(); + await this.page.keyboard.type(commentText); + await this.addCommentButton.click(); + } } diff --git a/projects/aca-playwright-shared/src/page-objects/pages/favorites.page.ts b/projects/aca-playwright-shared/src/page-objects/pages/favorites.page.ts index 4f561f5b3e..8aa940f26a 100644 --- a/projects/aca-playwright-shared/src/page-objects/pages/favorites.page.ts +++ b/projects/aca-playwright-shared/src/page-objects/pages/favorites.page.ts @@ -49,10 +49,4 @@ export class FavoritesPage extends BasePage { async waitForPageLoad() { await this.page.waitForURL(`**/${FavoritesPage.pageUrl}`); } - - async addCommentToNode(commentText: any) { - await this.infoDrawer.commentInputField.click(); - await this.page.keyboard.type(commentText); - await this.infoDrawer.addCommentButton.click(); - } } diff --git a/projects/aca-playwright-shared/src/page-objects/pages/recent-files.page.ts b/projects/aca-playwright-shared/src/page-objects/pages/recent-files.page.ts index ffe4aa3066..19bd1600e6 100644 --- a/projects/aca-playwright-shared/src/page-objects/pages/recent-files.page.ts +++ b/projects/aca-playwright-shared/src/page-objects/pages/recent-files.page.ts @@ -43,11 +43,4 @@ export class RecentFilesPage extends BasePage { public sidenav = new SidenavComponent(this.page); public breadcrumb = new Breadcrumb(this.page); public infoDrawer = new AdfInfoDrawerComponent(this.page); - - - async addCommentToNode(commentText: any) { - await this.infoDrawer.commentInputField.click(); - await this.page.keyboard.type(commentText); - await this.infoDrawer.addCommentButton.click(); - } } From 05d6ba9420d0df4d48f2849793afca2e7fc90c3f Mon Sep 17 00:00:00 2001 From: datguycheb Date: Mon, 29 Jan 2024 11:02:07 +0100 Subject: [PATCH 4/8] [ACS-5882] 2nd part of fixed issues from pull request comments --- e2e/playwright/info-drawer/.eslintrc.json | 2 +- .../info-drawer/src/tests/comments.spec.ts | 24 ++++++++++--------- .../components/adf-info-drawer.component.ts | 5 ++-- .../page-objects/pages/personal-files.page.ts | 4 ---- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/e2e/playwright/info-drawer/.eslintrc.json b/e2e/playwright/info-drawer/.eslintrc.json index 9e1357d874..44e7bcef48 100644 --- a/e2e/playwright/info-drawer/.eslintrc.json +++ b/e2e/playwright/info-drawer/.eslintrc.json @@ -10,7 +10,7 @@ ], "parserOptions": { "project": [ - "e2e/playwright/list-views/tsconfig.e2e.json" + "e2e/playwright/info-drawer/tsconfig.e2e.json" ], "createDefaultProgram": true }, diff --git a/e2e/playwright/info-drawer/src/tests/comments.spec.ts b/e2e/playwright/info-drawer/src/tests/comments.spec.ts index 7ecd57d3fa..51e3692979 100755 --- a/e2e/playwright/info-drawer/src/tests/comments.spec.ts +++ b/e2e/playwright/info-drawer/src/tests/comments.spec.ts @@ -33,9 +33,6 @@ test.describe('Info Drawer - Comments', () => { let favoritesActions: FavoritesPageApi; const username = `user-e2e-${Utils.random()}`; const commentText = `comment-e2e-${Utils.random()}`; - const persFolderName = `persFolder-e2e-${Utils.random()}`; - const favFolderName = `favFolder-e2e-${Utils.random()}`; - const sharedFileName = `sharedFile-e2e-${Utils.random()}`; test.beforeAll(async () => { try { @@ -52,7 +49,7 @@ test.describe('Info Drawer - Comments', () => { test.beforeEach(async ({ loginPage }) => { try { - await loginPage.loginUser({ username: username, password: username }, { withNavigation: true, waitForLoading: true }); + await loginPage.loginUser({ username, password: username }, { withNavigation: true, waitForLoading: true }); } catch (error) { console.error(`Main beforeEach failed: ${error}`); } @@ -62,23 +59,27 @@ test.describe('Info Drawer - Comments', () => { try { await nodesApi.deleteCurrentUserNodes(); await trashcanApi.emptyTrashcan(); - } catch {} + } catch (error) { + console.error(`Main afterAll failed: ${error}`); + } }); test('[C299173] from Personal Files - Comments tab default fields', async ({ personalFiles }) => { - await nodesApi.createFolder(persFolderName); - await fileActionsApi.waitForNodes(persFolderName, { expect: 1 }); + const personalFolderName = `persFolder-e2e-${Utils.random()}`; + await nodesApi.createFolder(personalFolderName); + await fileActionsApi.waitForNodes(personalFolderName, { expect: 1 }); await personalFiles.navigate(); - await expect(personalFiles.dataTable.getRowByName(persFolderName)).toBeVisible(); - await personalFiles.dataTable.getRowByName(persFolderName).click(); + await expect(personalFiles.dataTable.getRowByName(personalFolderName)).toBeVisible(); + await personalFiles.dataTable.getRowByName(personalFolderName).click(); await personalFiles.acaHeader.viewDetails.click(); await personalFiles.infoDrawer.commentsTab.click(); await expect(personalFiles.infoDrawer.commentInputField).toBeVisible(); expect(await personalFiles.infoDrawer.checkCommentsHeaderCount()).toEqual(0); - expect(await personalFiles.infoDrawer.addCommentButton).toBeDisabled(); + await expect(personalFiles.infoDrawer.addCommentButton).toBeDisabled(); }); test('[C299209] from Favorites - Add a comment on a folder', async ({ favoritePage }) => { + const favFolderName = `favFolder-e2e-${Utils.random()}`; const folderFavId: string = (await nodesApi.createFolder(favFolderName)).entry.id; await favoritesActions.addFavoritesByIds('folder', [folderFavId]); await fileActionsApi.waitForNodes(favFolderName, { expect: 1 }); @@ -95,6 +96,7 @@ test.describe('Info Drawer - Comments', () => { }); test('[C299189] from Shared Files - Comments are displayed ordered by created date in descending order', async ({ sharedPage }) => { + const sharedFileName = `sharedFile-e2e-${Utils.random()}`; const e2eCommentFirst = `e2e-comment-${Utils.random()}`; const e2eCommentSecond = `e2e-comment-${Utils.random()}`; const sharedFileId: string = (await nodesApi.createFile(sharedFileName)).entry.id; @@ -115,7 +117,7 @@ test.describe('Info Drawer - Comments', () => { }); test('[C299195] from Recent Files - Add a comment on a file', async ({ recentFilesPage }) => { - const recentFile = `e2e-recentfile-${Utils.random()}`; + const recentFile = `e2e-recentFile-${Utils.random()}`; await nodesApi.createFile(recentFile); await fileActionsApi.waitForNodes(recentFile, { expect: 1 }); await recentFilesPage.navigate(); diff --git a/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts b/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts index 1f7a164908..56d989e5d7 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts @@ -45,11 +45,10 @@ export class AdfInfoDrawerComponent extends BaseComponent { public commentUsername = this.getChild('.adf-comment-user-name'); public commentTextContent = this.getChild('.adf-comment-message'); public commentTimestamp = this.getChild('.adf-comment-message-time'); - public commentProfileIcon = this.getChild('.adf-comment-user-icon'); - async checkCommentsHeaderCount() { - const commentsCountTextContent: string = await this.commentsHeader.textContent(); + async checkCommentsHeaderCount(): Promise { + const commentsCountTextContent = await this.commentsHeader.textContent(); const commentsCountString = commentsCountTextContent.match(/\d+/g)[0]; return parseInt(commentsCountString); } diff --git a/projects/aca-playwright-shared/src/page-objects/pages/personal-files.page.ts b/projects/aca-playwright-shared/src/page-objects/pages/personal-files.page.ts index bfa28c743e..8098788fb4 100644 --- a/projects/aca-playwright-shared/src/page-objects/pages/personal-files.page.ts +++ b/projects/aca-playwright-shared/src/page-objects/pages/personal-files.page.ts @@ -95,8 +95,4 @@ export class PersonalFilesPage extends BasePage { await this.contentNodeSelector.selectDestination(destinationName); await this.contentNodeSelector.actionButton.click(); } - - async clickInfoDrawerButton(): Promise { - await this.acaHeader.viewDetails.click(); - } } From 09f1c2c583ea2c5028522eb8191cbdf0154c18dc Mon Sep 17 00:00:00 2001 From: datguycheb Date: Mon, 29 Jan 2024 11:38:37 +0100 Subject: [PATCH 5/8] [ACS-5882] added Promise void functions without return --- .../page-objects/components/adf-info-drawer.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts b/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts index 56d989e5d7..bd2c5d7e57 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/adf-info-drawer.component.ts @@ -53,16 +53,16 @@ export class AdfInfoDrawerComponent extends BaseComponent { return parseInt(commentsCountString); } - async verifyCommentsCountFromList(expectedNumber: number) { + async verifyCommentsCountFromList(expectedNumber: number): Promise { const commentsCountFromList = await this.commentsList.count(); expect(commentsCountFromList).toEqual(expectedNumber); } - async waitForComments() { + async waitForComments(): Promise { await this.commentsList.first().waitFor(); } - async addCommentToNode(commentText: string) { + async addCommentToNode(commentText: string): Promise { await this.commentInputField.click(); await this.page.keyboard.type(commentText); await this.addCommentButton.click(); From 402f23cf05baa84d568436f760eb0788efad49e9 Mon Sep 17 00:00:00 2001 From: datguycheb Date: Mon, 29 Jan 2024 13:01:28 +0100 Subject: [PATCH 6/8] [ACS-5882] Small naming fixes --- .../info-drawer/src/tests/comments.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/e2e/playwright/info-drawer/src/tests/comments.spec.ts b/e2e/playwright/info-drawer/src/tests/comments.spec.ts index 51e3692979..6f238c2619 100755 --- a/e2e/playwright/info-drawer/src/tests/comments.spec.ts +++ b/e2e/playwright/info-drawer/src/tests/comments.spec.ts @@ -65,7 +65,7 @@ test.describe('Info Drawer - Comments', () => { }); test('[C299173] from Personal Files - Comments tab default fields', async ({ personalFiles }) => { - const personalFolderName = `persFolder-e2e-${Utils.random()}`; + const personalFolderName = `personalFolder-e2e-${Utils.random()}`; await nodesApi.createFolder(personalFolderName); await fileActionsApi.waitForNodes(personalFolderName, { expect: 1 }); await personalFiles.navigate(); @@ -79,13 +79,13 @@ test.describe('Info Drawer - Comments', () => { }); test('[C299209] from Favorites - Add a comment on a folder', async ({ favoritePage }) => { - const favFolderName = `favFolder-e2e-${Utils.random()}`; - const folderFavId: string = (await nodesApi.createFolder(favFolderName)).entry.id; + const favoriteFolderName = `favoriteFolder-e2e-${Utils.random()}`; + const folderFavId: string = (await nodesApi.createFolder(favoriteFolderName)).entry.id; await favoritesActions.addFavoritesByIds('folder', [folderFavId]); - await fileActionsApi.waitForNodes(favFolderName, { expect: 1 }); + await fileActionsApi.waitForNodes(favoriteFolderName, { expect: 1 }); await favoritePage.navigate(); - await expect(favoritePage.dataTable.getRowByName(favFolderName)).toBeVisible(); - await favoritePage.dataTable.getRowByName(favFolderName).click(); + await expect(favoritePage.dataTable.getRowByName(favoriteFolderName)).toBeVisible(); + await favoritePage.dataTable.getRowByName(favoriteFolderName).click(); await favoritePage.acaHeader.viewDetails.click(); await favoritePage.infoDrawer.commentsTab.click(); await expect(favoritePage.infoDrawer.commentInputField).toBeVisible(); From 3b7377e0e408d4ff7dc32fe081d5da54bf5a8459 Mon Sep 17 00:00:00 2001 From: datguycheb Date: Wed, 31 Jan 2024 09:07:07 +0100 Subject: [PATCH 7/8] [ACS-5882] excluding 2 tests - BE issue --- e2e/playwright/info-drawer/exclude.tests.json | 5 ++++- e2e/playwright/info-drawer/src/tests/comments.spec.ts | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/e2e/playwright/info-drawer/exclude.tests.json b/e2e/playwright/info-drawer/exclude.tests.json index 0967ef424b..0df6d0b610 100644 --- a/e2e/playwright/info-drawer/exclude.tests.json +++ b/e2e/playwright/info-drawer/exclude.tests.json @@ -1 +1,4 @@ -{} +{ + "C299195" : "https://alfresco.atlassian.net/browse/ACS-6688", + "C299189" : "https://alfresco.atlassian.net/browse/ACS-6688" +} diff --git a/e2e/playwright/info-drawer/src/tests/comments.spec.ts b/e2e/playwright/info-drawer/src/tests/comments.spec.ts index 6f238c2619..098241a922 100755 --- a/e2e/playwright/info-drawer/src/tests/comments.spec.ts +++ b/e2e/playwright/info-drawer/src/tests/comments.spec.ts @@ -139,7 +139,6 @@ test.describe('Info Drawer - Comments', () => { await favoritesActions.addFavoritesByIds('file', [commentInfoFileId]); await fileActionsApi.waitForNodes(commentInfoFileName, { expect: 1 }); await apiClientFactory.commentsApi.createComment(commentInfoFileId, { content: e2eCommentFirst }); - await apiClientFactory.share.createSharedLink({ nodeId: commentInfoFileId }); await fileActionsApi.waitForNodes(commentInfoFileName, { expect: 1 }); await favoritePage.navigate(); await expect(favoritePage.dataTable.getRowByName(commentInfoFileName)).toBeVisible(); From 61e55ed9348260f303190dd370f7aed2bdb48ed0 Mon Sep 17 00:00:00 2001 From: datguychen Date: Fri, 2 Feb 2024 16:01:28 +0100 Subject: [PATCH 8/8] [ACS-5882] Fixed one test --- e2e/playwright/navigation/src/tests/single-click.spec.ts | 4 ++++ .../components/dataTable/data-table.component.ts | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/e2e/playwright/navigation/src/tests/single-click.spec.ts b/e2e/playwright/navigation/src/tests/single-click.spec.ts index 9fc476a56c..9eb6b19f45 100644 --- a/e2e/playwright/navigation/src/tests/single-click.spec.ts +++ b/e2e/playwright/navigation/src/tests/single-click.spec.ts @@ -67,8 +67,12 @@ test.describe('Single click on item name', () => { test('[C280034] Navigate inside the folder when clicking the hyperlink on Personal Files', async ({ personalFiles }) => { await personalFiles.navigate(); + await personalFiles.dataTable.setPaginationTo50(); await personalFiles.dataTable.getCellLinkByName(folder1).click(); await personalFiles.dataTable.spinnerWaitForReload(); + while ((await personalFiles.breadcrumb.currentItem.innerText()) === 'Personal Files') { + await personalFiles.breadcrumb.currentItem.innerText(); + } expect(await personalFiles.breadcrumb.currentItem.innerText()).toBe(folder1); }); diff --git a/projects/aca-playwright-shared/src/page-objects/components/dataTable/data-table.component.ts b/projects/aca-playwright-shared/src/page-objects/components/dataTable/data-table.component.ts index 4e51c8a417..48ca515aa8 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/dataTable/data-table.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/dataTable/data-table.component.ts @@ -49,6 +49,8 @@ export class DataTableComponent extends BaseComponent { emptyListSubtitle = this.getChild('.adf-empty-content__subtitle'); emptySearchText = this.getChild('.empty-search__text'); emptyListTest = this.getChild('adf-custom-empty-content-template'); + paginationButton = this.page.locator('.adf-pagination__block button').nth(0); + paginationOptions = this.page.locator('#cdk-overlay-0 button'); /** Locator for row (or rows) */ getRowLocator = this.getChild(`adf-datatable-row`); @@ -319,4 +321,9 @@ export class DataTableComponent extends BaseComponent { async rightClickOnItem(itemName: string): Promise { await this.getCellByColumnNameAndRowItem(itemName, 'Name').click({ button: 'right' }); } + + async setPaginationTo50(): Promise { + await this.paginationButton.click(); + await this.paginationOptions.getByText("50").click(); + } }