0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/apps/portal/src/App.test.js

36 lines
932 B
JavaScript
Raw Normal View History

import {render} from '@testing-library/react';
2020-09-23 23:29:16 +05:30
import {site} from './utils/fixtures';
import App from './App';
const setup = async () => {
const testState = {
site,
member: null,
action: 'init:success',
brandColor: site.accent_color,
page: 'signup',
initStatus: 'success',
showPopup: true
};
const {...utils} = render(
<App testState={testState} />
2020-04-15 21:15:56 +05:30
);
const triggerButtonFrame = await utils.findByTitle(/portal-trigger/i);
const popupFrame = await utils.findByTitle(/portal-popup/i);
return {
popupFrame,
triggerButtonFrame,
...utils
};
};
2020-04-15 21:15:56 +05:30
describe.skip('App', () => {
test('renders popup and trigger frames', async () => {
const {popupFrame, triggerButtonFrame} = await setup();
expect(popupFrame).toBeInTheDocument();
expect(triggerButtonFrame).toBeInTheDocument();
});
});