mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
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 App from './App';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
test('renders Sodo Search app component', () => {
|
test('renders Sodo Search app component', () => {
|
||||||
render(<App />);
|
render(<App />);
|
||||||
const linkElement = screen.getByText(/Sodo Search/i);
|
// const containerElement = screen.getElementsByClassName('gh-portal-popup-container');
|
||||||
expect(linkElement).toBeInTheDocument();
|
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';
|
let className = 'gh-portal-popup-background';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={Styles.modalContainer}>
|
<div style={Styles.modalContainer} className='gh-root-frame'>
|
||||||
<Frame style={frameStyle} title="portal-popup" head={this.renderFrameStyles()}>
|
<Frame style={frameStyle} title="portal-popup" head={this.renderFrameStyles()}>
|
||||||
<div className={className} onClick = {e => this.handlePopupClose(e)}></div>
|
<div className={className} onClick = {e => this.handlePopupClose(e)}></div>
|
||||||
<PopupContent />
|
<PopupContent />
|
||||||
@ -164,10 +164,6 @@ export default class PopupModal extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {showPopup} = this.context;
|
return this.renderFrameContainer();
|
||||||
if (showPopup) {
|
|
||||||
return this.renderFrameContainer();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user