1
0
mirror of synced 2025-12-22 11:26:57 -05:00

temporarily re-introduct includes/rest_operations_at_current_path.html (#25719)

This commit is contained in:
Peter Bengtsson
2022-03-01 08:32:30 -05:00
committed by GitHub
parent e81b8b39e9
commit e69144b51f
2 changed files with 25 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
{% comment %}
We need this file to exist until all translations have caught up.
You can delete this when you can no longer find any
references at all for 'rest_operations_at_current_path' anywhere.
{% endcomment %}

View File

@@ -6,7 +6,7 @@ import { loadPages } from '../../lib/page-data.js'
import CspParse from 'csp-parse' import CspParse from 'csp-parse'
import { productMap } from '../../lib/all-products.js' import { productMap } from '../../lib/all-products.js'
import { SURROGATE_ENUMS } from '../../middleware/set-fastly-surrogate-key.js' import { SURROGATE_ENUMS } from '../../middleware/set-fastly-surrogate-key.js'
import { jest } from '@jest/globals' import { describe, jest } from '@jest/globals'
import { languageKeys } from '../../lib/languages.js' import { languageKeys } from '../../lib/languages.js'
const AZURE_STORAGE_URL = 'githubdocs.azureedge.net' const AZURE_STORAGE_URL = 'githubdocs.azureedge.net'
@@ -1101,3 +1101,22 @@ describe('index pages', () => {
expect($(`a[href^="${installationLatest}/"]`).length).toBeGreaterThan(0) expect($(`a[href^="${installationLatest}/"]`).length).toBeGreaterThan(0)
}) })
}) })
describe('REST reference pages', () => {
test('view the rest/repos page in English', async () => {
const res = await get('/en/rest/reference/repos')
expect(res.statusCode).toBe(200)
})
test('view the rest/repos page in Japanese', async () => {
const res = await get('/ja/rest/reference/repos')
expect(res.statusCode).toBe(200)
})
test('deeper pages in English', async () => {
const res = await get('/ja/enterprise-cloud@latest/rest/reference/code-scanning')
expect(res.statusCode).toBe(200)
})
test('deeper pages in Japanese', async () => {
const res = await get('/en/enterprise-cloud@latest/rest/reference/code-scanning')
expect(res.statusCode).toBe(200)
})
})