git tests: add debug logs for test failures "no commit dialog was shown"

This commit is contained in:
Kirill Likhodedov
2017-11-19 15:24:14 +03:00
parent 1bc4860f1a
commit eb213feaa0
2 changed files with 4 additions and 0 deletions
@@ -138,6 +138,7 @@ class GitApplyChangesProcess(private val project: Project,
waitForChangeListManagerUpdate()
if (mergeCompleted) {
LOG.debug("All conflicts resolved, will show commit dialog.")
val committed = commit(repository, commit, commitMessage, changeList, successfulCommits,
alreadyPicked)
if (!committed) return false
@@ -198,10 +199,12 @@ class GitApplyChangesProcess(private val project: Project,
}
val changes = actualList.changes
if (changes.isEmpty()) {
LOG.debug("No changes in the $actualList. All changes in the CLM: ${changeListManager.allChanges}")
alreadyPicked.add(commit)
return true
}
LOG.debug("Showing commit dialog for changes: ${changes}")
val committed = showCommitDialogAndWaitForCommit(repository, changeList, commitMessage, changes)
if (committed) {
refreshVfsAndMarkDirty(changes)
@@ -74,6 +74,7 @@ class GitCherryPickAutoCommitTest : GitCherryPickTest() {
cherryPick(commit)
`assert merge dialog was shown`()
`assert commit dialog was shown`()
changeListManager.assertChangeListExists("on_master\n\n(cherry picked from commit ${shortHash(commit)})")
assertNoNotification()
}