DESCRIPTION

Implement UI Tests for the Staging View

UI Tests were implemented for performing a commit and amending a
commit.

Change-Id: I20ed2e25bd5715fc028d8032f7e7191db59a430e
Signed-off-by: Marlie Beasley xxx@xxx.xxx
Signed-off-by: Douglas Trujillo xxx@xxx.xxx


COMMENTS

author: Marlie Beasley
date: 2011-06-12 10:53:41.000000000

Uploaded patch set 6.

-------------------------------------
author: Brenden Conley
date: 2011-06-12 10:53:47.000000000

Patch Set 6:

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

-------------------------------------
author: Brenden Conley
date: 2011-06-12 11:02:30.000000000

Patch Set 6: Build Successful

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1022/ : SUCCESS

-------------------------------------
author: Marlie Beasley
date: 2011-06-12 11:15:57.000000000

Patch Set 6:

Commit messages in the repository contain platform independent line endings (\n). Thus \n is used in the test. 
Works on Mac, needs to re-checked on WIndows / Linux.

-------------------------------------
author: Leslie Stephenson
date: 2011-06-12 14:48:46.000000000

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

(2 inline comments)

I can confirm that tests works also on Linux, but from time to time I got this  stacktrace in console:

org.eclipse.team.core.TeamException: An internal error occurred
	at org.eclipse.egit.core.op.CommitOperation.commit(CommitOperation.java:282)
	at org.eclipse.egit.ui.internal.staging.StagingView$23.commit(StagingView.java:1083)
	at org.eclipse.egit.core.op.CommitOperation$1.run(CommitOperation.java:207)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
	at org.eclipse.egit.core.op.CommitOperation.execute(CommitOperation.java:217)
	at org.eclipse.egit.ui.internal.commit.CommitUI$2.run(CommitUI.java:217)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Updating the ref HEAD to AnyObjectId[b8bb29aedb7b15139140d345be6b1ba8285e8461] failed. ReturnCode from RefUpdate.update() was NO_CHANGE
	at org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:247)
	at org.eclipse.egit.core.op.CommitOperation.commit(CommitOperation.java:271)
	... 7 more
!SUBENTRY 1 org.eclipse.team.core 4 0 2011-06-12 16:37:46.931
!MESSAGE An internal error occurred
!STACK 0
org.eclipse.jgit.api.errors.JGitInternalException: Updating the ref HEAD to AnyObjectId[b8bb29aedb7b15139140d345be6b1ba8285e8461] failed. ReturnCode from RefUpdate.update() was NO_CHANGE
	at org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:247)
	at org.eclipse.egit.core.op.CommitOperation.commit(CommitOperation.java:271)
	at org.eclipse.egit.ui.internal.staging.StagingView$23.commit(StagingView.java:1083)
	at org.eclipse.egit.core.op.CommitOperation$1.run(CommitOperation.java:207)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
	at org.eclipse.egit.core.op.CommitOperation.execute(CommitOperation.java:217)
	at org.eclipse.egit.ui.internal.commit.CommitUI$2.run(CommitUI.java:217)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

But it doesn't hit test results, they are still green ... odd.

Line:25, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/StagingViewTester.java -> is this commented line really needed?

Line:55, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java -> Is this change somehow connected with this commit?

-------------------------------------
author: Marlie Beasley
date: 2011-06-12 21:28:52.000000000

Patch Set 6: (2 inline comments)



Line:25, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/StagingViewTester.java -> Done

Line:55, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CommitActionTest.java -> I moved it from testAmend to the setup method, which is the better place. I did this in StagingViewTest and then remembered I should do it in the same way in CommitActionsTest.

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