mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Select: Portal select menu to document.body (#36398)
* ValueMappings: Force overflowing modal content to scroll * ValueMappings: Update unit tests * Select: Portal Select to document.body, close menu on scroll * Select: Fix tests + apply updates from https://github.com/grafana/grafana/pull/32833 * ValueMappingsEditorModal: Revert to using selectEvent in the tests * Select: Fix remaining unit tests * Portal: Rewrite Portal as a functional component so we can use useTheme2 * Modal: Remove modal styles from this PR * Update E2E tests * More unit test fixes * Select: Fix remaining E2E tests * Select: Create util method to select an option in tests
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { select } from 'react-select-event';
|
||||
import { selectOptionInTest } from '@grafana/ui';
|
||||
import { RawInfluxQLEditor } from './RawInfluxQLEditor';
|
||||
import { InfluxQuery } from '../types';
|
||||
|
||||
@@ -57,7 +57,7 @@ describe('RawInfluxQLEditor', () => {
|
||||
const formatSelect = screen.getByLabelText('Format as');
|
||||
expect(formatSelect).toBeInTheDocument();
|
||||
|
||||
await select(formatSelect, 'Time series');
|
||||
await selectOptionInTest(formatSelect, 'Time series');
|
||||
|
||||
expect(onChange).toHaveBeenCalledWith({ ...query, resultFormat: 'time_series' });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user