From 0598517a31fd73ac23224e984597e1e56da934ef Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Wed, 1 Nov 2023 17:41:12 +0200 Subject: [PATCH] add one more test --- .../test/kotlin/content/AllTypesPageTest.kt | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/plugins/base/src/test/kotlin/content/AllTypesPageTest.kt b/plugins/base/src/test/kotlin/content/AllTypesPageTest.kt index 1d52ac6778..6ade6b9238 100644 --- a/plugins/base/src/test/kotlin/content/AllTypesPageTest.kt +++ b/plugins/base/src/test/kotlin/content/AllTypesPageTest.kt @@ -26,7 +26,7 @@ class AllTypesPageTest : BaseAbstractTest() { children.singleOrNull { it is AllTypesPageNode } as? AllTypesPageNode @Test - fun `all types page generated when there are types`() = withAllTypesPage { + fun `all types page generated when there are types`() = withAllTypesPage { testInline( """ |/src/Test.kt @@ -75,7 +75,33 @@ class AllTypesPageTest : BaseAbstractTest() { } @Test - fun `all types page isn't generated when there are NO types`() = withAllTypesPage { + fun `all types isn't generated when not enabled by property`() { + testInline( + """ + |/src/Test.kt + |package sample + |/** + | * Hello World! + | * + | * Some other comment which should not be on All Types page + | */ + |public class Test + | + |/** + | * Hello type + | */ + |public typealias Alias = Int + """.trimIndent(), + configuration + ) { + pagesTransformationStage = { rootPage -> + assertNull(rootPage.allTypesPageNode()) + } + } + } + + @Test + fun `all types page isn't generated when there are NO types`() = withAllTypesPage { testInline( """ |/src/Test.kt @@ -94,7 +120,7 @@ class AllTypesPageTest : BaseAbstractTest() { } @Test - fun `all types sorting depends only on simple name`() = withAllTypesPage { + fun `all types sorting depends only on simple name`() = withAllTypesPage { testInline( """ |/src/A.kt