Skip to content

Commit 55266b8

Browse files
committed
Update tests for API Collection icon rendering
Updates test assertions to expect API Collections to render as articles with collectionGroup role for correct icon display. The modified test is temporarily skipped until the API Collection icon fix is implemented in the next commit.
1 parent d616aa5 commit 55266b8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Tests/SwiftDocCTests/Rendering/DocumentationContentRendererTests.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,24 @@ class DocumentationContentRendererTests: XCTestCase {
131131
]
132132
)
133133
}
134+
135+
func testRenderKindAndRoleForAPICollection() throws {
136+
throw XCTSkip("TDD: Temporarily disabled while implementing API Collection icon fix")
137+
138+
// API Collections should render as articles with collectionGroup role to display correct icon
139+
let (collectionKind, collectionRole) = DocumentationContentRenderer.renderKindAndRole(.collectionGroup, semantic: nil)
140+
XCTAssertEqual(collectionKind, RenderNode.Kind.article, "API Collections should render as articles, not symbols")
141+
XCTAssertEqual(collectionRole, "collectionGroup", "API Collections should have collectionGroup role for correct icon")
142+
143+
// Verify other node types still work correctly
144+
let (articleKind, articleRole) = DocumentationContentRenderer.renderKindAndRole(.article, semantic: nil)
145+
XCTAssertEqual(articleKind, RenderNode.Kind.article)
146+
XCTAssertEqual(articleRole, "article")
147+
148+
let (symbolKind, symbolRole) = DocumentationContentRenderer.renderKindAndRole(.class, semantic: nil)
149+
XCTAssertEqual(symbolKind, RenderNode.Kind.symbol)
150+
XCTAssertEqual(symbolRole, "symbol")
151+
}
134152
}
135153

136154
private extension DocumentationDataVariantsTrait {

0 commit comments

Comments
 (0)