-
Notifications
You must be signed in to change notification settings - Fork 18
/
App.test.js
30 lines (25 loc) · 918 Bytes
/
App.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import React from 'react';
import { render, screen, waitFor } from '@testing-library/react';
import App from '../source/Application';
import testConfig from '../config/wines.json';
import testData from '../config/wines_data.json';
describe('Eaglescope basic tests', () => {
test('renders title from config', async () => {
const container = render(
<App overrideConfig={testConfig} overrideData={testData}/>
);
await waitFor(() => {
const titleElement = screen.getByText('Eaglescope Demo | Wines');
expect(titleElement).toBeInTheDocument();
});
});
test('renders vis elems', async () => {
const container = render(
<App overrideConfig={testConfig} overrideData={testData}/>
);
await waitFor(() => {
const elements = document.getElementsByClassName('vis-grid-item');
expect(elements.length).toBeGreaterThan(6);
});
});
});