2019-01-30 15:50:49 +00:00
|
|
|
import FillLoginPageWithUserAndPasswordAndClick from '../../../helpers/FillLoginPageAndClick';
|
2019-04-16 22:26:12 +00:00
|
|
|
import {AUTHENTICATION_FAILED} from '../../../../server/src/lib/UserMessages';
|
2019-02-12 22:41:19 +00:00
|
|
|
import VisitPageAndWaitUrlIs from '../../../helpers/behaviors/VisitPageAndWaitUrlIs';
|
2019-02-13 22:08:28 +00:00
|
|
|
import VerifyNotificationDisplayed from '../../../helpers/assertions/VerifyNotificationDisplayed';
|
2019-02-13 22:31:12 +00:00
|
|
|
import { StartDriver, StopDriver } from '../../../helpers/context/WithDriver';
|
2019-01-30 15:47:03 +00:00
|
|
|
|
|
|
|
export default function() {
|
|
|
|
/**
|
|
|
|
* When user provides bad password,
|
|
|
|
* Then he gets a notification message.
|
|
|
|
*/
|
|
|
|
describe('failed login as john in first factor', function() {
|
2019-02-13 22:31:12 +00:00
|
|
|
this.timeout(10000);
|
|
|
|
|
|
|
|
before(async function() {
|
|
|
|
this.driver = await StartDriver();
|
2019-03-03 22:51:52 +00:00
|
|
|
await VisitPageAndWaitUrlIs(this.driver, "https://login.example.com:8080/#/")
|
2019-01-30 15:47:03 +00:00
|
|
|
await FillLoginPageWithUserAndPasswordAndClick(this.driver, 'john', 'bad_password');
|
|
|
|
});
|
|
|
|
|
2019-02-13 22:31:12 +00:00
|
|
|
after(async function() {
|
|
|
|
await StopDriver(this.driver);
|
|
|
|
})
|
|
|
|
|
2019-01-30 15:47:03 +00:00
|
|
|
it('should get a notification message', async function () {
|
2019-02-13 22:08:28 +00:00
|
|
|
await VerifyNotificationDisplayed(this.driver, AUTHENTICATION_FAILED);
|
2019-01-30 15:47:03 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|