From 3f95258ac8d287bce3de6d1d50ce2bc878f5ed63 Mon Sep 17 00:00:00 2001 From: Matt Seddon Date: Mon, 4 Nov 2024 10:09:21 +1100 Subject: [PATCH] fix act warnings --- webview/src/plots/components/App.test.tsx | 2 +- .../plots/components/comparisonTable/ComparisonTable.test.tsx | 2 +- webview/src/test/dragDrop.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webview/src/plots/components/App.test.tsx b/webview/src/plots/components/App.test.tsx index eada042721..a7e066872f 100644 --- a/webview/src/plots/components/App.test.tsx +++ b/webview/src/plots/components/App.test.tsx @@ -3,6 +3,7 @@ import { configureStore } from '@reduxjs/toolkit' import React from 'react' import { Provider } from 'react-redux' import { + act, createEvent, fireEvent, render, @@ -31,7 +32,6 @@ import { MessageFromWebviewType, MessageToWebviewType } from 'dvc/src/webview/contract' -import { act } from 'react-dom/test-utils' import { App } from './App' import { NewSectionBlock } from './templatePlots/TemplatePlots' import { diff --git a/webview/src/plots/components/comparisonTable/ComparisonTable.test.tsx b/webview/src/plots/components/comparisonTable/ComparisonTable.test.tsx index 7e38b0c0e5..c8e10c06be 100644 --- a/webview/src/plots/components/comparisonTable/ComparisonTable.test.tsx +++ b/webview/src/plots/components/comparisonTable/ComparisonTable.test.tsx @@ -1,6 +1,7 @@ import { configureStore } from '@reduxjs/toolkit' import '@testing-library/jest-dom' import { + act, fireEvent, render, RenderResult, @@ -13,7 +14,6 @@ import comparisonTableFixture from 'dvc/src/test/fixtures/plotsDiff/comparison' import plotsRevisionsFixture from 'dvc/src/test/fixtures/plotsDiff/revisions' import React from 'react' import { Revision } from 'dvc/src/plots/webview/contract' -import { act } from 'react-dom/test-utils' import { ComparisonTable } from './ComparisonTable' import { comparisonTableInitialState, diff --git a/webview/src/test/dragDrop.ts b/webview/src/test/dragDrop.ts index b4552565e6..f1017e3000 100644 --- a/webview/src/test/dragDrop.ts +++ b/webview/src/test/dragDrop.ts @@ -1,4 +1,4 @@ -import { act } from 'react-dom/test-utils' +import { act } from '@testing-library/react' import { DragEnterDirection } from '../shared/components/dragDrop/util' import { idToNode } from '../util/helpers'