Commit 648dda96 by Steven Vachon Committed by GitHub

@grafana/e2e: only skip password reset on local tests (#24411)

parent f37c64c8
......@@ -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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment