diff --git a/.betterer.results b/.betterer.results index 43158964214..980d4bc2cb8 100644 --- a/.betterer.results +++ b/.betterer.results @@ -752,20 +752,6 @@ exports[`better eslint`] = { "packages/grafana-ui/src/components/DateTimePickers/TimeRangeInput.tsx:5381": [ [0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"] ], - "packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/CalendarHeader.tsx:5381": [ - [0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"] - ], - "packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimePickerCalendar.tsx:5381": [ - [0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"] - ], - "packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimePickerFooter.tsx:5381": [ - [0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"] - ], - "packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimeRangeContent.tsx:5381": [ - [0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"], - [0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "1"], - [0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "2"] - ], "packages/grafana-ui/src/components/Drawer/Drawer.tsx:5381": [ [0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"] ], diff --git a/packages/grafana-e2e-selectors/src/selectors/components.ts b/packages/grafana-e2e-selectors/src/selectors/components.ts index 6154f3e3bdd..8e3a87ef3bf 100644 --- a/packages/grafana-e2e-selectors/src/selectors/components.ts +++ b/packages/grafana-e2e-selectors/src/selectors/components.ts @@ -16,13 +16,13 @@ export const Components = { TimePicker: { openButton: 'data-testid TimePicker Open Button', overlayContent: 'data-testid TimePicker Overlay Content', - fromField: 'Time Range from field', - toField: 'Time Range to field', + fromField: 'data-testid Time Range from field', + toField: 'data-testid Time Range to field', applyTimeRange: 'data-testid TimePicker submit button', calendar: { - label: 'Time Range calendar', - openButton: 'Open time range calendar', - closeButton: 'Close time range Calendar', + label: 'data-testid Time Range calendar', + openButton: 'data-testid Open time range calendar', + closeButton: 'data-testid Close time range Calendar', }, absoluteTimeRangeTitle: 'data-testid-absolute-time-range-narrow', }, diff --git a/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/CalendarFooter.tsx b/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/CalendarFooter.tsx index 4db12f18893..1f5ab28cff4 100644 --- a/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/CalendarFooter.tsx +++ b/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/CalendarFooter.tsx @@ -1,44 +1,23 @@ -import { css } from '@emotion/css'; import React from 'react'; -import { GrafanaTheme2 } from '@grafana/data'; - -import { useStyles2 } from '../../../themes'; import { Trans } from '../../../utils/i18n'; import { Button } from '../../Button'; +import { Stack } from '../../Layout/Stack/Stack'; import { TimePickerCalendarProps } from './TimePickerCalendar'; export function Footer({ onClose, onApply }: TimePickerCalendarProps) { - const styles = useStyles2(getFooterStyles); - return ( -