2019-01-30 22:50:49 +07:00
|
|
|
import FillLoginPageWithUserAndPasswordAndClick from '../../../helpers/FillLoginPageAndClick';
|
|
|
|
import {AUTHENTICATION_FAILED} from '../../../../shared/UserMessages';
|
2019-02-13 05:41:19 +07:00
|
|
|
import VisitPageAndWaitUrlIs from '../../../helpers/behaviors/VisitPageAndWaitUrlIs';
|
2019-02-14 05:08:28 +07:00
|
|
|
import VerifyNotificationDisplayed from '../../../helpers/assertions/VerifyNotificationDisplayed';
|
2019-02-14 05:31:12 +07:00
|
|
|
import { StartDriver, StopDriver } from '../../../helpers/context/WithDriver';
|
2019-01-30 22:47:03 +07: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-14 05:31:12 +07:00
|
|
|
this.timeout(10000);
|
|
|
|
|
|
|
|
before(async function() {
|
|
|
|
this.driver = await StartDriver();
|
2019-03-04 05:51:52 +07:00
|
|
|
await VisitPageAndWaitUrlIs(this.driver, "https://login.example.com:8080/#/")
|
2019-01-30 22:47:03 +07:00
|
|
|
await FillLoginPageWithUserAndPasswordAndClick(this.driver, 'john', 'bad_password');
|
|
|
|
});
|
|
|
|
|
2019-02-14 05:31:12 +07:00
|
|
|
after(async function() {
|
|
|
|
await StopDriver(this.driver);
|
|
|
|
})
|
|
|
|
|
2019-01-30 22:47:03 +07:00
|
|
|
it('should get a notification message', async function () {
|
2019-02-14 05:08:28 +07:00
|
|
|
await VerifyNotificationDisplayed(this.driver, AUTHENTICATION_FAILED);
|
2019-01-30 22:47:03 +07:00
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|