Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore(recorder): update to React 18 (#32101)
Simon Knott45c2e8a3edb1
diff --git a/packages/recorder/src/index.tsx b/packages/recorder/src/index.tsxindex 9d55f8608a..5956eab725 100644--- a/packages/recorder/src/index.tsx+++ b/packages/recorder/src/index.tsx@@ -17,11 +17,10 @@import '@web/common.css';import { applyTheme } from '@web/theme';import '@web/third_party/vscode/codicon.css';-import * as React from 'react';-import * as ReactDOM from 'react-dom';+import * as ReactDOM from 'react-dom/client';import { Main } from './main';(async () => {applyTheme();- ReactDOM.render(<Main/>, document.querySelector('#root'));+ ReactDOM.createRoot(document.querySelector('#root')!).render(<Main/>);})();diff --git a/packages/recorder/src/main.tsx b/packages/recorder/src/main.tsxindex 5980716d1e..2f7ea3ac4c 100644--- a/packages/recorder/src/main.tsx+++ b/packages/recorder/src/main.tsx@@ -30,12 +30,14 @@ export const Main: React.FC = ({window.playwrightSetSources = setSources;window.playwrightSetPaused = setPaused;window.playwrightUpdateLogs = callLogs => {- const newLog = new Map<string, CallLog>(log);- for (const callLog of callLogs) {- callLog.reveal = !log.has(callLog.id);- newLog.set(callLog.id, callLog);- }- setLog(newLog);+ setLog(log => {+ const newLog = new Map<string, CallLog>(log);+ for (const callLog of callLogs) {+ callLog.reveal = !log.has(callLog.id);+ newLog.set(callLog.id, callLog);+ }+ return newLog;+ });};window.playwrightSourcesEchoForTest = sources;diff --git a/utils/check_deps.js b/utils/check_deps.jsindex fcfb278a18..8943ca6800 100644--- a/utils/check_deps.js+++ b/utils/check_deps.js@@ -31,7 +31,7 @@ packages.set('injected', packagesDir + '/playwright-core/src/server/injected/');packages.set('isomorphic', packagesDir + '/playwright-core/src/utils/isomorphic/');packages.set('testIsomorphic', packagesDir + '/playwright/src/isomorphic/');-const peerDependencies = ['electron', 'react', 'react-dom', '@zip.js/zip.js'];+const peerDependencies = ['electron', 'react', 'react-dom', 'react-dom/client', '@zip.js/zip.js'];const depsCache = {};