mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACA-2215] toggle search filter (#998)
* support for toggling search filter * update docs * disable e2e test * update e2e
This commit is contained in:
committed by
Cilibiu Bogdan
parent
22a256f09b
commit
92a5ec44e8
@@ -36,6 +36,7 @@ export class Toolbar extends Component {
|
||||
share: `.mat-icon-button[title='Share']`,
|
||||
shareEdit: `.mat-icon-button[title='Shared link settings']`,
|
||||
view: `.mat-icon-button[title='View']`,
|
||||
searchFilterToggle: `.mat-icon-button[title='Toggle search filter']`,
|
||||
download: `.mat-icon-button[title='Download']`,
|
||||
editFolder: 'app.toolbar.editFolder',
|
||||
viewDetails: `.mat-icon-button[title='View details']`,
|
||||
@@ -52,6 +53,7 @@ export class Toolbar extends Component {
|
||||
shareButton: ElementFinder = this.component.element(by.css(Toolbar.selectors.share));
|
||||
shareEditButton: ElementFinder = this.component.element(by.css(Toolbar.selectors.shareEdit));
|
||||
viewButton: ElementFinder = this.component.element(by.css(Toolbar.selectors.view));
|
||||
searchFiltersToggleButton: ElementFinder = this.component.element(by.css(Toolbar.selectors.searchFilterToggle));
|
||||
downloadButton: ElementFinder = this.component.element(by.css(Toolbar.selectors.download));
|
||||
editFolderButton: ElementFinder = this.component.element(by.id(Toolbar.selectors.editFolder));
|
||||
viewDetailsButton: ElementFinder = this.component.element(by.css(Toolbar.selectors.viewDetails));
|
||||
@@ -71,6 +73,10 @@ export class Toolbar extends Component {
|
||||
return count === 0;
|
||||
}
|
||||
|
||||
async numberOfAvailableActions() {
|
||||
return await this.buttons.count();
|
||||
}
|
||||
|
||||
async isButtonPresent(title: string) {
|
||||
const elem = this.component.element(by.css(`${Toolbar.selectors.button}[title="${title}"]`));
|
||||
return await elem.isPresent();
|
||||
@@ -121,6 +127,10 @@ export class Toolbar extends Component {
|
||||
return await browser.isElementPresent(this.viewButton);
|
||||
}
|
||||
|
||||
async isToggleSearchFiltersPresent() {
|
||||
return await browser.isElementPresent(this.searchFiltersToggleButton);
|
||||
}
|
||||
|
||||
async isDownloadPresent() {
|
||||
return await browser.isElementPresent(this.downloadButton);
|
||||
}
|
||||
@@ -232,7 +242,6 @@ export class Toolbar extends Component {
|
||||
return await this.menu.clickMenuItem('Upload new version');
|
||||
}
|
||||
|
||||
|
||||
async clickFullScreen() {
|
||||
return await this.fullScreenButton.click();
|
||||
}
|
||||
|
||||
@@ -673,12 +673,13 @@ describe('Toolbar actions - single selection : ', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
it('actions are not displayed when no item is selected - [C291815]', async () => {
|
||||
it('nodes actions are not displayed when no item is selected - [C291815]', async () => {
|
||||
await searchInput.clickSearchButton();
|
||||
await searchInput.checkFilesAndFolders();
|
||||
await searchInput.searchForTextAndCloseSearchOptions(fileInSite);
|
||||
|
||||
expect(await toolbar.isEmpty()).toBe(true, `actions displayed though nothing selected`);
|
||||
expect(await toolbar.isToggleSearchFiltersPresent()).toBe(true, `Search filter toggle is not displayed`);
|
||||
expect(await toolbar.numberOfAvailableActions()).toBe(1, `more than 1 action is present`);
|
||||
});
|
||||
|
||||
it('correct actions appear when a file is selected - [C291816]', async () => {
|
||||
|
||||
Reference in New Issue
Block a user