mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[gui-test] NewProjectDialogModel: make explicit click on project location
This commit is contained in:
+22
-19
@@ -238,11 +238,7 @@ fun NewProjectDialogModel.createJavaProject(projectPath: String,
|
||||
}
|
||||
}
|
||||
button(buttonNext).click()
|
||||
logUIStep("Fill Project location with `$projectPath`")
|
||||
textfield(textProjectName).click()
|
||||
shortcut(Key.TAB)
|
||||
shortcut(Modifier.CONTROL + Key.X, Modifier.META + Key.X)
|
||||
typeText(projectPath)
|
||||
typeProjectNameAndLocation(projectPath)
|
||||
if (template.isNotEmpty() && basePackage.isNotEmpty()) {
|
||||
// base package is set only for Command Line app template
|
||||
logUIStep("Set Base package to `$basePackage`")
|
||||
@@ -327,18 +323,31 @@ fun NewProjectDialogModel.createGradleProject(projectPath: String, gradleOptions
|
||||
useSeparateModules.click()
|
||||
}
|
||||
button(buttonNext).click()
|
||||
logUIStep("Fill Project location with `$projectPath`")
|
||||
// Field "Project location" is located under additional panel and has location [0,0], that's why we usually click into field "Project name"
|
||||
textfield(textProjectName).click()
|
||||
shortcut(Key.TAB)
|
||||
shortcut(Modifier.CONTROL + Key.X, Modifier.META + Key.X)
|
||||
typeText(projectPath)
|
||||
typeProjectNameAndLocation(projectPath)
|
||||
logUIStep("Close New Project dialog with Finish")
|
||||
button(buttonFinish).click()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun NewProjectDialogModel.typeProjectNameAndLocation(projectPath: String){
|
||||
with(guiTestCase){
|
||||
with(connectDialog()){
|
||||
logUIStep("Fill Project location with `$projectPath`")
|
||||
textfield(textProjectLocation).click()
|
||||
shortcut(Modifier.CONTROL + Key.X, Modifier.META + Key.X)
|
||||
typeText(projectPath)
|
||||
val projectName = projectPath.split(slash).last()
|
||||
if (projectName != textfield(textProjectName).text()) {
|
||||
logUIStep("Fill Project name with `$projectName`")
|
||||
textfield(textProjectName).click()
|
||||
shortcut(Modifier.CONTROL + Key.X, Modifier.META + Key.X)
|
||||
typeText(projectName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun NewProjectDialogModel.createMavenProject(projectPath: String, mavenOptions: NewProjectDialogModel.MavenProjectOptions) {
|
||||
with(guiTestCase) {
|
||||
fileSystemUtils.assertProjectPathExists(projectPath)
|
||||
@@ -466,10 +475,7 @@ fun NewProjectDialogModel.createKotlinMPProject(
|
||||
jList(templateName).clickItem(templateName)
|
||||
button(buttonNext).click()
|
||||
button(buttonNext).click()
|
||||
logUIStep("Fill Project location with `$projectPath`")
|
||||
textfield(textProjectLocation).click()
|
||||
shortcut(Modifier.CONTROL + Key.X, Modifier.META + Key.X)
|
||||
typeText(projectPath)
|
||||
typeProjectNameAndLocation(projectPath)
|
||||
logUIStep("Close New Project dialog with Finish")
|
||||
button(buttonFinish).click()
|
||||
}
|
||||
@@ -526,10 +532,7 @@ fun NewProjectDialogModel.createProjectInGroup(group: NewProjectDialogModel.Grou
|
||||
selectProjectGroup(group)
|
||||
if (libs.isSetNotEmpty()) setLibrariesAndFrameworks(libs)
|
||||
button(buttonNext).click()
|
||||
logUIStep("Fill Project location with `$projectPath`")
|
||||
textfield(textProjectLocation).click()
|
||||
shortcut(Modifier.CONTROL + Key.X, Modifier.META + Key.X)
|
||||
typeText(projectPath)
|
||||
typeProjectNameAndLocation(projectPath)
|
||||
logUIStep("Close New Project dialog with Finish")
|
||||
button(buttonFinish).click()
|
||||
logUIStep("Wait when downloading dialog disappears")
|
||||
|
||||
Reference in New Issue
Block a user