Merge branch 'main' into default-platform
This commit is contained in:
@@ -15,6 +15,7 @@ const ALLOW_LIST = new Set([
|
||||
'platform-samples',
|
||||
'github-services',
|
||||
'explore',
|
||||
'enterprise-releases',
|
||||
'markup',
|
||||
'hubot',
|
||||
'VisualStudio',
|
||||
@@ -48,7 +49,8 @@ describe('check for repository references', () => {
|
||||
'docs/index.yaml',
|
||||
'lib/excluded-links.js',
|
||||
'content/early-access',
|
||||
'data/early-access'
|
||||
'data/early-access',
|
||||
'data/release-notes' // These include links to internal issues in Liquid comments
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
@@ -11,11 +11,14 @@ describe('enterprise release notes', () => {
|
||||
})
|
||||
|
||||
it('redirects to the release notes on enterprise.github.com if none are present for this version here', async () => {
|
||||
const res = await get('/en/enterprise-server@2.21/admin/release-notes')
|
||||
const res = await get('/en/enterprise-server@2.19/admin/release-notes')
|
||||
expect(res.statusCode).toBe(302)
|
||||
expect(res.headers.location).toBe('https://enterprise.github.com/releases/2.21.0/notes')
|
||||
expect(res.headers.location).toBe('https://enterprise.github.com/releases/2.19.0/notes')
|
||||
})
|
||||
|
||||
// We can't write this test until we have real release notes
|
||||
it.todo('renders the release-notes layout if this version\'s release notes are in this repo')
|
||||
it('renders the release-notes layout if this version\'s release notes are in this repo', async () => {
|
||||
const res = await get('/en/enterprise-server@2.22/admin/release-notes')
|
||||
expect(res.statusCode).toBe(200)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -23,6 +23,7 @@ describe('redirects', () => {
|
||||
basePath: path.join(__dirname, '../../content'),
|
||||
languageCode: 'en'
|
||||
})
|
||||
page.buildRedirects()
|
||||
expect(isPlainObject(page.redirects)).toBe(true)
|
||||
})
|
||||
|
||||
@@ -32,6 +33,7 @@ describe('redirects', () => {
|
||||
basePath: path.join(__dirname, '../../content'),
|
||||
languageCode: 'en'
|
||||
})
|
||||
page.buildRedirects()
|
||||
expect(page.redirects['/articles']).toBe(`/en/${nonEnterpriseDefaultVersion}/github`)
|
||||
expect(page.redirects['/en/articles']).toBe(`/en/${nonEnterpriseDefaultVersion}/github`)
|
||||
expect(page.redirects['/common-issues-and-questions']).toBe(`/en/${nonEnterpriseDefaultVersion}/github`)
|
||||
@@ -46,6 +48,7 @@ describe('redirects', () => {
|
||||
basePath: path.join(__dirname, '../../content'),
|
||||
languageCode: 'en'
|
||||
})
|
||||
page.buildRedirects()
|
||||
const expected = `/en/${nonEnterpriseDefaultVersion}/github/collaborating-with-issues-and-pull-requests/about-conversations-on-github`
|
||||
expect(page.redirects['/en/articles/about-discussions-in-issues-and-pull-requests']).toBe(expected)
|
||||
})
|
||||
|
||||
@@ -149,12 +149,7 @@ describe('pages module', () => {
|
||||
})
|
||||
|
||||
test('has an identical key list to the deep permalinks of the array', async () => {
|
||||
const allPermalinks = pages.flatMap(page => page.permalinks.map(pl => {
|
||||
if (pl.href === '/es/enterprise-server@2.22/insights/installing-and-configuring-github-insights/updating-github-insights') {
|
||||
console.log('Source page:', page.relativePath)
|
||||
}
|
||||
return pl.href
|
||||
})).sort()
|
||||
const allPermalinks = pages.flatMap(page => page.permalinks.map(pl => pl.href)).sort()
|
||||
const allPageUrls = Object.keys(pageMap).sort()
|
||||
|
||||
expect(allPageUrls).toEqual(allPermalinks)
|
||||
|
||||
Reference in New Issue
Block a user