diff options
author | Mathias Kinzler | 2011-02-18 11:28:59 +0000 |
---|---|---|
committer | Mathias Kinzler | 2011-02-18 11:28:59 +0000 |
commit | 2f988d30b0026484cc9938234ca282e5c24c6769 (patch) | |
tree | 26ea39a9356999de33f98f015eb7555880bbdb4c /org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history | |
parent | 2a91d984e03278beef680eb20d8c3376ae5cb522 (diff) | |
download | egit-2f988d30b0026484cc9938234ca282e5c24c6769.tar.gz egit-2f988d30b0026484cc9938234ca282e5c24c6769.tar.xz egit-2f988d30b0026484cc9938234ca282e5c24c6769.zip |
Fix HistoryView tests after commit 611459632b77
Due to the asynchronous updates, we have to add a few waits to make
the tests work again. In the longer run, we should probably try and
decouple the commit table, the message viewer, and the file list
updates completely from each other by spawning jobs. Then the tests
should join with these jobs to obtain proper synchronization.
Change-Id: I8b872d82cc1da64a4db884b3e3848ca57e824645
Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history')
-rw-r--r-- | org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java | 6 |
1 files changed, 6 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 2244525931..b132c0942f 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 @@ -37,6 +37,7 @@ import org.eclipse.swt.widgets.TableItem; import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotPerspective; import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView; import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner; +import org.eclipse.swtbot.swt.finder.waits.Conditions; import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem; @@ -228,6 +229,7 @@ public class HistoryViewTest extends LocalRepositoryTestCase { String commitMessage = "The special commit"; int countBefore = getHistoryViewTable(PROJ1).rowCount(); touchAndSubmit(commitMessage); + waitInUI(); int countAfter = getHistoryViewTable(PROJ1).rowCount(); assertEquals("Wrong number of entries", countBefore + 1, countAfter); assertEquals("Wrong comit message", commitMessage, @@ -252,6 +254,7 @@ public class HistoryViewTest extends LocalRepositoryTestCase { else explorerItem = getProjectItem(projectExplorerTree, path[0]) .expand().getNode(path[1]).expand().getNode(path[2]); + bot.waitUntil(Conditions.widgetIsEnabled(explorerItem)); explorerItem.select(); ContextMenuHelper.clickContextMenu(projectExplorerTree, "Show In", "History"); @@ -334,6 +337,9 @@ public class HistoryViewTest extends LocalRepositoryTestCase { } }); + while (!ContextMenuHelper.isContextMenuItemEnabled(table, UIText.GitHistoryPage_CheckoutMenuLabel)){ + waitInUI(); + } ContextMenuHelper.clickContextMenu(table, UIText.GitHistoryPage_CheckoutMenuLabel); TestUtil.joinJobs(JobFamilies.CHECKOUT); |