mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
add tests for generic errors (#617)
This commit is contained in:
committed by
Denys Vuika
parent
37059fd4b8
commit
40a564dfc3
@@ -33,10 +33,14 @@ export abstract class Page {
|
||||
app: by.css('app-root'),
|
||||
layout: by.css('app-layout'),
|
||||
overlay: by.css('.cdk-overlay-container'),
|
||||
dialogContainer: by.css('.mat-dialog-container'),
|
||||
dialogContainer: by.css('.mat-dialog-container[role]'),
|
||||
snackBarContainer: '.cdk-overlay-pane .mat-snack-bar-container',
|
||||
snackBar: '.mat-simple-snackbar',
|
||||
snackBarAction: '.mat-simple-snackbar-action button'
|
||||
snackBarAction: '.mat-simple-snackbar-action button',
|
||||
|
||||
genericError: 'aca-generic-error',
|
||||
genericErrorIcon: 'aca-generic-error .mat-icon',
|
||||
genericErrorTitle: '.generic-error__title'
|
||||
};
|
||||
|
||||
public app: ElementFinder = element(this.locators.app);
|
||||
@@ -47,6 +51,10 @@ export abstract class Page {
|
||||
snackBarContainer: ElementFinder = browser.$(this.locators.snackBarContainer);
|
||||
snackBarAction: ElementFinder = browser.$(this.locators.snackBarAction);
|
||||
|
||||
genericError: ElementFinder = browser.$(this.locators.genericError);
|
||||
genericErrorIcon: ElementFinder = browser.$(this.locators.genericErrorIcon);
|
||||
genericErrorTitle: ElementFinder = browser.$(this.locators.genericErrorTitle);
|
||||
|
||||
constructor(public url: string = '') {}
|
||||
|
||||
get title(): promise.Promise<string> {
|
||||
@@ -110,4 +118,12 @@ export abstract class Page {
|
||||
}, this.snackBarAction);
|
||||
});
|
||||
}
|
||||
|
||||
isGenericErrorDisplayed() {
|
||||
return this.genericError.isDisplayed();
|
||||
}
|
||||
|
||||
getGenericErrorTitle() {
|
||||
return this.genericErrorTitle.getText();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user