mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
e2e: creates a separate package for selectors (#23858)
* Initial commit * Chore: fixes after merge * Chore: removes todos * Chore: uncomment test * Chore: adds missing externals to rollup config * Refactor: selectors is master for everything * Docs: updates Docs * Chore: adds e2e-selectors to publish
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import angular, { ILocationService } from 'angular';
|
||||
import _ from 'lodash';
|
||||
import { e2e } from '@grafana/e2e';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { VariableSrv } from 'app/features/templating/all';
|
||||
import { CoreEvents } from '../../../../types';
|
||||
|
||||
@@ -9,7 +9,7 @@ export class SubMenuCtrl {
|
||||
variables: any;
|
||||
dashboard: any;
|
||||
submenuEnabled: boolean;
|
||||
selectors: typeof e2e.pages.Dashboard.SubMenu.selectors;
|
||||
selectors: typeof selectors.pages.Dashboard.SubMenu;
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private variableSrv: VariableSrv, private $location: ILocationService) {
|
||||
@@ -19,7 +19,7 @@ export class SubMenuCtrl {
|
||||
this.dashboard.events.on(CoreEvents.submenuVisibilityChanged, (enabled: boolean) => {
|
||||
this.submenuEnabled = enabled;
|
||||
});
|
||||
this.selectors = e2e.pages.Dashboard.SubMenu.selectors;
|
||||
this.selectors = selectors.pages.Dashboard.SubMenu;
|
||||
}
|
||||
|
||||
annotationStateChanged() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, useEffect, useState } from 'react';
|
||||
import { VariableHide, VariableModel } from '../../../templating/types';
|
||||
import { e2e } from '@grafana/e2e';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { PickerRenderer } from '../../../variables/pickers/PickerRenderer';
|
||||
|
||||
interface Props {
|
||||
@@ -24,7 +24,7 @@ export const SubMenuItems: FunctionComponent<Props> = ({ variables }) => {
|
||||
<div
|
||||
key={variable.id}
|
||||
className="submenu-item gf-form-inline"
|
||||
aria-label={e2e.pages.Dashboard.SubMenu.selectors.submenuItem}
|
||||
aria-label={selectors.pages.Dashboard.SubMenu.submenuItem}
|
||||
>
|
||||
<PickerRenderer variable={variable} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user