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
Daniel Lockyer c97cc08455 Updated ESLint config for React+Typescript packages
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
2023-07-27 11:40:31 +02:00

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();
});
});