test_docs: Remove help specific tests and port rest over to /api.

We do not test relative links here since relative links were only
used in the old help pages. We should probably remove the logic
for relative links after we have done the official cutover to the
starlight help center: #35654.
This commit is contained in:
Shubham Padia
2025-08-08 10:59:26 +00:00
committed by Tim Abbott
parent 075809b93e
commit 5f9860776f
3 changed files with 24 additions and 72 deletions

View File

@@ -100,7 +100,10 @@ class MarkdownDirectoryView(ApiURLView):
http_status = 200
if article == "":
article = "index"
elif article == "include/sidebar_index":
# Only help center has this article nested inside an include,
# after switching to the new help center, we should remove this
# elif block.
elif article == "include/sidebar_index": # nocoverage.
pass
elif article == "api-doc-template":
# This markdown template shouldn't be accessed directly.
@@ -190,7 +193,10 @@ class MarkdownDirectoryView(ApiURLView):
settings.DEPLOY_ROOT, "templates", documentation_article.article_path
)
if self.help_view:
# The nocoverage blocks here are very temporary since this
# whole block will be removed once we switch to the new help
# center.
if self.help_view: # nocoverage
context["page_is_help_center"] = True
context["doc_root"] = "/help/"
context["doc_root_title"] = "Help center"