From 5142ddedae4480e0c04d8ed4f7e207abc176f8fd Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Sun, 16 Oct 2016 10:22:30 +0200 Subject: 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 --- .../org/eclipse/egit/ui/test/team/actions/StageUnstageActionTest.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test') 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 799706e431..b2e454a5e7 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, -- cgit v1.2.3