Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 26 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { Mockiavelli } from 'mockiavelli'; |
||
2 | import { mockGetEnvironments, mockGetServices } from './requests-mocks'; |
||
3 | import config from '../../jest-puppeteer.config'; |
||
4 | |||
5 | describe('App', () => { |
||
6 | let mockiavelli: Mockiavelli; |
||
7 | |||
8 | beforeEach(async () => { |
||
9 | await jestPuppeteer.resetPage(); |
||
10 | |||
11 | mockiavelli = await Mockiavelli.setup(page); |
||
12 | mockGetEnvironments(mockiavelli); |
||
13 | mockGetServices(mockiavelli); |
||
14 | |||
15 | await page.goto(`http://localhost:${config.server.port}`); |
||
16 | }); |
||
17 | |||
18 | test('Basic test', async () => { |
||
19 | await page.waitForSelector(byTestId('label')); |
||
20 | }); |
||
21 | }); |
||
22 | |||
23 | function byTestId(testId: string) { |
||
24 | return `[data-test-id="${testId}"]`; |
||
25 | } |
||
26 |