Commit 184941ea by Steven Vachon Committed by GitHub

@grafana/e2e: added login credential env vars (#24359)

... for remote instances
parent ff7db709
import { e2e } from '../index';
export const login = (username: string, password: string) => {
e2e().logToConsole('Trying to login with:', { username, password });
export const login = (username: string = 'admin', password: string = 'admin') => {
e2e().logToConsole('Trying to login with username:', username);
e2e.pages.Login.visit();
e2e.pages.Login.username()
.should('be.visible') // prevents flakiness
......@@ -14,5 +14,5 @@ export const login = (username: string, password: string) => {
e2e()
.get('.login-page')
.should('not.exist');
e2e().logToConsole('Logged in with', { username, password });
e2e().logToConsole('Logged in with username:', username);
};
import { e2e } from '../';
import { Flows } from '../flows';
import { getScenarioContext } from './scenarioContext';
......@@ -23,7 +24,7 @@ export const e2eScenario = ({
it.skip(itName, () => scenario());
} else {
beforeEach(() => {
Flows.login('admin', 'admin');
Flows.login(e2e.env('USERNAME'), e2e.env('PASSWORD'));
if (addScenarioDataSource) {
Flows.addDataSource();
}
......
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