fix: better styling for docs

This commit is contained in:
hugo committed 2026-05-04 07:01:43 +02:00
1 parent cb46b45cda
commit 6b6c985187
7 files changed
+3602 -1107

No files matched your search

+2
View File
@@ -1047,6 +1047,7 @@ defmodule BDS.Desktop.ShellLiveTest do
assert has_element?(view, ".tab[data-tab-type='documentation'] .tab-title", "Documentation")
assert has_element?(view, "[data-testid='help-documentation']")
assert has_element?(view, ".documentation-content.markdown-body .documentation-article")
assert render(view) =~ "bDS2 User Guide"
end
@@ -1067,6 +1068,7 @@ defmodule BDS.Desktop.ShellLiveTest do
)
assert has_element?(view, "[data-testid='help-api-documentation']")
assert has_element?(view, ".documentation-content.markdown-body .documentation-article")
assert render(view) =~ "API Documentation"
assert render(view) =~ "local result = bds.posts.get"
end
@@ -1,6 +1,16 @@
defmodule BDS.Scripting.ApiDocumentationTest do
use ExUnit.Case, async: true
test "rendered API docs include richer module indexes and example responses" do
rendered = BDS.Scripting.ApiDocs.render()
assert rendered =~ "**Module APIs**"
assert rendered =~ "- [projects.create](#projectscreate)"
assert rendered =~ "**Example response**"
assert rendered =~ "- Data structures: `ProjectData`"
assert rendered =~ "[↑ Back to Table of contents](#table-of-contents)"
end
test "API.md matches the generated Lua scripting contract" do
api_doc_path = Path.expand("../../../API.md", __DIR__)