Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/rest/RestOperationHeading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ type Props = {
export function RestOperationHeading({ slug, title, descriptionHTML }: Props) {
return (
<>
<h3 id={slug}>
<h2 id={slug}>
<a href={`#${slug}`}>
<LinkIcon size={16} className="m-1" />
</a>
{title}
</h3>
</h2>
<div dangerouslySetInnerHTML={{ __html: descriptionHTML }} />
</>
)
Expand Down
8 changes: 4 additions & 4 deletions tests/rendering/rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import { getDiffOpenAPIContentRest } from '../../script/rest/test-open-api-schem
describe('REST references docs', () => {
jest.setTimeout(3 * 60 * 1000)

// Checks that every version of the /rest/references/checks
// Checks that every version of the /rest/checks
// page has every operation defined in the openapi schema.
test('loads schema data for all versions', async () => {
for (const version in allVersions) {
const checksRestOperations = await getRest(version, 'checks', 'runs')
const $ = await getDOM(`/en/${version}/rest/checks/runs`)
const domH3Ids = $('h3')
.map((i, h3) => $(h3).attr('id'))
const domH2Ids = $('h2')
.map((i, h2) => $(h2).attr('id'))
.get()
const schemaSlugs = checksRestOperations.map((operation) => slugger.slug(operation.title))
expect(schemaSlugs.every((slug) => domH3Ids.includes(slug))).toBe(true)
expect(schemaSlugs.every((slug) => domH2Ids.includes(slug))).toBe(true)
}
})

Expand Down