-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathContextEnvironment.test.js
More file actions
47 lines (39 loc) · 1.36 KB
/
ContextEnvironment.test.js
File metadata and controls
47 lines (39 loc) · 1.36 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
43
44
45
46
47
beforeAll(async () => {
await page.goto('http://localhost:6969/context-environment')
})
describe('ContextEnvironment', () => {
test('is part of the client context', async () => {
const element = await page.$('[data-environment]')
expect(element).toBeTruthy()
})
test('has a client key', async () => {
await page.waitForSelector('[data-client="true"]')
const element = await page.$('[data-client="true"]')
expect(element).toBeTruthy()
})
test('has a server key', async () => {
await page.waitForSelector('[data-server="false"]')
const element = await page.$('[data-server="false"]')
expect(element).toBeTruthy()
})
test('has a development key', async () => {
const element = await page.$('[data-development="false"]')
expect(element).toBeTruthy()
})
test('has a production key', async () => {
const element = await page.$('[data-production="true"]')
expect(element).toBeTruthy()
})
test('has a static key', async () => {
const element = await page.$('[data-static="false"]')
expect(element).toBeTruthy()
})
test('has a key with the environment hash', async () => {
const element = await page.$('[data-key]')
expect(element).toBeTruthy()
})
test('has a key with the environment name', async () => {
const element = await page.$('[data-name=""]')
expect(element).toBeTruthy()
})
})