Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/build.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ workflow(
) {
uses(action = Checkout())
uses(action = ActionsSetupGradle())
run(command = "./gradlew build")
// Skipping Wasm JS tests because of a memory consumption problem.
// TODO: re-enable once it works again https://kotlinlang.slack.com/archives/CDFP59223/p1735278520024339
// See https://github.com/typesafegithub/github-actions-typing-editor/issues/43
run(command = "./gradlew build --exclude-task wasmJsBrowserTest")
}

job(
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- id: 'step-1'
uses: 'gradle/actions/setup-gradle@v4'
- id: 'step-2'
run: './gradlew build'
run: './gradlew build --exclude-task wasmJsBrowserTest'
build_kotlin_scripts:
name: 'Build Kotlin scripts'
runs-on: 'ubuntu-latest'
Expand Down
13 changes: 13 additions & 0 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ kotlin {
}
}
}
testTask {
// Skipping Wasm JS tests because of a memory consumption problem.
// TODO: re-enable once it works again https://kotlinlang.slack.com/archives/CDFP59223/p1735278520024339
// See https://github.com/typesafegithub/github-actions-typing-editor/issues/43
enabled = false
}
}
binaries.executable()
}
Expand Down Expand Up @@ -54,6 +60,13 @@ kotlin {
implementation(libs.ktor.client.core)
implementation(libs.kaml)
}

commonTest.dependencies {
implementation(kotlin("test"))

@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
implementation(compose.uiTest)
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion composeApp/src/commonMain/kotlin/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.compose.material.TextField
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import io.ktor.client.HttpClient
Expand Down Expand Up @@ -57,7 +58,7 @@ private fun manifest(manifest: Metadata?) {
Text("<none>")
}
manifest?.inputs?.forEach {
Text(it.key)
Text(it.key, modifier = Modifier.testTag("inputName"))
}

Spacer(Modifier.height(10.dp))
Expand Down
17 changes: 17 additions & 0 deletions composeApp/src/commonTest/kotlin/SmokeTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import androidx.compose.ui.test.*
import kotlin.test.Test

class SmokeTest {

@OptIn(ExperimentalTestApi::class)
@Test
fun `loads action manifest`() = runComposeUiTest {
setContent {
App()
}

waitUntilAtLeastOneExists(hasTestTag("inputName"))

onAllNodesWithTag("inputName").assertAny(hasText("repository"))
}
}
Loading
Loading