How to use the @grafana/e2e.e2e.getSelectors function in @grafana/e2e

To help you get started, we’ve selected a few @grafana/e2e examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github grafana / github-datasource / cypress / integration / smoke.spec.ts View on Github external
import { e2e } from '@grafana/e2e';
import { PartialConfigurePanelConfig } from '@grafana/e2e/flows/configurePanel';
import { selectors } from '../../src/components/selectors';

const e2eSelectors = e2e.getSelectors(selectors.components);

const addGithubDataSource = (accessToken: string) => {
  return e2e.flows.addDataSource({
    checkHealth: true,
    expectedAlertMessage: 'OK',
    form: () => {
      e2eSelectors.ConfigEditor.AccessToken.input()
        .scrollIntoView()
        .type(accessToken);
    },
    type: 'GitHub',
  });
};

const addGithubPanel = (variableName: string) => {
  const fillQueryEditor = () => {