aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/gradle/src/integrationTest
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-10 13:50:01 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-07-13 14:23:08 +0200
commite9b3fead277bdbf0aced2801812cd22c3b8fd625 (patch)
tree0be1b421373c095597599bc93cdbcee8492cb8b5 /integration-tests/gradle/src/integrationTest
parente940349980c40f87309c9ae80593519952d9dd7f (diff)
downloaddokka-e9b3fead277bdbf0aced2801812cd22c3b8fd625.tar.gz
dokka-e9b3fead277bdbf0aced2801812cd22c3b8fd625.tar.bz2
dokka-e9b3fead277bdbf0aced2801812cd22c3b8fd625.zip
Fix first integration tests
Diffstat (limited to 'integration-tests/gradle/src/integrationTest')
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multimodule0IntegrationTest.kt (renamed from integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt)27
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt6
2 files changed, 26 insertions, 7 deletions
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multimodule0IntegrationTest.kt
index e4f8b189..75ef547a 100644
--- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multimodule0IntegrationTest.kt
@@ -5,7 +5,7 @@ import org.junit.runners.Parameterized
import java.io.File
import kotlin.test.*
-class MultiModule0IntegrationTest(override val versions: BuildVersions) : AbstractGradleIntegrationTest() {
+class Multimodule0IntegrationTest(override val versions: BuildVersions) : AbstractGradleIntegrationTest() {
companion object {
@get:JvmStatic
@get:Parameterized.Parameters(name = "{0}")
@@ -30,13 +30,32 @@ class MultiModule0IntegrationTest(override val versions: BuildVersions) : Abstra
assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":moduleA:dokkaKdocMultimodule")).outcome)
- val dokkaOutputDir = File(projectDir, "moduleA/build/dokka/kdocMultimodule")
- assertTrue(dokkaOutputDir.isDirectory, "Missing dokka output directory")
+ val outputDir = File(projectDir, "moduleA/build/dokka/kdocMultimodule")
+ assertTrue(outputDir.isDirectory, "Missing dokka output directory")
- dokkaOutputDir.allHtmlFiles().forEach { file ->
+ assertTrue(
+ outputDir.allHtmlFiles().any(),
+ "Expected at least one html file being generated"
+ )
+
+ outputDir.allHtmlFiles().forEach { file ->
assertContainsNoErrorClass(file)
assertNoUnresolvedLInks(file)
assertNoHrefToMissingLocalFileOrDirectory(file)
}
+
+ val modulesFile = File(outputDir, "-modules.html")
+ assertTrue(modulesFile.isFile, "Missing -modules.html file")
+
+ val modulesFileText = modulesFile.readText()
+ assertTrue(
+ "moduleB" in modulesFileText,
+ "Expected moduleB being mentioned in -modules.html"
+ )
+ assertTrue(
+ "moduleC" in modulesFileText,
+ "Expected moduleC being mentioned in -modules.html"
+ )
+
}
}
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt
index 491f5610..8fa1d3de 100644
--- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Multiplatform0GradleIntegrationTest.kt
@@ -27,11 +27,11 @@ class Multiplatform0GradleIntegrationTest(override val versions: BuildVersions)
@Test
fun execute() {
- val result = createGradleRunner("dokka", "--stacktrace").build()
+ val result = createGradleRunner("dokkaKdoc", "--stacktrace").build()
- assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokka")).outcome)
+ assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaKdoc")).outcome)
- val dokkaOutputDir = File(projectDir, "build/dokka")
+ val dokkaOutputDir = File(projectDir, "build/dokka/kdoc")
assertTrue(dokkaOutputDir.isDirectory, "Missing dokka output directory")
dokkaOutputDir.allHtmlFiles().forEach { file ->