ACS-8584: Fix for Search Input and icons (#4035)

This commit is contained in:
Denys Vuika
2024-08-19 12:00:19 -04:00
committed by GitHub
parent 85a682ed1a
commit 2edc48bc80
18 changed files with 90 additions and 203 deletions

View File

@@ -33,7 +33,7 @@ export class AcaHeader extends BaseComponent {
public createButton = this.getChild('[id="app.toolbar.create"]');
public viewDetails = this.getChild('[title="View Details"]');
public viewButton = this.getChild('button[title="View"]');
public searchButton = this.getChild('button[title="Search"]');
public searchButton = this.getChild('button[id="app.toolbar.search"]');
public fullScreenButton = this.getChild('button[id="app.viewer.fullscreen"]');
public shareButton = this.getChild('button[id="share-action-button"]');
public downloadButtonViewer = this.getChild('button[id="app.viewer.download"]');

View File

@@ -29,9 +29,8 @@ import { timeouts } from '../../../utils';
export class SearchInputComponent extends BaseComponent {
private static rootElement = 'aca-page-layout';
public searchInput = this.page.locator('#app-control-input');
public searchButton = this.page.locator('.app-search-button');
getIconByName = (name: string): Locator => this.getChild('.mat-icon', { hasText: name });
public searchButton = this.page.locator('.aca-search-input--search-button');
public searchCloseButton = this.page.locator('.aca-search-input--close-button');
/**
* Method used in cases where user have possibility to navigate "inside" the element (it's clickable and has link attribute).

View File

@@ -32,9 +32,9 @@ export class SearchOverlayComponent extends BaseComponent {
public searchFoldersOption = this.getChild('input#folder-input');
public searchLibrariesOption = this.getChild('input#libraries-input');
public searchInput = this.page.locator('#app-control-input');
public searchButton = this.page.locator('#app-search-button');
public searchButton = this.page.locator('.aca-search-input--search-button');
public searchInputControl = this.page.locator('.app-search-control');
public searchOptions = this.page.locator('#search-options');
public searchOptions = this.page.locator('.app-search-options');
constructor(page: Page, rootElement = SearchOverlayComponent.rootElement) {
super(page, rootElement);
@@ -90,6 +90,6 @@ export class SearchOverlayComponent extends BaseComponent {
async searchFor(input: string): Promise<void> {
await this.searchInput.fill(input);
await this.searchButton.click();
await this.searchButton.click({ force: true });
}
}

View File

@@ -74,7 +74,7 @@ export class SearchPage extends BasePage {
async searchWithin(searchText: string, searchType: SearchType): Promise<void> {
await this.acaHeader.searchButton.click();
await this.searchInput.searchButton.click();
await this.clickSearchButton();
switch (searchType) {
case 'files':
await this.searchOverlay.checkOnlyFiles();
@@ -94,4 +94,8 @@ export class SearchPage extends BasePage {
await this.searchOverlay.searchFor(searchText);
await this.dataTable.progressBarWaitForReload();
}
async clickSearchButton() {
await this.searchInput.searchButton.click({ force: true });
}
}