[AAE-7355] automate manual C599174 (#2451)

* [AAE-7355] automate manual C599174

* C306959 ci flakiness - click insead of Enter
This commit is contained in:
rafalszmit
2022-02-14 23:20:14 +01:00
committed by GitHub
parent cd280e711f
commit 3afc4f4859
3 changed files with 24 additions and 4 deletions

View File

@@ -251,5 +251,22 @@ describe('File / Folder properties', () => {
expect(await propertiesTab.isEditPropertiesButtonEnabled()).toBe(true, 'Edit button not enabled'); expect(await propertiesTab.isEditPropertiesButtonEnabled()).toBe(true, 'Edit button not enabled');
expect(await propertiesTab.isLessInfoButtonEnabled()).toBe(true, 'Less information button not enabled'); expect(await propertiesTab.isLessInfoButtonEnabled()).toBe(true, 'Less information button not enabled');
}); });
it('[C599174] Should be able to make the files/folders info drawer expandable as for Sites', async () => {
await dataTable.selectItem(file1.name);
await BrowserActions.click(page.toolbar.viewDetailsButton);
await infoDrawer.waitForInfoDrawerToOpen();
await infoDrawer.expandDetailsButton.click();
await expect(await infoDrawer.expandedDetailsPermissionsTab.isPresent()).toBe(true, 'Permissions tab is not displayed');
await page.clickPersonalFilesAndWait();
await dataTable.selectItem(parent);
await BrowserActions.rightClick(dataTable.selectedRow);
await dataTable.menu.clickMenuItem('Permissions');
const expectedSelectedTabTitle = 'permissions';
const actualSelectedTabTitle = await infoDrawer.selectedTab.getText();
await expect(actualSelectedTabTitle.toLowerCase()).toEqual(expectedSelectedTabTitle);
});
}); });
}); });

View File

@@ -24,7 +24,7 @@
*/ */
import { by, browser } from 'protractor'; import { by, browser } from 'protractor';
import { BrowserActions, BrowserVisibility, Logger } from '@alfresco/adf-testing'; import { BrowserActions, BrowserVisibility, Logger, TestElement } from '@alfresco/adf-testing';
import { Component } from '../component'; import { Component } from '../component';
import { CommentsTab } from './info-drawer-comments-tab'; import { CommentsTab } from './info-drawer-comments-tab';
import { LibraryMetadata } from './info-drawer-metadata-library'; import { LibraryMetadata } from './info-drawer-metadata-library';
@@ -43,6 +43,9 @@ export class InfoDrawer extends Component {
tabActiveContent = this.byCss('.mat-tab-body-active .mat-tab-body-content adf-dynamic-tab'); tabActiveContent = this.byCss('.mat-tab-body-active .mat-tab-body-content adf-dynamic-tab');
nextButton = this.byCss('.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron'); nextButton = this.byCss('.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron');
previousButton = this.byCss('.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron'); previousButton = this.byCss('.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron');
expandDetailsButton = TestElement.byCss(`button[title='Expand']`);
selectedTab = TestElement.byCss(`.mat-tab-list [aria-selected='true'] div`);
expandedDetailsPermissionsTab = TestElement.byText('.acs-details-container .mat-tab-label-content', 'Permissions');
constructor(ancestor?: string) { constructor(ancestor?: string) {
super('adf-info-drawer', ancestor); super('adf-info-drawer', ancestor);

View File

@@ -23,7 +23,7 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>. * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/ */
import { browser, by, protractor } from 'protractor'; import { browser, by } from 'protractor';
import { Component } from '../component'; import { Component } from '../component';
import { waitForPresence, waitElement } from '../../utilities/utils'; import { waitForPresence, waitElement } from '../../utilities/utils';
import { BrowserActions, BrowserVisibility, TestElement } from '@alfresco/adf-testing'; import { BrowserActions, BrowserVisibility, TestElement } from '@alfresco/adf-testing';
@@ -152,8 +152,8 @@ export class SearchInput extends Component {
} }
async searchFor(text: string) { async searchFor(text: string) {
await BrowserVisibility.waitUntilElementIsClickable(this.searchInput.elementFinder, 1000); await BrowserVisibility.waitUntilElementIsClickable(this.searchInput.elementFinder);
await this.searchInput.typeText(text); await this.searchInput.typeText(text);
await this.searchInput.elementFinder.sendKeys(protractor.Key.ENTER); await BrowserActions.click(this.searchButton);
} }
} }