mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Test improve (#6146)
* fix * fix datatable wait method * slow down isEmpty check * fix * fix * fix
This commit is contained in:
@@ -92,6 +92,10 @@ export class LoginShellPage {
|
||||
return BrowserActions.getText(this.loginError);
|
||||
}
|
||||
|
||||
async checkLoginErrorIsDisplayed(loginError: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementHasText(this.loginError, loginError);
|
||||
}
|
||||
|
||||
async checkLoginImgURL(): Promise<string> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.logoImg);
|
||||
return this.logoImg.getAttribute('src');
|
||||
|
@@ -55,7 +55,7 @@ export class NotificationDemoPage {
|
||||
}
|
||||
|
||||
async waitForSnackBarToClose(): Promise<void> {
|
||||
await this.snackbarPage.waitForSnackBarToClose();
|
||||
await this.snackbarPage.waitForSnackBarToClose(15000);
|
||||
}
|
||||
|
||||
async enterMessageField(text: string): Promise<void> {
|
||||
|
@@ -82,7 +82,7 @@ describe('Settings component', () => {
|
||||
await loginPage.enterUsername(browser.params.testConfig.admin.email);
|
||||
await loginPage.enterPassword(browser.params.testConfig.admin.password);
|
||||
await loginPage.clickSignInButton();
|
||||
await expect(await loginPage.getLoginError()).toMatch(loginError);
|
||||
await loginPage.checkLoginErrorIsDisplayed(loginError);
|
||||
});
|
||||
|
||||
it('[C291952] Should not be able to sign in with invalid Process Services Url', async () => {
|
||||
@@ -93,7 +93,7 @@ describe('Settings component', () => {
|
||||
await loginPage.enterUsername(browser.params.testConfig.admin.email);
|
||||
await loginPage.enterPassword(browser.params.testConfig.admin.password);
|
||||
await loginPage.clickSignInButton();
|
||||
await expect(await loginPage.getLoginError()).toMatch(loginError);
|
||||
await loginPage.checkLoginErrorIsDisplayed(loginError);
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user