mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
@grafana/e2e: added login credential env vars (#24359)
... for remote instances
This commit is contained in:
parent
ff7db709ab
commit
184941eab4
@ -1,7 +1,7 @@
|
||||
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);
|
||||
};
|
||||
|
@ -1,3 +1,4 @@
|
||||
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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user