mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Upgrade @testing-library/user-event to v14 (#47898)
* Update dependency @testing-library/user-event to v14
* everything is async...
* everything is async pt.2
* Fix cascader tests
* hack the yarn.lock file to remove the old version of @testing-library/dom
* some more fixes!
* MOAR FIXES
* more fixes
* remove a bunch of places where we're wrapping in act()
* down to 7 failing tests...
* Fix arrow tests
* Fix rest of NavBarItem tests
* Fix last tests
* Use {Enter} instead of {enter}
* Revert "Use {Enter} instead of {enter}"
This reverts commit e72453bb52.
* remove some unused act imports
* Fix LibraryPanelsSearch tests
* more stable test
* More consistent test...
Co-authored-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
@@ -33,13 +33,13 @@ describe('TransformationsEditor', () => {
|
||||
options: {},
|
||||
},
|
||||
]);
|
||||
const editors = screen.getAllByLabelText(/^Transformation editor/g);
|
||||
const editors = screen.getAllByLabelText(/^Transformation editor/);
|
||||
expect(editors).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when Add transformation clicked', () => {
|
||||
it('renders transformations picker', () => {
|
||||
it('renders transformations picker', async () => {
|
||||
const buttonLabel = 'Add transformation';
|
||||
setup([
|
||||
{
|
||||
@@ -49,7 +49,7 @@ describe('TransformationsEditor', () => {
|
||||
]);
|
||||
|
||||
const addTransformationButton = screen.getByText(buttonLabel);
|
||||
userEvent.click(addTransformationButton);
|
||||
await userEvent.click(addTransformationButton);
|
||||
|
||||
const search = screen.getByLabelText(selectors.components.Transforms.searchInput);
|
||||
expect(search).toBeDefined();
|
||||
@@ -58,7 +58,7 @@ describe('TransformationsEditor', () => {
|
||||
|
||||
describe('actions', () => {
|
||||
describe('debug', () => {
|
||||
it('should show/hide debugger', () => {
|
||||
it('should show/hide debugger', async () => {
|
||||
setup([
|
||||
{
|
||||
id: 'reduce',
|
||||
@@ -70,7 +70,7 @@ describe('TransformationsEditor', () => {
|
||||
expect(screen.queryByLabelText(debuggerSelector)).toBeNull();
|
||||
|
||||
const debugButton = screen.getByLabelText(selectors.components.QueryEditorRow.actionButton('Debug'));
|
||||
userEvent.click(debugButton);
|
||||
await userEvent.click(debugButton);
|
||||
|
||||
expect(screen.getByLabelText(debuggerSelector)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user