aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/enums/EnumsTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/enums/EnumsTest.kt')
-rw-r--r--plugins/base/src/test/kotlin/enums/EnumsTest.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/base/src/test/kotlin/enums/EnumsTest.kt b/plugins/base/src/test/kotlin/enums/EnumsTest.kt
index 9cd41dcd..3d1495fe 100644
--- a/plugins/base/src/test/kotlin/enums/EnumsTest.kt
+++ b/plugins/base/src/test/kotlin/enums/EnumsTest.kt
@@ -6,6 +6,7 @@ import org.jetbrains.dokka.model.DEnum
import org.jetbrains.dokka.model.dfs
import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest
+import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstance
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.Test
@@ -202,7 +203,7 @@ class EnumsTest : AbstractCoreTest() {
configuration
) {
pagesTransformationStage = { m ->
- val entryNode = m.children.first { it.name == "enums" }.children.first { it.name == "Test" }.children.first() as ClasslikePageNode
+ val entryNode = m.children.first { it.name == "enums" }.children.first { it.name == "Test" }.children.firstIsInstance<ClasslikePageNode>()
val signature = (entryNode.content as ContentGroup).dfs { it is ContentGroup && it.dci.toString() == "[enums/Test.E1///PointingToDeclaration/][Cover]" } as ContentGroup
signature.assertNode {