diff options
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.kt | 6 |
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 -> |