-
Notifications
You must be signed in to change notification settings - Fork 225
Add DnD tests issue #3182 #3195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully it's possible to use IWorkbenchWindow and IWorkbenchPage instead of non-API implementation classes.
In general, please keep the PR to a single commit. Using amend and force push for that purpose rather than keep adding commits.
tests/org.eclipse.ui.tests.dnd/src/org/eclipse/ui/tests/dnd/DetachedDropTarget.java
Outdated
Show resolved
Hide resolved
tests/org.eclipse.ui.tests.dnd/src/org/eclipse/ui/tests/dnd/DetachedWindowDragTest.java
Outdated
Show resolved
Hide resolved
tests/org.eclipse.ui.tests.dnd/src/org/eclipse/ui/tests/dnd/DragTest.java
Outdated
Show resolved
Hide resolved
tests/org.eclipse.ui.tests.dnd/src/org/eclipse/ui/tests/dnd/DragTest.java
Outdated
Show resolved
Hide resolved
tests/org.eclipse.ui.tests.dnd/src/org/eclipse/ui/tests/dnd/DragTestSuite.java
Outdated
Show resolved
Hide resolved
7470cf0
to
05b8b4f
Compare
I have applied the requested changes, cleaned up all warnings, and rebased on top of the latest master. Ready for another review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the update. Before we can take a deeper look into the proposal, there are some general concerns to address.
* This method should eventually replace the original one once the Workbench has been updated | ||
* to handle Views and Editors without distincton. | ||
*/ | ||
public static void drag(IWorkbenchPart part, TestDropLocation target, boolean wholeFolder) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the tests can really work of this essential method still fails, do they?
import junit.framework.Test; | ||
|
||
@RunWith(AllTests.class) | ||
@Ignore("DND support not implemented yet in E4") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to remove the @Ignore
and should set the test suite as the class executed for the bundle in the build.properties
like in the other test bundles, e.g.:
pom.model.property.testClass = org.eclipse.ui.tests.UiTestSuite |
We finally also need to add a proper test.xml
to have the tests executed in Jenkins.
|
||
@RunWith(AllTests.class) | ||
@Ignore("DND support not implemented yet in E4") | ||
public class DragTestSuite { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pretty much looks like a JUnit-3-style TestSuite. Since we are about to migrate everything to JUnit 5 (I just migrated everything to JUnit 4), reintroducing these tests should also incorporate and up-to-date style of the test suite.
ee1dd37
to
ff0388e
Compare
I incorporated the feedback, rebased onto the current master, and squashed everything into a single commit. Thanks in advance for taking another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the latest update. Unfortunately, there is still no proper test suite and no test executed at all.
The DragTestSuite
class is not a proper test suite (neither JUnit 4 nor JUnit 5). It is just a plain JUnit 5 test class with a paramaterized test method that effectively does nothing but instantiating the DragTest
class without executing anything at all.
You will also notice that when executing the tests each of them is executed in less than millisecond (at least on my system) which is unlikely for a UI test.
One additional hint to ensure that you first come to a functional state of the tests before pinging us for review: make sure that the tests that you add/update are actually executed by testing it locally. Run the tests in your IDE and in case you are not familiar with how to set up JUnit 4/5 tests / test suites and are in doubt if it works, you can e.g. set a breakpoint in the actual test methods to ensure that they are really executed. You should also run the single test classes individually to see that they also work without running the complete test suite. |
No description provided.