mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
[AAE-1884] e2e shared file and refactor custom sources (#5506)
* fix lint e2e shared file and refactor custom sources additional tests for search chip list (#5523) * modify wait startegy * fix metadata problem * improve method retry * login before to execute call * login before to execute call
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { BrowserActions, BrowserVisibility, DataTableComponentPage, DropdownPage } from '@alfresco/adf-testing';
|
||||
import { by, element, ElementFinder } from 'protractor';
|
||||
import { NavigationBarPage } from '../navigation-bar.page';
|
||||
|
||||
@@ -35,17 +35,12 @@ const column = {
|
||||
status: 'Status'
|
||||
};
|
||||
|
||||
export class CustomSources {
|
||||
|
||||
export class CustomSourcesPage {
|
||||
dataTable: DataTableComponentPage = new DataTableComponentPage();
|
||||
navigationBarPage: NavigationBarPage = new NavigationBarPage();
|
||||
|
||||
toolbar: ElementFinder = element(by.css('app-custom-sources .adf-toolbar-title'));
|
||||
sourceTypeDropdown: ElementFinder = element(by.css('div[class*="select-arrow"]>div'));
|
||||
|
||||
getSourceType(option): ElementFinder {
|
||||
return element(by.cssContainingText('.cdk-overlay-pane span', `${option}`));
|
||||
}
|
||||
selectModeDropdown = new DropdownPage(element(by.css('mat-select[data-automation-id="custom-sources-select"]')));
|
||||
|
||||
async waitForToolbarToBeVisible(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.toolbar);
|
||||
@@ -56,18 +51,16 @@ export class CustomSources {
|
||||
await this.waitForToolbarToBeVisible();
|
||||
}
|
||||
|
||||
async clickOnSourceType(): Promise<void> {
|
||||
await BrowserActions.click(this.sourceTypeDropdown);
|
||||
}
|
||||
|
||||
async selectMySitesSourceType(): Promise<void> {
|
||||
await this.clickOnSourceType();
|
||||
await BrowserActions.click(this.getSourceType(source.mySites));
|
||||
await this.selectModeDropdown.selectDropdownOption(source.mySites);
|
||||
}
|
||||
|
||||
async selectFavoritesSourceType(): Promise<void> {
|
||||
await this.clickOnSourceType();
|
||||
await BrowserActions.click(this.getSourceType(source.favorites));
|
||||
await this.selectModeDropdown.selectDropdownOption(source.favorites);
|
||||
}
|
||||
|
||||
async selectSharedLinksSourceType(): Promise<void> {
|
||||
await this.selectModeDropdown.selectDropdownOption(source.sharedLinks);
|
||||
}
|
||||
|
||||
checkRowIsDisplayed(rowName): Promise<void> {
|
||||
|
Reference in New Issue
Block a user