From e69144b51fb28b541c55c4e4c6f3cb83dca1942c Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 1 Mar 2022 08:32:30 -0500 Subject: [PATCH] temporarily re-introduct includes/rest_operations_at_current_path.html (#25719) --- includes/rest_operations_at_current_path.html | 5 +++++ tests/rendering/server.js | 21 ++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 includes/rest_operations_at_current_path.html diff --git a/includes/rest_operations_at_current_path.html b/includes/rest_operations_at_current_path.html new file mode 100644 index 0000000000..5dcdba099e --- /dev/null +++ b/includes/rest_operations_at_current_path.html @@ -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 %} diff --git a/tests/rendering/server.js b/tests/rendering/server.js index 9b235bf94e..63dd51be51 100644 --- a/tests/rendering/server.js +++ b/tests/rendering/server.js @@ -6,7 +6,7 @@ import { loadPages } from '../../lib/page-data.js' import CspParse from 'csp-parse' import { productMap } from '../../lib/all-products.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' const AZURE_STORAGE_URL = 'githubdocs.azureedge.net' @@ -1101,3 +1101,22 @@ describe('index pages', () => { 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) + }) +})