Browse Source

Run selenium tests in Firefox is specific System property (synced with project property) is present

pull/822/head
Shagen Ogandzhanian 4 years ago
parent
commit
05dc8d1c05
  1. 8
      web/integration-core/build.gradle.kts
  2. 15
      web/integration-core/src/jvmTest/kotlin/org/jetbrains/compose/web/tests/integration/common/BaseIntegrationTests.kt

8
web/integration-core/build.gradle.kts

@ -74,4 +74,12 @@ kotlin {
tasks.named<Test>("jvmTest") {
dependsOn(tasks.named("jsBrowserDevelopmentWebpack"))
listOf(
"compose.web.tests.integration.withFirefox"
).forEach { propName ->
if (project.hasProperty(propName)) {
systemProperty(propName, "true")
}
}
}

15
web/integration-core/src/jvmTest/kotlin/org/jetbrains/compose/web/tests/integration/common/BaseIntegrationTests.kt

@ -61,15 +61,20 @@ object Drivers {
@MethodSource("resolveDrivers")
annotation class ResolveDrivers
@DisplayNameGeneration(DisplayNameSimplifier::class)
@ExtendWith(value = [StaticServerSetupExtension::class])
abstract class BaseIntegrationTests() {
companion object {
@OptIn(ExperimentalStdlibApi::class)
private val drivers: Array<Array<WebDriver>> = buildList<Array<WebDriver>> {
add(arrayOf(Drivers.Chrome))
if (System.getProperty("compose.web.tests.integration.withFirefox") == "true") {
add(arrayOf(Drivers.Firefox))
}
}.toTypedArray()
@JvmStatic
fun resolveDrivers(): Array<Array<Any>> {
return arrayOf(
arrayOf(Drivers.Chrome)
)
}
fun resolveDrivers() = drivers
}
}

Loading…
Cancel
Save