aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/renderers/html
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-04-07 16:49:56 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-04-22 13:10:48 +0200
commit089113e352ecd49216602bb1a02fbfada6a40788 (patch)
treed406cc2e7dcb8f575d75320089b55bc2006d2791 /plugins/base/src/test/kotlin/renderers/html
parent720c50fb7f4bf4ae4b4d4c406cfb958a7fba8ffb (diff)
downloaddokka-089113e352ecd49216602bb1a02fbfada6a40788.tar.gz
dokka-089113e352ecd49216602bb1a02fbfada6a40788.tar.bz2
dokka-089113e352ecd49216602bb1a02fbfada6a40788.zip
Fixes tests
Diffstat (limited to 'plugins/base/src/test/kotlin/renderers/html')
-rw-r--r--plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt29
-rw-r--r--plugins/base/src/test/kotlin/renderers/html/PlatformDependentHintTest.kt8
2 files changed, 32 insertions, 5 deletions
diff --git a/plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt b/plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt
index eead07a7..da89a352 100644
--- a/plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt
+++ b/plugins/base/src/test/kotlin/renderers/html/GroupWrappingTest.kt
@@ -1,5 +1,6 @@
package renderers.html
+import kotlinx.coroutines.runBlocking
import org.jetbrains.dokka.base.renderers.html.HtmlRenderer
import org.jetbrains.dokka.pages.TextStyle
import org.jsoup.Jsoup
@@ -18,7 +19,12 @@ class GroupWrappingTest: RenderingOnlyTestBase() {
text("c")
}
- HtmlRenderer(context).render(page)
+ runBlocking {
+ val scope = this
+ with(HtmlRenderer(context)) {
+ scope.render(page)
+ }
+ }
renderedContent.match("abc")
}
@@ -33,7 +39,12 @@ class GroupWrappingTest: RenderingOnlyTestBase() {
text("c")
}
- HtmlRenderer(context).render(page)
+ runBlocking {
+ val scope = this
+ with(HtmlRenderer(context)) {
+ scope.render(page)
+ }
+ }
renderedContent.match(P("ab"), "c")
}
@@ -48,7 +59,12 @@ class GroupWrappingTest: RenderingOnlyTestBase() {
text("c")
}
- HtmlRenderer(context).render(page)
+ runBlocking {
+ val scope = this
+ with(HtmlRenderer(context)) {
+ scope.render(page)
+ }
+ }
renderedContent.match(Div("ab"), "c")
}
@@ -68,7 +84,12 @@ class GroupWrappingTest: RenderingOnlyTestBase() {
}
}
- HtmlRenderer(context).render(page)
+ runBlocking {
+ val scope = this
+ with(HtmlRenderer(context)) {
+ scope.render(page)
+ }
+ }
renderedContent.match(Div("a", Div(Div("bc")), "d"))
}
diff --git a/plugins/base/src/test/kotlin/renderers/html/PlatformDependentHintTest.kt b/plugins/base/src/test/kotlin/renderers/html/PlatformDependentHintTest.kt
index cf1ac0a9..3e603955 100644
--- a/plugins/base/src/test/kotlin/renderers/html/PlatformDependentHintTest.kt
+++ b/plugins/base/src/test/kotlin/renderers/html/PlatformDependentHintTest.kt
@@ -1,5 +1,6 @@
package renderers.html
+import kotlinx.coroutines.runBlocking
import org.jetbrains.dokka.Platform
import org.jetbrains.dokka.base.renderers.html.HtmlRenderer
import org.jetbrains.dokka.pages.PlatformData
@@ -99,7 +100,12 @@ class PlatformDependentHintTest : RenderingOnlyTestBase() {
}
}
- HtmlRenderer(context).render(page)
+ runBlocking {
+ val scope = this
+ with(HtmlRenderer(context)) {
+ scope.render(page)
+ }
+ }
println(renderedContent)
renderedContent.match(Div(Div("ab")))
}