Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Hohenegger2019-10-08 17:43:30 +0000
committerThomas Wolf2019-10-23 16:29:16 +0000
commiteb919887a44a850b6bfa4ebd5f28d070022807e7 (patch)
tree08b54e16acf33833dc9075ead190b2437918cc79 /org.eclipse.egit.ui.test
parentf07a3e62f9944d8bdc37f7a84ab026470137027f (diff)
downloadegit-eb919887a44a850b6bfa4ebd5f28d070022807e7.tar.gz
egit-eb919887a44a850b6bfa4ebd5f28d070022807e7.tar.xz
egit-eb919887a44a850b6bfa4ebd5f28d070022807e7.zip
Fix broken "start release" from commit in history view
The changes in commit 2e2810f7 broke this sub-menu entry in Gitflow. Fix by using SelectionProvider instead of adapters. Add UI test to avoid future breakage. Bug: 551819 Change-Id: I943b43babc7d0eb028623c5419371fa68c4d8150 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui.test')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
index 994286b55a..58db11f588 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
@@ -12,6 +12,7 @@
*******************************************************************************/
package org.eclipse.egit.ui.test.history;
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withRegex;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
@@ -29,6 +30,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Adapters;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.egit.core.RepositoryUtil;
+import org.eclipse.egit.gitflow.op.InitOperation;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.JobFamilies;
import org.eclipse.egit.ui.internal.UIText;
@@ -43,6 +45,7 @@ import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
@@ -493,6 +496,22 @@ public class HistoryViewTest extends GitRepositoriesViewTestBase {
}
@Test
+ public void testStartGitflowReleaseEnabled() throws Exception {
+ Repository repository = lookupRepository(repoFile);
+ new InitOperation(repository).execute(null);
+
+ final SWTBotTable table = getHistoryViewTable(PROJ1);
+ table.getTableItem(1).select();
+
+ String itemLabelRegex = NLS.bind(org.eclipse.egit.gitflow.ui.internal.
+ UIText.DynamicHistoryMenu_startGitflowReleaseFrom, ".*");
+ SWTBotMenu startReleaseMenu = table.contextMenu().menu(withRegex(itemLabelRegex),
+ true, 0);
+
+ assertTrue(startReleaseMenu.isEnabled());
+ }
+
+ @Test
@Ignore
public void testRebaseAlreadyUpToDate() throws Exception {
Repository repo = lookupRepository(repoFile);

Back to the top