IJOB-575 Fix stuck in Git Changelists and Shelve lesson

The UI of the VCS popup that opens on a gutter click was changed in the scope of IJPL-161089.

GitOrigin-RevId: b5f7ed13c1730f3bf20394c32703bb150a3cbe87
This commit is contained in:
Konstantin Hudyakov
2024-10-24 14:45:14 +00:00
committed by intellij-monorepo-bot
parent 70a339f11e
commit 54fb46a681
2 changed files with 9 additions and 7 deletions
@@ -153,7 +153,7 @@ git.changelists.shelf.introduction=Suppose you don't want to commit some changes
You can move a comment to a new changelist, so it won't be committed accidentally. \
Click the highlighted line marker to open the context menu.
git.changelists.shelf.click.line.marker.balloon=Click the line marker
git.changelists.shelf.choose.new.changelist=Click {0} and select the {1} menu item.
git.changelists.shelf.choose.new.changelist=Click the highlighted icon and select the {0} menu item.
git.changelists.shelf.create.changelist=Name the new changelist {0}. Press {1} or click {2} to create a new changelist.
git.changelists.shelf.open.commit.window=Now let's inspect the created changelist.
git.changelists.shelf.explanation=In addition, you can use the {0} feature to save these changes in a file on your computer. \
@@ -4,6 +4,8 @@ package training.git.lesson
import com.intellij.CommonBundle
import com.intellij.codeInsight.hint.HintManager
import com.intellij.idea.ActionsBundle
import com.intellij.openapi.actionSystem.ActionGroup
import com.intellij.openapi.actionSystem.impl.ActionButton
import com.intellij.openapi.actionSystem.impl.ActionMenuItem
import com.intellij.openapi.application.ModalityState
import com.intellij.openapi.application.invokeAndWaitIfNeeded
@@ -25,7 +27,6 @@ import com.intellij.openapi.vcs.changes.ui.CommitChangeListDialog
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.wm.ToolWindowId
import com.intellij.psi.PsiDocumentManager
import com.intellij.ui.components.DropDownLink
import com.intellij.util.DocumentUtil
import com.intellij.util.ui.JBUI
import training.dsl.*
@@ -88,8 +89,9 @@ class GitChangelistsAndShelveLesson : GitLesson("Git.ChangelistsAndShelf", GitLe
text(GitLessonsBundle.message("git.changelists.shelf.introduction"))
text(GitLessonsBundle.message("git.changelists.shelf.click.line.marker.balloon"),
LearningBalloonConfig(Balloon.Position.below, 0))
triggerAndBorderHighlight().component { ui: DropDownLink<*> ->
ui.text?.contains(defaultChangelistName) == true
triggerAndBorderHighlight().component { ui: ActionButton ->
val group = ui.action as? ActionGroup ?: return@component false
group.getChildren(null).any { it.templateText == VcsBundle.message("ex.new.changelist") }
}
test {
ideFrame {
@@ -104,15 +106,15 @@ class GitChangelistsAndShelveLesson : GitLesson("Git.ChangelistsAndShelf", GitLe
task {
val newChangelistText = VcsBundle.message("ex.new.changelist")
text(GitLessonsBundle.message("git.changelists.shelf.choose.new.changelist",
strong(defaultChangelistName), strong(newChangelistText)))
text(GitLessonsBundle.message("git.changelists.shelf.choose.new.changelist", strong(newChangelistText)))
triggerUI().component { ui: EditorComponentImpl ->
ui.text.contains(defaultChangelistName)
}
restoreByUi(highlightLineMarkerTaskId)
test {
ideFrame {
button(defaultChangelistName).click()
val changelistsButton = previous.ui as? ActionButton ?: return@ideFrame
jComponent(changelistsButton).click()
jList(newChangelistText).clickItem(newChangelistText)
}
}