mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-08-07 17:48:27 +00:00
[ACS-6954] Refactored search playwright tests (#3700)
* Refactored search playwright tests
This commit is contained in:
@@ -366,11 +366,4 @@ export class DataTableComponent extends BaseComponent {
|
||||
}
|
||||
return sitesInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used to wait for values to be loaded in the table
|
||||
*/
|
||||
async waitForTable(): Promise<void> {
|
||||
await this.getRowLocator.nth(0).waitFor({timeout:5000});
|
||||
}
|
||||
}
|
||||
|
@@ -28,16 +28,13 @@ import { timeouts } from '../../../utils';
|
||||
|
||||
export class SearchInputComponent extends BaseComponent {
|
||||
private static rootElement = 'aca-page-layout';
|
||||
public searchOptionsArea = this.page.locator('mat-checkbox');
|
||||
public searchInput = this.getChild('input[id="app-control-input"]');
|
||||
public searchButton = this.getChild('.app-search-button');
|
||||
public searchInput = this.page.locator('#app-control-input');
|
||||
public searchButton = this.page.locator('.app-search-button');
|
||||
public searchButtonWindow = this.page.locator('#app-search-button');
|
||||
public searchInputWindow = this.page.locator('.app-search-control');
|
||||
public searchInputWindowInput = this.page.locator('.app-search-control input');
|
||||
public searchOptions = this.page.locator('#search-options');
|
||||
public searchFilesOption = this.searchOptionsArea.getByText(' Files ');
|
||||
public searchLibrariesOption = this.searchOptionsArea.getByText(' Libraries ');
|
||||
public searchFoldersOption = this.searchOptionsArea.getByText(' Folders ');
|
||||
public searchFilesOption = this.page.locator('#content')
|
||||
public searchLibrariesOption = this.page.locator('#libraries')
|
||||
public searchFoldersOption = this.page.locator('#folder')
|
||||
|
||||
|
||||
getIconByName = (name: string): Locator => this.getChild('.mat-icon', { hasText: name });
|
||||
@@ -121,9 +118,9 @@ export class SearchInputComponent extends BaseComponent {
|
||||
}
|
||||
|
||||
async searchFor(text: string) {
|
||||
await this.searchInputWindow.click();
|
||||
await this.searchInputWindowInput.clear();
|
||||
await this.searchInputWindow.type(text);
|
||||
await this.searchInput.click({force: true});
|
||||
await this.searchInput.clear({force: true});
|
||||
await this.searchInput.fill(text, {force: true});
|
||||
await this.searchButtonWindow.click();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user