Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more UI test cases to the ui-showcase project #3595

Merged
merged 3 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/tests-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Set longpaths support for Windows
if: matrix.os == 'windows-latest'
# Avoid failing tests on Windows with "cannot create directory at X. Filename too long"
# This command will fail if run on a Linux build agent with "could not lock config file: Permission denied"
run: git config --system core.longpaths true
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/tests-thorough.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Set longpaths support for Windows
if: matrix.os == 'windows-latest'
# Avoid failing tests on Windows with "cannot create directory at X. Filename too long"
# This command will fail if run on a Linux build agent with "could not lock config file: Permission denied"
run: git config --system core.longpaths true
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import org.intellij.lang.annotations.Language
import org.jetbrains.dokka.gradle.AbstractDokkaTask

plugins {
id("uitest.dokka")
}

tasks.withType<AbstractDokkaTask>().configureEach {
@Language("JSON")
val dokkaBaseConfiguration = """
{
"footerMessage": "(c) 2024 My custom footer message",
"homepageLink": "https://github.com/Kotlin/dokka/tree/master/dokka-integration-tests/gradle/projects/ui-showcase"
}
""".trimIndent()

pluginsMapConfiguration.set(
mapOf(
// fully qualified plugin name to json configuration
"org.jetbrains.dokka.base.DokkaBase" to dokkaBaseConfiguration
)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,25 @@ plugins {
}

tasks.withType<AbstractDokkaTask>().configureEach {
moduleVersion.set("1.0")

@Language("JSON")
val dokkaBaseConfiguration = """
val versioningPluginConfiguration = """
{
"footerMessage": "(c) 2024 My footer message",
"homepageLink": "https://github.com/Kotlin/dokka/tree/master/dokka-integration-tests/ui/test-project"
"version": "1.0",
"olderVersionsDir": "${project.rootProject.projectDir.resolve("previousDocVersions").invariantSeparatorsPath}"
}
""".trimIndent()

pluginsMapConfiguration.set(
mapOf(
// fully qualified plugin name to json configuration
"org.jetbrains.dokka.base.DokkaBase" to dokkaBaseConfiguration
"org.jetbrains.dokka.versioning.VersioningPlugin" to versioningPluginConfiguration
)
)
}

val dokka_it_dokka_version: String by project
dependencies {
dokkaPlugin("org.jetbrains.dokka:versioning-plugin:$dokka_it_dokka_version")
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fun additionalInfo(): String = "foo"
*
* @sample org.jetbrains.dokka.uitest.internal.functionToBeUsedAsSample
*/
fun sample() {}
fun withSample() {}

/**
* Describes a function with a parameter
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

package org.jetbrains.dokka.uitest.rendering

class LONG_CLASS_NAME_WITH_UNDERSCORES_EVEN_IF_IT_IS_NOT_BY_CONVENTION_BUT_IT_MIGHT_EXIST_WHO_KNOWS(
paramWithLong_Name_with_Underscore_howWillItBe_rendered_By_DokkaIWonderOne: String,
paramWithLong_Name_with_Underscore_howWillItBe_rendered_By_DokkaIWonderTwo: String,
) {
fun function_with_long_name_with_underscores_same_story_as_this_class_name() {}

fun `very-very-long-name-with-dashes-for-some-reason-even-if-not-popular-but-might-happen-maybe`() {}

fun `mixed_underscore-with-dashes_same_thing-as_above-you-never_know-what-might_happen`(
paramWithLong_Name_with_Underscore_howWillItBe_rendered_By_DokkaIWonderOne: String,
paramWithLong_Name_with_Underscore_howWillItBe_rendered_By_DokkaIWonderTwo: LONG_CLASS_NAME_WITH_UNDERSCORES_EVEN_IF_IT_IS_NOT_BY_CONVENTION_BUT_IT_MIGHT_EXIST_WHO_KNOWS,
): LONG_CLASS_NAME_WITH_UNDERSCORES_EVEN_IF_IT_IS_NOT_BY_CONVENTION_BUT_IT_MIGHT_EXIST_WHO_KNOWS {
TODO()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

plugins {
id("uitest.dokka")
id("uitest.dokka-kmp")

kotlin("multiplatform")
}
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.