From a904221e2f64093eb72f786584671f875aabf6ed Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Mon, 13 Jul 2020 08:21:27 +0200 Subject: Adapt Android0GradleIntegrationTest for new format configuration --- .../dokka/it/gradle/Android0GradleIntegrationTest.kt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka') diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt index 2b8ba45d..52dc6f0c 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt @@ -51,17 +51,25 @@ class Android0GradleIntegrationTest(override val versions: BuildVersions) : Abst @Test fun execute() { - val result = createGradleRunner("dokka", "--stacktrace").build() - assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokka")).outcome) + val result = createGradleRunner("dokkaHtml", "--stacktrace").build() + assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaHtml")).outcome) - projectDir.allHtmlFiles().forEach { file -> + val htmlOutputDir = File(projectDir, "build/dokka/html") + assertTrue(htmlOutputDir.isDirectory, "Missing html output directory") + + assertTrue( + htmlOutputDir.allHtmlFiles().count() > 0, + "Expected html files in html output directory" + ) + + htmlOutputDir.allHtmlFiles().forEach { file -> assertContainsNoErrorClass(file) assertNoUnresolvedLInks(file) assertNoHrefToMissingLocalFileOrDirectory(file) } assertTrue( - projectDir.allHtmlFiles().any { file -> + htmlOutputDir.allHtmlFiles().any { file -> "https://developer.android.com/reference/android/content/Context.html" in file.readText() }, "Expected link to developer.android.com" ) -- cgit