diff options
Diffstat (limited to 'plugins/base/src/test/kotlin/signatures/DivergentSignatureTest.kt')
-rw-r--r-- | plugins/base/src/test/kotlin/signatures/DivergentSignatureTest.kt | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/plugins/base/src/test/kotlin/signatures/DivergentSignatureTest.kt b/plugins/base/src/test/kotlin/signatures/DivergentSignatureTest.kt index 6471f555..f03103d8 100644 --- a/plugins/base/src/test/kotlin/signatures/DivergentSignatureTest.kt +++ b/plugins/base/src/test/kotlin/signatures/DivergentSignatureTest.kt @@ -1,13 +1,7 @@ package signatures -import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest -import org.jsoup.Jsoup -import org.jsoup.nodes.Element -import org.jsoup.select.Elements import org.junit.jupiter.api.Test -import java.nio.file.Paths import utils.TestOutputWriterPlugin -import kotlin.test.assertEquals class DivergentSignatureTest : AbstractRenderingTest() { @@ -21,10 +15,13 @@ class DivergentSignatureTest : AbstractRenderingTest() { pluginOverrides = listOf(writerPlugin) ) { renderingStage = { _, _ -> - val content = writerPlugin.renderedDivergentContent("example/example/-clock/get-time.html") + val content = writerPlugin.renderedSourceDepenentContent("example/example/-clock/get-time.html") - assert(content.count() == 1) - assert(content.select("[data-filterable-current=example/common example/js example/jvm]").single().brief == "") + assert(content.count() == 3) + val sourceSets = listOf("example/common", "example/js", "example/jvm") + sourceSets.forEach { + assert(content.select("[data-togglable=$it]").single().brief == "") + } } } } @@ -39,10 +36,12 @@ class DivergentSignatureTest : AbstractRenderingTest() { pluginOverrides = listOf(writerPlugin) ) { renderingStage = { _, _ -> - val content = writerPlugin.renderedDivergentContent("example/example/-clock/get-times-in-millis.html") - assert(content.count() == 2) - assert(content.select("[data-filterable-current=example/common example/jvm]").single().brief == "Time in minis") - assert(content.select("[data-filterable-current=example/js]").single().brief == "JS implementation of getTimeInMillis" ) + val content = writerPlugin.renderedSourceDepenentContent("example/example/-clock/get-times-in-millis.html") + + assert(content.count() == 3) + assert(content.select("[data-togglable=example/common]").single().brief == "Time in minis") + assert(content.select("[data-togglable=example/jvm]").single().brief == "Time in minis") + assert(content.select("[data-togglable=example/js]").single().brief == "JS implementation of getTimeInMillis" ) } } } @@ -57,11 +56,11 @@ class DivergentSignatureTest : AbstractRenderingTest() { pluginOverrides = listOf(writerPlugin) ) { renderingStage = { _, _ -> - val content = writerPlugin.renderedDivergentContent("example/example/-clock/get-year.html") + val content = writerPlugin.renderedSourceDepenentContent("example/example/-clock/get-year.html") assert(content.count() == 3) - assert(content.select("[data-filterable-current=example/jvm]").single().brief == "JVM custom kdoc") - assert(content.select("[data-filterable-current=example/js]").single().brief == "JS custom kdoc") - assert(content.select("[data-filterable-current=example/common]").single().brief == "") + assert(content.select("[data-togglable=example/jvm]").single().brief == "JVM custom kdoc") + assert(content.select("[data-togglable=example/js]").single().brief == "JS custom kdoc") + assert(content.select("[data-togglable=example/common]").single().brief == "") } } } |