mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-1964] add tests for search results based on search input selection (#814)
* add tests for search results based on search input selection * add one more test
This commit is contained in:
committed by
Denys Vuika
parent
26b4b0684f
commit
94f2762940
@@ -76,11 +76,11 @@ export class DataTable extends Component {
|
||||
|
||||
// Wait methods (waits for elements)
|
||||
waitForHeader() {
|
||||
try {
|
||||
return browser.wait(EC.presenceOf(this.head), BROWSER_WAIT_TIMEOUT);
|
||||
} catch (error) {
|
||||
console.log('----- wait for header catch : ', error);
|
||||
}
|
||||
return browser.wait(EC.presenceOf(this.head), BROWSER_WAIT_TIMEOUT, '--- timeout waitForHeader ---');
|
||||
}
|
||||
|
||||
waitForBody() {
|
||||
return browser.wait(EC.presenceOf(this.body), BROWSER_WAIT_TIMEOUT, '--- timeout waitForBody ---');
|
||||
}
|
||||
|
||||
async waitForEmptyState() {
|
||||
|
@@ -105,7 +105,40 @@ export class SearchInput extends Component {
|
||||
return optClass.includes('mat-checkbox-checked');
|
||||
}
|
||||
|
||||
async searchForText(text: string) {
|
||||
async clearOptions() {
|
||||
if (await this.isFilesOptionChecked()) {
|
||||
await this.clickFilesOption();
|
||||
}
|
||||
if (await this.isFoldersOptionChecked()) {
|
||||
await this.clickFoldersOption();
|
||||
}
|
||||
if (await this.isLibrariesOptionChecked()) {
|
||||
await this.clickLibrariesOption();
|
||||
}
|
||||
}
|
||||
|
||||
async checkOnlyFiles() {
|
||||
await this.clearOptions();
|
||||
await this.clickFilesOption();
|
||||
}
|
||||
|
||||
async checkOnlyFolders() {
|
||||
await this.clearOptions();
|
||||
await this.clickFoldersOption();
|
||||
}
|
||||
|
||||
async checkFilesAndFolders() {
|
||||
await this.clearOptions();
|
||||
await this.clickFilesOption();
|
||||
await this.clickFoldersOption();
|
||||
}
|
||||
|
||||
async checkLibraries() {
|
||||
await this.clearOptions();
|
||||
await this.clickLibrariesOption();
|
||||
}
|
||||
|
||||
async searchFor(text: string) {
|
||||
await this.searchBar.clear();
|
||||
await this.searchBar.sendKeys(text);
|
||||
await this.searchBar.sendKeys(protractor.Key.ENTER);
|
||||
|
Reference in New Issue
Block a user