aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/maven/src
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2020-10-07 13:58:46 +0200
committerGitHub <noreply@github.com>2020-10-07 13:58:46 +0200
commite9f5da45c0fcfec5f7c150229301904d7915e090 (patch)
treec094b57b37fec4c901bbfaa508268d354a4dc4c8 /integration-tests/maven/src
parentde6019337ae0e97e73db7fa9394e88ec2de4aeed (diff)
downloaddokka-e9f5da45c0fcfec5f7c150229301904d7915e090.tar.gz
dokka-e9f5da45c0fcfec5f7c150229301904d7915e090.tar.bz2
dokka-e9f5da45c0fcfec5f7c150229301904d7915e090.zip
Make logo replaceable #1339 (#1488)
Diffstat (limited to 'integration-tests/maven/src')
-rw-r--r--integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt15
1 files changed, 15 insertions, 0 deletions
diff --git a/integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt b/integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt
index 88fdc207..be70fdb4 100644
--- a/integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt
+++ b/integration-tests/maven/src/integrationTest/kotlin/org/jetbrains/dokka/it/maven/MavenIntegrationTest.kt
@@ -24,6 +24,10 @@ class MavenIntegrationTest : AbstractIntegrationTest() {
pomXml.apply {
writeText(readText().replace("\$dokka_version", currentDokkaVersion))
}
+ val customResourcesDir = File(templateProjectDir, "customResources")
+ if(customResourcesDir.exists() && customResourcesDir.isDirectory) {
+ customResourcesDir.copyRecursively(File(projectDir, "customResources"), overwrite = true)
+ }
}
@Test
@@ -54,6 +58,17 @@ class MavenIntegrationTest : AbstractIntegrationTest() {
assertNoEmptyLinks(file)
assertNoEmptySpans(file)
}
+
+ assertEquals(
+ """#logo{background-image:url('https://upload.wikimedia.org/wikipedia/commons/9/9d/Ubuntu_logo.svg');}""",
+ stylesDir.resolve("logo-styles.css").readText().replace("\\s".toRegex(), ""),
+ )
+ assertTrue(stylesDir.resolve("custom-style-to-add.css").isFile)
+ projectDir.allHtmlFiles().forEach { file ->
+ if(file.name != "navigation.html") assertTrue("custom-style-to-add.css" in file.readText(), "custom styles not added to html file ${file.name}")
+ }
+ assertEquals("""/* custom stylesheet */""", stylesDir.resolve("custom-style-to-add.css").readText())
+ assertTrue(imagesDir.resolve("custom-resource.svg").isFile)
}
@Test