mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-7466] [E2E] Added e2e tests for search highlighting (#4115)
This commit is contained in:
@@ -58,6 +58,10 @@ export class DataTableComponent extends BaseComponent {
|
||||
lockOwner = this.page.locator('.aca-locked-by--name');
|
||||
uncheckedCheckbox = this.page.locator('.mat-mdc-checkbox');
|
||||
checkedCheckbox = this.page.locator('.mat-mdc-checkbox-checked');
|
||||
highlightedText = '.aca-highlight';
|
||||
searchFileName = '.search-file-name';
|
||||
searchFileDescription = '[data-automation-id="search-results-entry-description"]';
|
||||
searchFileContent = '.aca-result-content';
|
||||
|
||||
/** Locator for row (or rows) */
|
||||
getRowLocator = this.page.getByRole('rowgroup').nth(1).locator('adf-datatable-row');
|
||||
@@ -379,4 +383,15 @@ export class DataTableComponent extends BaseComponent {
|
||||
const row = this.getRowByName(itemName);
|
||||
return row.locator(this.lockOwner).innerText();
|
||||
}
|
||||
|
||||
async hasHighlightedText(location: 'name' | 'description' | 'content'): Promise<boolean> {
|
||||
switch (location) {
|
||||
case 'name':
|
||||
return this.page.locator(this.searchFileName).locator(this.highlightedText).isVisible();
|
||||
case 'description':
|
||||
return this.page.locator(this.searchFileDescription).locator(this.highlightedText).isVisible();
|
||||
case 'content':
|
||||
return this.page.locator(this.searchFileContent).locator(this.highlightedText).isVisible();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user