-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup running a UI test project via Gradle integration tests infrastr…
…ucture (#3583)
- Loading branch information
Showing
75 changed files
with
98 additions
and
464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,6 183,7 @@ testing { | |
} | ||
} | ||
} | ||
registerTestProjectSuite("testUiShowcaseProject", "ui-showcase") | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
dokka-integration-tests/gradle/projects/ui-showcase/build-logic/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,15 @@ | ||
/* | ||
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
val dokka_it_kotlin_version: String by project | ||
val dokka_it_dokka_version: String by project | ||
|
||
dependencies { | ||
implementation("org.jetbrains.dokka:dokka-gradle-plugin:$dokka_it_dokka_version") | ||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$dokka_it_kotlin_version") | ||
} |
6 changes: 6 additions & 0 deletions
6
dokka-integration-tests/gradle/projects/ui-showcase/build-logic/settings.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,6 @@ | ||
/* | ||
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
apply(from = "../template.settings.gradle.kts") | ||
rootProject.name = "build-logic" |
6 changes: 4 additions & 2 deletions
6
...c/src/main/kotlin/uitest.dokka.gradle.kts → ...c/src/main/kotlin/uitest.dokka.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 3,5 @@ | |
*/ | ||
|
||
plugins { | ||
id("uitest.base") | ||
id("uitest.dokka") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
dokka-integration-tests/gradle/projects/ui-showcase/settings.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,13 @@ | ||
/* | ||
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
apply(from = "template.settings.gradle.kts") | ||
|
||
pluginManagement { | ||
includeBuild("build-logic") | ||
} | ||
|
||
rootProject.name = "ui-showcase" | ||
include(":jvm") | ||
include(":kmp") |
44 changes: 44 additions & 0 deletions
44
dokka-integration-tests/gradle/src/testUiShowcaseProject/kotlin/UiShowcaseIntegrationTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,44 @@ | ||
/* | ||
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
package org.jetbrains.dokka.it.gradle | ||
|
||
import org.gradle.testkit.runner.TaskOutcome | ||
import org.jetbrains.dokka.it.TestOutputCopier | ||
import org.junit.jupiter.params.ParameterizedTest | ||
import org.junit.jupiter.params.provider.ArgumentsSource | ||
import java.io.File | ||
import kotlin.test.assertEquals | ||
import kotlin.test.assertNotNull | ||
import kotlin.test.assertTrue | ||
|
||
class UiShowcaseIntegrationTest : AbstractGradleIntegrationTest(), TestOutputCopier { | ||
override val projectOutputLocation: File by lazy { File(projectDir, "build/dokka/htmlMultiModule") } | ||
|
||
@OnlyDescriptors("CPointer is not resolved in K2") | ||
@ParameterizedTest(name = "{0}") | ||
@ArgumentsSource(LatestTestedVersionsArgumentsProvider::class) | ||
fun execute(buildVersions: BuildVersions) { | ||
val result = createGradleRunner( | ||
buildVersions, | ||
"dokkaHtmlMultiModule", | ||
"-i", | ||
"-s" | ||
).buildRelaxed() | ||
|
||
assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaHtmlMultiModule")).outcome) | ||
assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":jvm:dokkaHtmlPartial")).outcome) | ||
assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":kmp:dokkaHtmlPartial")).outcome) | ||
|
||
assertTrue(projectOutputLocation.isDirectory, "Missing dokka output directory") | ||
|
||
projectOutputLocation.allHtmlFiles().forEach { file -> | ||
assertContainsNoErrorClass(file) | ||
assertNoUnresolvedLinks(file) | ||
assertNoHrefToMissingLocalFileOrDirectory(file) | ||
assertNoEmptyLinks(file) | ||
assertNoEmptySpans(file) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
dokka-integration-tests/ui/test-project/build-logic/build.gradle.kts
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
dokka-integration-tests/ui/test-project/build-logic/settings.gradle.kts
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
dokka-integration-tests/ui/test-project/build-logic/src/main/kotlin/uitest.base.gradle.kts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
dokka-integration-tests/ui/test-project/gradle/libs.versions.toml
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-62.2 KB
dokka-integration-tests/ui/test-project/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 0 additions & 7 deletions
7
dokka-integration-tests/ui/test-project/gradle/wrapper/gradle-wrapper.properties
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.