mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[gui-tests] ProjectStructureDialogModel: added checkSDKs and restructured related check* functions
This commit is contained in:
+14
-9
@@ -13,6 +13,7 @@ import com.intellij.testGuiFramework.util.scenarios.ProjectStructureDialogModel.
|
||||
import com.intellij.testGuiFramework.util.scenarios.ProjectStructureDialogModel.Constants.menuArtifacts
|
||||
import com.intellij.testGuiFramework.util.scenarios.ProjectStructureDialogModel.Constants.menuLibraries
|
||||
import com.intellij.testGuiFramework.util.scenarios.ProjectStructureDialogModel.Constants.menuModules
|
||||
import com.intellij.testGuiFramework.util.scenarios.ProjectStructureDialogModel.Constants.menuSDKs
|
||||
import com.intellij.testGuiFramework.util.scenarios.ProjectStructureDialogModel.Constants.projectStructureTitle
|
||||
import com.intellij.testGuiFramework.utils.TestUtilsClass
|
||||
import com.intellij.testGuiFramework.utils.TestUtilsClassCompanion
|
||||
@@ -33,6 +34,7 @@ class ProjectStructureDialogModel(val testCase: GuiTestCase) : TestUtilsClass(te
|
||||
const val menuArtifacts = "Artifacts"
|
||||
const val itemArtifact = "Artifact"
|
||||
const val menuSDKs = "SDKs"
|
||||
const val itemSDK = "SDK"
|
||||
const val menuGlobalLibraries = "Global Libraries"
|
||||
const val menuProblems = "Problems"
|
||||
|
||||
@@ -70,20 +72,23 @@ fun ProjectStructureDialogModel.checkLibraryPresent(vararg library: String){
|
||||
}
|
||||
}
|
||||
|
||||
fun ProjectStructureDialogModel.checkModule(checks: JDialogFixture.()->Unit){
|
||||
private fun ProjectStructureDialogModel.checkPage(page: String, checks: JDialogFixture.()->Unit){
|
||||
with(guiTestCase){
|
||||
logUIStep("Click $menuModules")
|
||||
logUIStep("Click $page")
|
||||
val dialog = connectDialog()
|
||||
dialog.jList(menuModules).clickItem(menuModules)
|
||||
dialog.jList(page).clickItem(page)
|
||||
dialog.checks()
|
||||
}
|
||||
}
|
||||
|
||||
fun ProjectStructureDialogModel.checkModule(checks: JDialogFixture.()->Unit){
|
||||
checkPage(menuModules, checks)
|
||||
}
|
||||
|
||||
fun ProjectStructureDialogModel.checkArtifact(checks: JDialogFixture.()->Unit){
|
||||
with(guiTestCase){
|
||||
logUIStep("Click $menuArtifacts")
|
||||
val dialog = connectDialog()
|
||||
dialog.jList(menuArtifacts).clickItem(menuArtifacts)
|
||||
dialog.checks()
|
||||
}
|
||||
checkPage(menuArtifacts, checks)
|
||||
}
|
||||
|
||||
fun ProjectStructureDialogModel.checkSDK(checks: JDialogFixture.()->Unit){
|
||||
checkPage(menuSDKs, checks)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user