diff options
author | Oleg Yukhnevich <whyoleg@gmail.com> | 2023-11-07 15:27:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-07 15:27:34 +0200 |
commit | 64cce58f73f908909ba60da6005d7abb2572b2f0 (patch) | |
tree | b66897df0bb86e159d6d040c65e04552efd1ee68 /integration-tests/gradle/src/integrationTest/kotlin/org | |
parent | 84e48b516500433332e9279237cd139f7836ca94 (diff) | |
download | dokka-64cce58f73f908909ba60da6005d7abb2572b2f0.tar.gz dokka-64cce58f73f908909ba60da6005d7abb2572b2f0.tar.bz2 dokka-64cce58f73f908909ba60da6005d7abb2572b2f0.zip |
Add the link to GitHub repo to the header if there are source links defined (#3235)
* Use URL from base plugin configuration
* Add integration test for the multi-module project that the homepage link exists everywhere
Diffstat (limited to 'integration-tests/gradle/src/integrationTest/kotlin/org')
-rw-r--r-- | integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/MultiModule0IntegrationTest.kt | 15 |
1 files changed, 15 insertions, 0 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 54ac3ff8..f4061345 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 @@ -73,6 +73,21 @@ class MultiModule0IntegrationTest : AbstractGradleIntegrationTest() { "Expected moduleC being mentioned in -modules.html" ) + val htmlsWithHomepageLink = outputDir.walkTopDown().filter { + it.isFile && it.extension == "html" && it.name != "navigation.html" + }.toList() + + assertEquals(16, htmlsWithHomepageLink.size) + + htmlsWithHomepageLink.forEach { + assertTrue( + it.readText().contains( + """https://github.com/Kotlin/dokka/tree/master/integration-tests/gradle/projects/it-multimodule-0/""" + ), + "File ${it.absolutePath} doesn't contain link to homepage" + ) + } + val gfmOutputDir = File(projectDir, "moduleA/build/dokka/gfmMultiModule") assertTrue(gfmOutputDir.isDirectory, "Missing dokka GFM output directory") |