mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 16:01:40 +03: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
27 lines
1.1 KiB
JavaScript
27 lines
1.1 KiB
JavaScript
import {render} from '@testing-library/react';
|
|
import App from './App';
|
|
import React from 'react';
|
|
import nock from 'nock';
|
|
|
|
test('renders Sodo Search app component', () => {
|
|
nock('http://localhost:3000/ghost/api/content')
|
|
.get('/posts/?key=69010382388f9de5869ad6e558&limit=10000&fields=id%2Cslug%2Ctitle%2Cexcerpt%2Curl%2Cupdated_at%2Cvisibility&order=updated_at%20DESC')
|
|
.reply(200, {
|
|
posts: []
|
|
})
|
|
.get('/authors/?key=69010382388f9de5869ad6e558&limit=10000&fields=id,slug,name,url,profile_image&order=updated_at%20DESC')
|
|
.reply(200, {
|
|
authors: []
|
|
})
|
|
.get('/tags/?key=69010382388f9de5869ad6e558&&limit=10000&fields=id,slug,name,url&order=updated_at%20DESC&filter=visibility%3Apublic')
|
|
.reply(200, {
|
|
tags: []
|
|
});
|
|
|
|
window.location.hash = '#/search';
|
|
render(<App adminUrl="http://localhost:3000" apiKey="69010382388f9de5869ad6e558" />);
|
|
// const containerElement = screen.getElementsByClassName('gh-portal-popup-container');
|
|
const containerElement = document.querySelector('.gh-root-frame');
|
|
expect(containerElement).toBeInTheDocument();
|
|
});
|