mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
@grafana/e2e: only skip password reset on local tests (#24411)
This commit is contained in:
parent
f37c64c80c
commit
648dda96e9
@ -8,9 +8,18 @@ export const login = (username: string = 'admin', password: string = 'admin') =>
|
|||||||
.type(username);
|
.type(username);
|
||||||
e2e.pages.Login.password().type(password);
|
e2e.pages.Login.password().type(password);
|
||||||
e2e.pages.Login.submit().click();
|
e2e.pages.Login.submit().click();
|
||||||
e2e.pages.Login.skip()
|
|
||||||
.should('be.visible')
|
// Local tests will have insecure credentials
|
||||||
.click();
|
e2e()
|
||||||
|
.url()
|
||||||
|
.then(url => {
|
||||||
|
if (/^https?:\/\/localhost/.test(url)) {
|
||||||
|
e2e.pages.Login.skip()
|
||||||
|
.should('be.visible')
|
||||||
|
.click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
e2e()
|
e2e()
|
||||||
.get('.login-page')
|
.get('.login-page')
|
||||||
.should('not.exist');
|
.should('not.exist');
|
||||||
|
Loading…
Reference in New Issue
Block a user