* Remove json.parse(json.stringify( usage to improve performance * Fix missing / duplicate keys in some renders * Fix missing react-is dependency (only seemed to cause problems from pruning on the heroku deploy) * Add nextjs tag to datadog-connect config when nextjs is a query param * Fix router.asPath usage to exclude query param * Fix styling inconsistencies noticed when testing * Add a few tests
32 lines
1.3 KiB
JavaScript
32 lines
1.3 KiB
JavaScript
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')
|
|
})
|
|
})
|
|
|
|
describe('"contact us" link with nextjs', () => {
|
|
test('leads to dotcom support on dotcom pages', async () => {
|
|
const $ = await getDOM(`/en/${nonEnterpriseDefaultVersion}/github?nextjs=`)
|
|
expect($('a#contact-us').attr('href')).toBe('https://support.github.com/contact')
|
|
})
|
|
})
|
|
})
|