Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-10-16 04:22:30 -0400
committerThomas Wolf2016-10-16 04:23:09 -0400
commit5142ddedae4480e0c04d8ed4f7e207abc176f8fd (patch)
treec13e2a2c917ef4379929b814aea1846253fc8a95 /org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test
parentc72723a3407f343a40d66532680b1cbcb30d1169 (diff)
downloadegit-5142ddedae4480e0c04d8ed4f7e207abc176f8fd.tar.gz
egit-5142ddedae4480e0c04d8ed4f7e207abc176f8fd.tar.xz
egit-5142ddedae4480e0c04d8ed4f7e207abc176f8fd.zip
Test stability: re-select tree item
Otherwise the selection may sometimes get lost, and then the menu entry cannot be found. Verified that the test still fails without the correction from commit 223247c1 and succeeds with it. Change-Id: Ia8dce4e5515a769992aa157a7e92a6a01796e55e Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/StageUnstageActionTest.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/StageUnstageActionTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/StageUnstageActionTest.java
index 799706e43..b2e454a5e 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/StageUnstageActionTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/StageUnstageActionTest.java
@@ -195,6 +195,7 @@ public class StageUnstageActionTest extends LocalRepositoryTestCase {
TestUtil.joinJobs(JobFamilies.INDEX_DIFF_CACHE_UPDATE);
// Verify file got staged
StagingUtil.assertStaging(PROJ_A, filePath, true);
+ fileItem.select();
assertTrue("Compare With->Index with HEAD should be enabled",
ContextMenuHelper.isContextMenuItemEnabled(projectExplorerTree,
"Compare With", compareIndexWithHead));
@@ -206,6 +207,7 @@ public class StageUnstageActionTest extends LocalRepositoryTestCase {
// Verify file is unstaged again
StagingUtil.assertStaging(PROJ_A, filePath, false);
// Verify the menu entry again
+ fileItem.select();
assertTrue(
"Compare With->Index with HEAD should be disabled or absent again",
!ContextMenuHelper.contextMenuItemExists(projectExplorerTree,

Back to the top