From 37d19e37ecc6410f3585aaecd3007405588bed80 Mon Sep 17 00:00:00 2001 From: Katarzyna Kita Date: Fri, 9 Feb 2024 11:13:46 +0100 Subject: [PATCH] Reverted lost selectors --- .../components/adf-info-drawer.component.ts | 13 ++++++++++--- 1 file changed, 10 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 4a706aaccb..2e1d2d8823 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 @@ -37,9 +37,9 @@ export class AdfInfoDrawerComponent extends BaseComponent { 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.page.getByRole('tab', { name: 'Properties' }); + public commentsTab = this.page.getByRole('tab', { name: 'Comments' }); public infoDrawerTabs = this.getChild('.adf-info-drawer-tab'); - public propertiesTab = this.infoDrawerTabs.nth(0); - public commentsTab = this.infoDrawerTabs.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"]'); @@ -47,7 +47,14 @@ 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 headerTitle = this.getChild('.adf-info-drawer-layout-header-title div'); + public commentProfileIcon = this.getChild('.adf-comment-user-icon'); + public infoDrawerPanel = this.page.locator('.adf-info-drawer'); + public headerTitle = this.page.locator('.adf-info-drawer-layout-header-title').getByRole('heading'); + public editButton = this.page.getByRole('button', { name: 'Edit' }); + public cancelButton = this.page.getByRole('button', { name: 'Cancel' }); + public updateButton = this.page.getByRole('button', { name: 'Update' }); + public hintMessage = this.page.locator('.mat-hint'); + public errorMessage = this.page.locator('.mat-error'); public expandDetailsButton = this.getChild(`button[title='Expand panel']`); public expandedDetailsTabs = this.page.locator('.aca-details-container .mat-tab-label-content'); public expandedDetailsPermissionsTab = this.expandedDetailsTabs.getByText('Permissions');