From 799ff8b74bf39be70c9b89063b48886354969f5e Mon Sep 17 00:00:00 2001
From: Katarzyna Kita <156378082+katarzynakita@users.noreply.github.com>
Date: Wed, 21 Feb 2024 13:57:06 +0100
Subject: [PATCH] [ACS-6791] Restore&fix excluded tests (#3649)

* Removed tests from excluded, small fixes
---
 e2e/playwright/info-drawer/exclude.tests.json                | 5 +----
 e2e/playwright/library-actions/exclude.tests.json            | 4 +---
 .../library-actions/src/tests/library-actions.spec.ts        | 2 ++
 .../src/page-objects/components/adf-info-drawer.component.ts | 5 ++---
 4 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/e2e/playwright/info-drawer/exclude.tests.json b/e2e/playwright/info-drawer/exclude.tests.json
index 0df6d0b61..0967ef424 100644
--- a/e2e/playwright/info-drawer/exclude.tests.json
+++ b/e2e/playwright/info-drawer/exclude.tests.json
@@ -1,4 +1 @@
-{
-    "C299195" : "https://alfresco.atlassian.net/browse/ACS-6688",
-    "C299189" : "https://alfresco.atlassian.net/browse/ACS-6688"
-}
+{}
diff --git a/e2e/playwright/library-actions/exclude.tests.json b/e2e/playwright/library-actions/exclude.tests.json
index 179a1585f..0967ef424 100644
--- a/e2e/playwright/library-actions/exclude.tests.json
+++ b/e2e/playwright/library-actions/exclude.tests.json
@@ -1,3 +1 @@
-{
-    "C286326": "https://alfresco.atlassian.net/browse/ACS-6688"
-}
\ No newline at end of file
+{}
diff --git a/e2e/playwright/library-actions/src/tests/library-actions.spec.ts b/e2e/playwright/library-actions/src/tests/library-actions.spec.ts
index cc86c7733..3d58b32c4 100644
--- a/e2e/playwright/library-actions/src/tests/library-actions.spec.ts
+++ b/e2e/playwright/library-actions/src/tests/library-actions.spec.ts
@@ -224,6 +224,7 @@ test.describe('Library actions ', () => {
       await myLibrariesPage.reload({ waitUntil: domContentLoadedString });
       await expect(libraryTable.getRowByName(user2Library2)).toBeVisible();
       await libraryTable.getRowByName(user2Library2).click();
+      await myLibrariesPage.page.waitForTimeout(1000);
       await myLibrariesHeader.clickMoreActions();
       expect(await libraryMenu.isMenuItemVisible(removeFavoriteButton)).toBe(true);
       await libraryMenu.clickMenuItem(removeFavoriteButton);
@@ -416,6 +417,7 @@ test.describe('Library actions ', () => {
       await expect(libraryTable.getRowByName(user2Library4)).toBeVisible();
       await searchPage.reload({ waitUntil: domContentLoadedString });
       await libraryTable.getRowByName(user2Library4).click();
+      await searchPage.page.waitForTimeout(1000);
       await searchHeader.clickMoreActions();
       await libraryMenu.clickMenuItem(removeFavoriteButton);
       await searchHeader.clickMoreActions();
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 f52ffa1ce..935b213ac 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
@@ -40,7 +40,7 @@ export class AdfInfoDrawerComponent extends BaseComponent {
   public propertiesTab = this.page.getByRole('tab', { name: 'Properties' });
   public commentsTab = this.page.getByRole('tab', { name: 'Comments' });
   public infoDrawerTabs = this.getChild('.adf-info-drawer-tab');
-  public commentInputField = this.getChild('mat-form-field');
+  public commentInputField = this.page.locator('#comment-input');
   public commentsHeader = this.getChild('#comment-header');
   public addCommentButton = this.getChild('[data-automation-id="comments-input-add"]');
   public commentsList = this.getChild('.adf-comment-list-item');
@@ -79,8 +79,7 @@ export class AdfInfoDrawerComponent extends BaseComponent {
   }
 
   async addCommentToNode(commentText: string): Promise<void> {
-    await this.commentInputField.click();
-    await this.page.keyboard.type(commentText);
+    await this.commentInputField.fill(commentText);
     await this.addCommentButton.click();
   }