diff --git a/ghost/sodo-search/src/App.test.js b/ghost/sodo-search/src/App.test.js index f0d2e304fa..07621dde5f 100644 --- a/ghost/sodo-search/src/App.test.js +++ b/ghost/sodo-search/src/App.test.js @@ -1,9 +1,10 @@ -import {render, screen} from '@testing-library/react'; +import {render} from '@testing-library/react'; import App from './App'; import React from 'react'; test('renders Sodo Search app component', () => { render(); - const linkElement = screen.getByText(/Sodo Search/i); - expect(linkElement).toBeInTheDocument(); + // const containerElement = screen.getElementsByClassName('gh-portal-popup-container'); + const containerElement = document.querySelector('.gh-root-frame'); + expect(containerElement).toBeInTheDocument(); }); diff --git a/ghost/sodo-search/src/components/PopupModal.js b/ghost/sodo-search/src/components/PopupModal.js index 53e24318d7..cfb370adcd 100644 --- a/ghost/sodo-search/src/components/PopupModal.js +++ b/ghost/sodo-search/src/components/PopupModal.js @@ -154,7 +154,7 @@ export default class PopupModal extends React.Component { let className = 'gh-portal-popup-background'; return ( -
+
this.handlePopupClose(e)}>
@@ -164,10 +164,6 @@ export default class PopupModal extends React.Component { } render() { - const {showPopup} = this.context; - if (showPopup) { - return this.renderFrameContainer(); - } - return null; + return this.renderFrameContainer(); } }