DESCRIPTION

[RFC] Fix GitRepositoriesViewFetchAndPushTest

ContextMenuHelper was removed from GitRepositoriesViewFetchAndPushTest
because it was assumed that ContextMenuHelper causes the test failures.
Instead of ContextMenuHelper the context menu is triggered by using
the SWTBot contextMenu method. To make this work the setEnabled method
of FetchConfiguredRemoteCommand was changed to use
ISources.ACTIVE_CURRENT_SELECTION_NAME instead of
ISources.ACTIVE_MENU_SELECTION_NAME. Otherwise the test fails because
FetchConfiguredRemoteCommand is not enanbled when clicking the Fetch
context menu entry.

Change-Id: I49e1944b780225ae733a05b84e1e263b51d82f84
Signed-off-by: Marlie Beasley xxx@xxx.xxx


COMMENTS

author: Marlie Beasley
date: 2011-06-15 12:58:38.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2011-06-15 12:58:42.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/1062/ 

-------------------------------------
author: Brenden Conley
date: 2011-06-15 13:06:09.000000000

Patch Set 2: I would prefer that you didn't submit this

Build Unstable 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1062/ : UNSTABLE

-------------------------------------
author: Marlie Beasley
date: 2011-06-15 13:11:06.000000000

Patch Set 2:

org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException: The widget {(of type 'MenuItem' and with mnemonic 'Push')} was disposed.
	at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.<init>(AbstractSWTBot.java:106)
	at org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu.<init>(SWTBotMenu.java:42)
	at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.contextMenu(AbstractSWTBot.java:460)
	at org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem.contextMenu(SWTBotTreeItem.java:528)
	at org.eclipse.egit.ui.view.repositories.GitRepositoriesViewFetchAndPushTest.testPushToOrigin(GitRepositoriesViewFetchAndPushTest.java:101)

Why does it fail? I can execure this test a hundred times on my PC and it works. Perhaps something disturbs the UI and causes the context menu to disappear?

-------------------------------------
