mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
c97cc08455
refs https://github.com/TryGhost/DevOps/issues/50 - `react-app` comes from `eslint-config-react-app`, which is a CRA package - we're moving away from that so this commit switches the linting over to a more recently updated plugin - once that was removed, we started using a newer version of `@typescript-eslint/eslint-plugin`, so there were plenty of updates/exemptions to make
35 lines
932 B
JavaScript
35 lines
932 B
JavaScript
import {render} from '@testing-library/react';
|
|
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} />
|
|
);
|
|
|
|
const triggerButtonFrame = await utils.findByTitle(/portal-trigger/i);
|
|
const popupFrame = await utils.findByTitle(/portal-popup/i);
|
|
return {
|
|
popupFrame,
|
|
triggerButtonFrame,
|
|
...utils
|
|
};
|
|
};
|
|
|
|
describe.skip('App', () => {
|
|
test('renders popup and trigger frames', async () => {
|
|
const {popupFrame, triggerButtonFrame} = await setup();
|
|
|
|
expect(popupFrame).toBeInTheDocument();
|
|
expect(triggerButtonFrame).toBeInTheDocument();
|
|
});
|
|
});
|