Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2019-11-07 16:22:35 +0000
committerThomas Wolf2019-11-07 17:30:12 +0000
commit64bc32a1af050e2d5ef8e25359bd638aa94cc4b6 (patch)
treea1be7fb2731c8f105355fc68c27ce4e1990f48f2 /org.eclipse.egit.ui.test/src
parent35ef2d7ac08a3230be498a9e999ec3f516edb821 (diff)
downloadegit-64bc32a1af050e2d5ef8e25359bd638aa94cc4b6.tar.gz
egit-64bc32a1af050e2d5ef8e25359bd638aa94cc4b6.tar.xz
egit-64bc32a1af050e2d5ef8e25359bd638aa94cc4b6.zip
[staging view] Run deletion and discarding changes in background jobs
Run the DeletePathsOperation in a job. The normal DeleteResourceAction also performs the deletion in a job. For resetting, re-use the DiscardChangesOperation and also run it in a job. Name the UI text keys for DeletePathsOperationUI consistently. Fix broken GitRepositoriesViewTest.testDeleteFileNotInProject(); this test actually tested the wrong thing and worked only by chance. It should have failed since commit a422ae25 when the button label was changed. It kept on working because it actually got the platform's "Delete Resources" dialog, not EGit's "Delete Files" dialog, which until now happened to have the same title. Bug: 552776 Change-Id: I8da1967e9bf2151d89ef06fdeedccab0059b7568 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui.test/src')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java
index 21661ddca2..cb387c3a96 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java
@@ -775,6 +775,9 @@ public class GitRepositoriesViewTest extends GitRepositoriesViewTestBase {
@Test
public void testDeleteFileNotInProject() throws Exception {
+ // PROJ2 is still a valid Eclipse project at that point, even though the
+ // .project file wasn't committed. Close it.
+ ResourcesPlugin.getWorkspace().getRoot().getProject(PROJ2).close(null);
SWTBotTree tree = getOrOpenView().bot().tree();
refreshAndWait();
@@ -785,8 +788,8 @@ public class GitRepositoriesViewTest extends GitRepositoriesViewTestBase {
myUtil.getPluginLocalizedValue("RepoViewDeleteFile.label"));
SWTBotShell confirm = bot
- .shell(UIText.DeleteResourcesOperationUI_confirmActionTitle);
- confirm.bot().button(IDialogConstants.OK_LABEL).click();
+ .shell(UIText.DeletePathsOperationUI_confirmActionTitle);
+ confirm.bot().button(UIText.DeletePathsOperationUI_ButtonOK).click();
bot.waitUntil(shellCloses(confirm));
TestUtil.joinJobs(JobFamilies.REPO_VIEW_REFRESH);

Back to the top