forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.js
More file actions
24 lines (20 loc) · 1.02 KB
/
footer.js
File metadata and controls
24 lines (20 loc) · 1.02 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
const { getDOM } = require('../helpers/supertest')
const enterpriseServerReleases = require('../../lib/enterprise-server-releases')
const nonEnterpriseDefaultVersion = require('../../lib/non-enterprise-default-version')
describe('footer', () => {
jest.setTimeout(10 * 60 * 1000)
describe('"contact us" link', () => {
test('leads to dotcom support on dotcom pages', async () => {
const $ = await getDOM(`/en/${nonEnterpriseDefaultVersion}/github`)
expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact')
})
test('leads to Enterprise support on Enterprise pages', async () => {
const $ = await getDOM(`/en/enterprise/${enterpriseServerReleases.latest}`)
expect($('a#contact-us').attr('href')).toBe('https://enterprise.github.com/support')
})
test('leads to dotcom support on 404 pages', async () => {
const $ = await getDOM('/en/delicious-snacks/donuts.php')
expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact')
})
})
})