diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-05-18 17:14:23 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-05-19 09:56:32 +0200 |
commit | 5451627eb0cf8d95dafd23e96665e062ef023d75 (patch) | |
tree | 3406e8930239681c41dadf47f75efd8bf2fde0a2 /plugins/base/src/test/kotlin/content/seealso | |
parent | f15ecdd5fadae9169c8b35e0bf8a1786d57563a7 (diff) | |
download | dokka-5451627eb0cf8d95dafd23e96665e062ef023d75.tar.gz dokka-5451627eb0cf8d95dafd23e96665e062ef023d75.tar.bz2 dokka-5451627eb0cf8d95dafd23e96665e062ef023d75.zip |
Add test utils for ContentDivergent and fix the tests
Diffstat (limited to 'plugins/base/src/test/kotlin/content/seealso')
-rw-r--r-- | plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt | 238 |
1 files changed, 143 insertions, 95 deletions
diff --git a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt index ae53a848..8121543d 100644 --- a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt +++ b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt @@ -1,10 +1,11 @@ package content.seealso + import matchers.content.* import org.jetbrains.dokka.pages.ContentPage import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest import org.junit.jupiter.api.Test +import utils.bareSignature import utils.pWrapped -import utils.signature import utils.unnamedTag class ContentForSeeAlsoTest : AbstractCoreTest() { @@ -34,9 +35,13 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { val page = module.children.single { it.name == "test" } .children.single { it.name == "function" } as ContentPage page.content.assertNode { - group { - header(1) { +"function" } - signature("function", null, "abc" to "String") + header(1) { +"function" } + divergentGroup { + divergentInstance { + divergent { + bareSignature("function", null, "abc" to "String") + } + } } } } @@ -61,18 +66,24 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { val page = module.children.single { it.name == "test" } .children.single { it.name == "function" } as ContentPage page.content.assertNode { - group { - header(1) { +"function" } - signature("function", null, "abc" to "String") - } - header(3) { +"Description" } - platformHinted { - header(4) { +"See also" } - table { - group { - //DRI should be "test//abc/#/-1/" - link{ +"abc" } - group { } + header(1) { +"function" } + divergentGroup { + divergentInstance { + divergent { + bareSignature("function", null, "abc" to "String") + } + after { + header(3) { +"Description" } + platformHinted { + header(4) { +"See also" } + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"abc" } + group { } + } + } + } } } } @@ -99,18 +110,24 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { val page = module.children.single { it.name == "test" } .children.single { it.name == "function" } as ContentPage page.content.assertNode { - group { - header(1) { +"function" } - signature("function", null, "abc" to "String") - } - header(3) { +"Description" } - platformHinted { - header(4) { +"See also" } - table { - group { - //DRI should be "test//abc/#/-1/" - link{ +"abc" } - group { +"Comment to abc" } + header(1) { +"function" } + divergentGroup { + divergentInstance { + divergent { + bareSignature("function", null, "abc" to "String") + } + after { + header(3) { +"Description" } + platformHinted { + header(4) { +"See also" } + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"abc" } + group { +"Comment to abc" } + } + } + } } } } @@ -137,18 +154,24 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { val page = module.children.single { it.name == "test" } .children.single { it.name == "function" } as ContentPage page.content.assertNode { - group { - header(1) { +"function" } - signature("function", null, "abc" to "String") - } - header(3) { +"Description" } - platformHinted { - header(4) { +"See also" } - table { - group { - //DRI should be "kotlin.collections/Collection////" - link{ +"Collection"} - group { } + header(1) { +"function" } + divergentGroup { + divergentInstance { + divergent { + bareSignature("function", null, "abc" to "String") + } + after { + header(3) { +"Description" } + platformHinted { + header(4) { +"See also" } + table { + group { + //DRI should be "kotlin.collections/Collection////" + link { +"Collection" } + group { } + } + } + } } } } @@ -175,18 +198,25 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { val page = module.children.single { it.name == "test" } .children.single { it.name == "function" } as ContentPage page.content.assertNode { - group { - header(1) { +"function" } - signature("function", null, "abc" to "String") - } - header(3) { +"Description" } - platformHinted { - header(4) { +"See also" } - table { - group { - //DRI should be "test//abc/#/-1/" - link{ +"Collection" } - group { +"Comment to stdliblink" } + header(1) { +"function" } + divergentGroup { + divergentInstance { + divergent { + bareSignature("function", null, "abc" to "String") + } + after { + header(3) { +"Description" } + platformHinted { + header(4) { +"See also" } + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"Collection" } + group { +"Comment to stdliblink" } + } + } + } + } } } @@ -216,21 +246,27 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { val page = module.children.single { it.name == "test" } .children.single { it.name == "function" } as ContentPage page.content.assertNode { - group { - header(1) { +"function" } - signature("function", null, "abc" to "String") - } - header(3) { +"Description" } - platformHinted { - pWrapped("random comment") - unnamedTag("Author") { +"pikinier20" } - unnamedTag("Since") { +"0.11" } - header(4) { +"See also" } - table { - group { - //DRI should be "test//abc/#/-1/" - link{ +"Collection" } - group { +"Comment to stdliblink" } + header(1) { +"function" } + divergentGroup { + divergentInstance { + divergent { + bareSignature("function", null, "abc" to "String") + } + after { + header(3) { +"Description" } + platformHinted { + pWrapped("random comment") + unnamedTag("Author") { +"pikinier20" } + unnamedTag("Since") { +"0.11" } + header(4) { +"See also" } + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"Collection" } + group { +"Comment to stdliblink" } + } + } + } } } } @@ -258,18 +294,24 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { val page = module.children.single { it.name == "test" } .children.single { it.name == "function" } as ContentPage page.content.assertNode { - group { - header(1) { +"function" } - signature("function", null, "abc" to "String") - } - header(3) { +"Description" } - platformHinted { - header(4) { +"See also" } - table { - group { - //DRI should be "test//abc/#/-1/" - link{ +"abc" } - group { +"Comment to abc2" } + header(1) { +"function" } + divergentGroup { + divergentInstance { + divergent { + bareSignature("function", null, "abc" to "String") + } + after { + header(3) { +"Description" } + platformHinted { + header(4) { +"See also" } + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"abc" } + group { +"Comment to abc2" } + } + } + } } } } @@ -297,23 +339,29 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { val page = module.children.single { it.name == "test" } .children.single { it.name == "function" } as ContentPage page.content.assertNode { - group { - header(1) { +"function" } - signature("function", null, "abc" to "String") - } - header(3) { +"Description" } - platformHinted { - header(4) { +"See also" } - table { - group { - //DRI should be "test//abc/#/-1/" - link{ +"abc" } - group { +"Comment to abc1" } + header(1) { +"function" } + divergentGroup { + divergentInstance { + divergent { + bareSignature("function", null, "abc" to "String") } - group { - //DRI should be "test//abc/#/-1/" - link{ +"Collection" } - group { +"Comment to collection" } + after { + header(3) { +"Description" } + platformHinted { + header(4) { +"See also" } + table { + group { + //DRI should be "test//abc/#/-1/" + link { +"abc" } + group { +"Comment to abc1" } + } + group { + //DRI should be "test//abc/#/-1/" + link { +"Collection" } + group { +"Comment to collection" } + } + } + } } } } |