Fixed App test
This commit is contained in:
parent
ca4a3dc8d0
commit
905f4ba964
@ -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(<App />);
|
||||
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();
|
||||
});
|
||||
|
@ -154,7 +154,7 @@ export default class PopupModal extends React.Component {
|
||||
let className = 'gh-portal-popup-background';
|
||||
|
||||
return (
|
||||
<div style={Styles.modalContainer}>
|
||||
<div style={Styles.modalContainer} className='gh-root-frame'>
|
||||
<Frame style={frameStyle} title="portal-popup" head={this.renderFrameStyles()}>
|
||||
<div className={className} onClick = {e => this.handlePopupClose(e)}></div>
|
||||
<PopupContent />
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user