-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathReqRes.test.js
More file actions
42 lines (36 loc) · 1.61 KB
/
ReqRes.test.js
File metadata and controls
42 lines (36 loc) · 1.61 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
beforeAll(async () => {
await page.goto('http://localhost:6969/reqres')
await page.waitForSelector('[data-hydrated]')
})
describe('ReqRes', () => {
test('server functions keep the request', async () => {
await page.waitForSelector('[data-server-function]')
const element = await page.$('[data-server-function]')
expect(element).toBeTruthy()
})
test('nested server functions keep the request', async () => {
await page.waitForSelector('[data-nested-server-function]')
const element = await page.$('[data-nested-server-function]')
expect(element).toBeTruthy()
})
test('server functions keep the request when invoked by the client', async () => {
await page.waitForSelector('[data-server-function-from-client]')
const element = await page.$('[data-server-function-from-client]')
expect(element).toBeTruthy()
})
test('nested server functions keep the request when invoked by the client', async () => {
await page.waitForSelector('[data-nested-server-function-from-client]')
const element = await page.$('[data-nested-server-function-from-client]')
expect(element).toBeTruthy()
})
test('exposed server functions keep the request', async () => {
await page.waitForSelector('[data-exposed-server-function]')
const element = await page.$('[data-exposed-server-function]')
expect(element).toBeTruthy()
})
test('nested exposed server functions keep the request', async () => {
await page.waitForSelector('[data-exposed-nested-server-function]')
const element = await page.$('[data-exposed-nested-server-function]')
expect(element).toBeTruthy()
})
})