mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 10:20:29 -06:00
e2e: Waits for login before moving forward (#21185)
This commit is contained in:
parent
0676189291
commit
f1b675b12e
@ -8,5 +8,11 @@ export const login = (username: string, password: string) => {
|
||||
.type(username);
|
||||
e2e.pages.Login.password().type(password);
|
||||
e2e.pages.Login.submit().click();
|
||||
e2e.pages.Login.skip()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
e2e()
|
||||
.get('.login-page')
|
||||
.should('not.exist');
|
||||
e2e().logToConsole('Logged in with', { username, password });
|
||||
};
|
||||
|
@ -6,5 +6,6 @@ export const Login = pageFactory({
|
||||
username: 'Username input field',
|
||||
password: 'Password input field',
|
||||
submit: 'Login button',
|
||||
skip: 'Skip change password button',
|
||||
},
|
||||
});
|
||||
|
@ -1,7 +1,9 @@
|
||||
import React, { PureComponent, SyntheticEvent, ChangeEvent } from 'react';
|
||||
import React, { ChangeEvent, PureComponent, SyntheticEvent } from 'react';
|
||||
import { Tooltip } from '@grafana/ui';
|
||||
import appEvents from 'app/core/app_events';
|
||||
import { AppEvents } from '@grafana/data';
|
||||
import { e2e } from '@grafana/e2e';
|
||||
|
||||
import appEvents from 'app/core/app_events';
|
||||
|
||||
interface Props {
|
||||
onSubmit: (pw: string) => void;
|
||||
@ -115,7 +117,7 @@ export class ChangePassword extends PureComponent<Props, State> {
|
||||
placement="bottom"
|
||||
content="If you skip you will be prompted to change password next time you login."
|
||||
>
|
||||
<a className="btn btn-link" onClick={this.onSkip}>
|
||||
<a className="btn btn-link" onClick={this.onSkip} aria-label={e2e.pages.Login.selectors.skip}>
|
||||
Skip
|
||||
</a>
|
||||
</Tooltip>
|
||||
|
Loading…
Reference in New Issue
Block a user