Passed
Push — master ( bedc68...139be6 )
by
unknown
04:13
created

test/functional/app.test.ts   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 26
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 21
mnd 0
bc 0
fnc 1
dl 0
loc 26
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10

1 Function

Rating   Name   Duplication   Size   Complexity  
A app.test.ts ➔ byTestId 0 3 1
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