diff options
author | vmishenev <vad-mishenev@yandex.ru> | 2021-10-15 17:26:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 17:26:44 +0300 |
commit | 53064bdd310a9d9e18efe2865e21b11f9337a8f6 (patch) | |
tree | 2b6e4cbbbd4a56120742fb2560b55076b72e7637 /plugins/base/src/test/kotlin/signatures/DivergentSignatureTest.kt | |
parent | dc54ebd087124ee9035585ac64fa85c9b8957081 (diff) | |
download | dokka-53064bdd310a9d9e18efe2865e21b11f9337a8f6.tar.gz dokka-53064bdd310a9d9e18efe2865e21b11f9337a8f6.tar.bz2 dokka-53064bdd310a9d9e18efe2865e21b11f9337a8f6.zip |
Keep UI tabs (#2179)
* Keep ui tabs
* Group functions by description
* Fix tests for keeping ui tabs
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 == "") } } } |