From d2b6e6d6b46b8290943af1484db981523d357e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=9Awiderski?= Date: Wed, 26 Mar 2025 09:09:52 +0100 Subject: [PATCH] [ACS-9372] [E2E] Fixed eslint errors (#4479) * [ACS-9372] Fixed eslint errors * [ACS-9372] Review fixes 1 --- e2e/playwright/info-drawer/src/tests/comments.e2e.ts | 6 ++---- .../page-objects/components/adf-info-drawer.component.ts | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/e2e/playwright/info-drawer/src/tests/comments.e2e.ts b/e2e/playwright/info-drawer/src/tests/comments.e2e.ts index f4e06f42b..4953a3ed8 100755 --- a/e2e/playwright/info-drawer/src/tests/comments.e2e.ts +++ b/e2e/playwright/info-drawer/src/tests/comments.e2e.ts @@ -83,8 +83,7 @@ test.describe('Info Drawer - Comments', () => { await expect(favoritePage.infoDrawer.commentInputField).toBeVisible(); await favoritePage.infoDrawer.addCommentToNode(commentText); await expect(favoritePage.infoDrawer.addCommentButton).toBeDisabled(); - expect(await favoritePage.infoDrawer.checkCommentsHeaderCount()).toEqual(1); - expect(await favoritePage.infoDrawer.verifyCommentsCountFromList(1)); + expect(await favoritePage.infoDrawer.getCommentsCountFromList()).toEqual(1); }); test('[XAT-5533] from Shared Files - Comments are displayed ordered by created date in descending order', async ({ sharedPage }) => { @@ -120,8 +119,7 @@ test.describe('Info Drawer - Comments', () => { await expect(recentFilesPage.infoDrawer.commentInputField).toBeVisible(); await recentFilesPage.infoDrawer.addCommentToNode(commentText); await expect(recentFilesPage.infoDrawer.addCommentButton).toBeDisabled(); - expect(await recentFilesPage.infoDrawer.checkCommentsHeaderCount()).toEqual(1); - expect(await recentFilesPage.infoDrawer.verifyCommentsCountFromList(1)); + expect(await recentFilesPage.infoDrawer.getCommentsCountFromList()).toEqual(1); }); test('[XAT-5540] Comment info display - File from Favorites', async ({ favoritePage }) => { 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 74b308477..95ff3ca2c 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, expect } from '@playwright/test'; +import { Page } from '@playwright/test'; export class AdfInfoDrawerComponent extends BaseComponent { private static rootElement = 'adf-info-drawer'; @@ -89,9 +89,8 @@ export class AdfInfoDrawerComponent extends BaseComponent { return parseInt(commentsCountString, 10); } - async verifyCommentsCountFromList(expectedNumber: number): Promise { - const commentsCountFromList = await this.commentsList.count(); - expect(commentsCountFromList).toEqual(expectedNumber); + async getCommentsCountFromList(): Promise { + return this.commentsList.count(); } async waitForComments(): Promise {