Commit 947a46c3 authored by Viktoria.Shirunova's avatar Viktoria.Shirunova
Browse files

[gui-test] do not add Kotlin SDK if it already exists

parent d58b999e
Showing with 16 additions and 3 deletions
+16 -3
......@@ -3,6 +3,7 @@ package com.intellij.ide.projectWizard.kotlin.installKotlinPlugin
import com.intellij.ide.projectWizard.kotlin.model.KotlinGuiTestCase
import com.intellij.ide.projectWizard.kotlin.model.KotlinTestProperties
import com.intellij.testGuiFramework.util.logInfo
import com.intellij.testGuiFramework.util.logTestStep
import com.intellij.testGuiFramework.util.logUIStep
import org.junit.Test
......@@ -44,9 +45,21 @@ class CreateSdksGuiTest : KotlinGuiTestCase() {
popupClick("Project Structure")
logUIStep("Open `$dialogName` dialog")
dialog(dialogName) {
actionButton("Add New SDK").click()
popupClick("Kotlin SDK")
button("OK").click()
jList("SDKs").clickItem("SDKs")
val kotlinSdk = "Kotlin SDK"
try{
jTree(kotlinSdk)
logInfo("$kotlinSdk exists")
}
catch (e: Exception){
logUIStep("Going to create $kotlinSdk")
actionButton("Add New SDK").click()
popupClick(kotlinSdk)
}
finally {
logUIStep("Close `Default Project Structure` dialog with OK")
button("OK").click()
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment