mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[ADF-3981] - Should be possible to login with valid credentials (#4231)
* in progress * updated the hardcoded url to TestConfig one.
This commit is contained in:
parent
f8549d43aa
commit
cdcff5b4e8
@ -54,6 +54,8 @@ describe('Login component', () => {
|
||||
password: 'Enter your password to sign in',
|
||||
required: 'Required'
|
||||
};
|
||||
let invalidUsername = 'invaliduser';
|
||||
let invalidPassword = 'invalidpassword';
|
||||
|
||||
beforeAll(async (done) => {
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
@ -250,4 +252,17 @@ describe('Login component', () => {
|
||||
loginPage.checkLoginImgURL('https://rawgit.com/Alfresco/alfresco-ng2-components/master/assets/angular2.png');
|
||||
});
|
||||
|
||||
it('[C291854] Should be possible login in valid credentials', () => {
|
||||
browser.get(TestConfig.adf.url);
|
||||
loginPage.waitForElements();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.enterUsername(invalidUsername);
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.enterPassword(invalidPassword);
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(true);
|
||||
loginPage.clickSignInButton();
|
||||
expect(loginPage.getLoginError()).toEqual(errorMessages.invalid_credentials);
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user