mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -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);
|
||||
e2e.pages.Login.password().type(password);
|
||||
e2e.pages.Login.submit().click();
|
||||
e2e.pages.Login.skip()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
// Local tests will have insecure credentials
|
||||
e2e()
|
||||
.url()
|
||||
.then(url => {
|
||||
if (/^https?:\/\/localhost/.test(url)) {
|
||||
e2e.pages.Login.skip()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
}
|
||||
});
|
||||
|
||||
e2e()
|
||||
.get('.login-page')
|
||||
.should('not.exist');
|
||||
|
Loading…
Reference in New Issue
Block a user