From 379d1bfdb214f5ecbfef6e64435dd4526d35fd85 Mon Sep 17 00:00:00 2001 From: Lachlan Miller Date: Wed, 10 Mar 2021 14:41:55 +1000 Subject: [PATCH] chore: fix tests --- npm/react/cypress/component/viewport-spec.jsx | 2 +- packages/runner-ct/src/app/RunnerCt.tsx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/npm/react/cypress/component/viewport-spec.jsx b/npm/react/cypress/component/viewport-spec.jsx index 75d9702d6fb6..836dd6598054 100644 --- a/npm/react/cypress/component/viewport-spec.jsx +++ b/npm/react/cypress/component/viewport-spec.jsx @@ -31,7 +31,7 @@ describe('cy.viewport', () => { minima libero vel? Nam sequi iusto quod fugit vel rerum eligendi beatae voluptatibus numquam.

) - expect(getComputedStyle(window.parent.document.querySelector('iframe').parentElement).transform).to.contain('matrix(1') + expect(getComputedStyle(window.parent.document.querySelector('iframe').parentElement).transform).to.contain('matrix(0.8') cy.viewport(2000, 200).should(() => { expect(getComputedStyle(window.parent.document.querySelector('iframe').parentElement).transform).not.to.contain('matrix(1') }) diff --git a/packages/runner-ct/src/app/RunnerCt.tsx b/packages/runner-ct/src/app/RunnerCt.tsx index 121ea86b2844..8bb74b369653 100644 --- a/packages/runner-ct/src/app/RunnerCt.tsx +++ b/packages/runner-ct/src/app/RunnerCt.tsx @@ -52,15 +52,13 @@ export const AUT_IFRAME_MARGIN = { const App: React.FC = observer( function App (props: AppProps) { - const searchRef = React.createRef(null) + const searchRef = React.useRef(null) const splitPaneRef = React.useRef<{ splitPane: HTMLDivElement }>(null) const pluginRootContainer = React.useRef(null) const { state, eventManager, config } = props const isOpenMode = !config.isTextTerminal - const [isResizing, setIsResizing] = React.useState(false) - const [isSpecsListOpen, setIsSpecsListOpen] = React.useState(isOpenMode) // const windowSize = useWindowSize()