Skip to content
Open
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
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ tasks {
// Disable IntelliJ test listener that conflicts with standard JUnit
systemProperty("idea.test.cyclic.buffer.size", "0")

// Pass properties from gradle.properties to the JVM as system properties
project.findProperty("dartPluginVersion")?.let { systemProperty("dartPluginVersion", it) }
project.findProperty("uiPlatformBuildVersion")?.let { systemProperty("uiPlatformBuildVersion", it) }

// Add required JVM arguments
jvmArgumentProviders += CommandLineArgumentProvider {
mutableListOf(
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#

ideaVersion=2025.1.3.4
dartPluginVersion= 251.27623.5
dartPluginVersion=252.24322.5
uiPlatformBuildVersion=252.23892.409
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the IDEA platform build version? Can we add a comment here explaining it?

sinceBuild=243
untilBuild=253.*
javaVersion=21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* found in the LICENSE file.
*/

package io.flutter.integrationTest
package io.flutter.integration

import com.intellij.driver.sdk.ui.components.UiComponent.Companion.waitFound
import com.intellij.driver.sdk.ui.components.common.ideFrame
Expand All @@ -13,7 +13,7 @@ import com.intellij.driver.sdk.waitForIndicators
import com.intellij.ide.starter.driver.engine.BackgroundRun
import com.intellij.ide.starter.driver.engine.runIdeWithDriver
import com.intellij.ide.starter.junit5.config.UseLatestDownloadedIdeBuild
import io.flutter.integrationTest.utils.newProjectWelcomeScreen
import io.flutter.integration.utils.newProjectWelcomeScreen
import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.BeforeEach
Expand Down Expand Up @@ -83,7 +83,7 @@ class MyProjectUITest {
}

@Test
fun newProjectIC() {
fun testNewProjectIC() {
println("Initializing IDE test context")
println("Test project will be created as: $testProjectName")
run = Setup.setupTestContextIC("MyProjectUITest").runIdeWithDriver()
Expand All @@ -94,7 +94,7 @@ class MyProjectUITest {

@Test
@Disabled("Need license configuration to test")
fun newProjectUE() {
fun testNewProjectUE() {
println("Initializing IDE test context")
println("Test project will be created as: $testProjectName")
run = Setup.setupTestContextUE("MyProjectUITest").runIdeWithDriver()
Expand All @@ -111,7 +111,7 @@ class MyProjectUITest {

@Test
@Disabled("Need license configuration to test")
fun newProjectWS() {
fun testNewProjectWS() {
println("Initializing IDE test context")
println("Test project will be created as: $testProjectName")
run = Setup.setupTestContextWS("MyProjectUITest").runIdeWithDriver()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* found in the LICENSE file.
*/

package io.flutter.integrationTest
package io.flutter.integration

import com.intellij.ide.starter.buildTool.GradleBuildTool
import com.intellij.ide.starter.community.model.BuildType
Expand Down Expand Up @@ -45,7 +45,6 @@ class Setup {


companion object {

init {
// Configure dependency injection to use our custom paths
di = DI.Companion {
Expand All @@ -55,30 +54,30 @@ class Setup {
}

fun setupTestContextIC(hyphenateWithClass: String, projectInfoSpec: ProjectInfoSpec = NoProject): IDETestContext {
val uiPlatformBuildVersion = System.getProperty("uiPlatformBuildVersion")
return setupTestContext(
"", IdeProductProvider.IC.copy(
// TODO(team) should the version be fetched from some setting, i.e. System.getProperty("uiPlatformBuildVersion")
buildNumber = "252.23892.409",
buildNumber = uiPlatformBuildVersion,
buildType = BuildType.RELEASE.type
), projectInfoSpec
)
}

fun setupTestContextUE(hyphenateWithClass: String, projectInfoSpec: ProjectInfoSpec = NoProject): IDETestContext {
val uiPlatformBuildVersion = System.getProperty("uiPlatformBuildVersion")
return setupTestContext(
"", IdeProductProvider.IU.copy(
// TODO(team) should the version be fetched from some setting, i.e. System.getProperty("uiPlatformBuildVersion")
buildNumber = "252.23892.409",
buildNumber = uiPlatformBuildVersion,
buildType = BuildType.RELEASE.type
), projectInfoSpec
)
}

fun setupTestContextWS(hyphenateWithClass: String, projectInfoSpec: ProjectInfoSpec = NoProject): IDETestContext {
val uiPlatformBuildVersion = System.getProperty("uiPlatformBuildVersion")
return setupTestContext(
"", IdeProductProvider.WS.copy(
// TODO(team) should the version be fetched from some setting, i.e. System.getProperty("uiPlatformBuildVersion")
buildNumber = "252.23892.411",
buildNumber = uiPlatformBuildVersion,
buildType = BuildType.RELEASE.type
), projectInfoSpec
)
Expand All @@ -105,9 +104,10 @@ class Setup {
return Starter.newContext(testName = hyphenateWithClass, testCase = testCase).apply {
// Install the plugin that was built by the buildPlugin task
val pluginPath = System.getProperty("path.to.build.plugin")
val dartPluginVersion = System.getProperty("dartPluginVersion")
PluginConfigurator(this)
.installPluginFromPath(Paths.get(pluginPath))
.installPluginFromPluginManager("Dart", "252.24322.5")
.installPluginFromPluginManager("Dart", dartPluginVersion)
withBuildTool<GradleBuildTool>()
}.applyVMOptionsPatch {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* found in the LICENSE file.
*/

package io.flutter.integrationTest.utils
package io.flutter.integration.utils

import com.intellij.driver.sdk.ui.Finder
import com.intellij.driver.sdk.ui.components.ComponentData
Expand Down
Loading