Skip to content
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

Scrollingthroughentrylisttest #1361

Merged
merged 3 commits into from
May 24, 2016

Conversation

Braunch
Copy link
Contributor

@Braunch Braunch commented May 7, 2016

I wrote a ui-test for the following use case:
I import a bib-file into a new database.
Then I double-click on the first entry in the database to open up the entry editor.
Then I click back into the table and start scrolling through the entries.
When I do that, the table should always keep the focus.

This test case tests the following pull-requests enhancement: #988
It also referes to the discussion about ui-testing: #507

  • Tests created

@Braunch Braunch self-assigned this May 7, 2016
@Braunch Braunch changed the title [WIP] Scrollingthroughentrylisttest#988 [WIP] Scrollingthroughentrylisttest May 7, 2016
@Braunch Braunch force-pushed the scrollingthroughentrylisttest#988 branch from 226ccc6 to 77bcd18 Compare May 9, 2016 10:15

//reduce the delay to speed up loading the test resource
robot().settings().delayBetweenEvents(10);
openFileChooser.fileNameTextBox().enterText(getTestFilePath(TEST_FILE_NAME));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I see right, you just want the file path as a string. So I don't think you need getTestFilePath method if you're using java.nio.path.
See here for an example.

@codecov-io
Copy link

codecov-io commented May 9, 2016

Current coverage is 28.41%

Merging #1361 into master will not change coverage

@@             master      #1361   diff @@
==========================================
  Files           695        695          
  Lines         46266      46266          
  Methods           0          0          
  Messages          0          0          
  Branches       7646       7646          
==========================================
  Hits          13144      13144          
  Misses        31992      31992          
  Partials       1130       1130          

Powered by Codecov. Last updated by 3817a44...cbea612

@Braunch Braunch force-pushed the scrollingthroughentrylisttest#988 branch from c52d448 to ec50739 Compare May 12, 2016 19:36
@Braunch
Copy link
Contributor Author

Braunch commented May 12, 2016

I created an abstract class AbstractUITest since the Undo test ( #1380 ) and the entry table test were using the same functionality. The scrolling though entry table test should now also work on windows os. @tschechlovdev can you confirm that?

@chriba chriba force-pushed the scrollingthroughentrylisttest#988 branch 4 times, most recently from 69c3ce1 to d0ff0ba Compare May 12, 2016 21:26
@tschechlovdev
Copy link
Contributor

should work now on windows 👍
can you please squash the commits, so that it is easier for others to review this PR?

@Braunch Braunch force-pushed the scrollingthroughentrylisttest#988 branch from d0ff0ba to f08f9d8 Compare May 13, 2016 07:13
@chriba chriba force-pushed the scrollingthroughentrylisttest#988 branch 2 times, most recently from a5b07da to b72501e Compare May 13, 2016 09:27
@tschechlovdev tschechlovdev added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed stupro-ready-for-internal-review labels May 13, 2016
@tschechlovdev tschechlovdev changed the title [WIP] Scrollingthroughentrylisttest Scrollingthroughentrylisttest May 13, 2016
@chriba chriba force-pushed the scrollingthroughentrylisttest#988 branch from b72501e to d1ee816 Compare May 13, 2016 10:12
@Braunch
Copy link
Contributor Author

Braunch commented May 17, 2016

Is there any feedback on this Pull-Request?

* The backlashes are replaced with forwardslashes b/c assertJ can't type the former one on windows
*/
protected String getAbsolutePath(String relativePath) {
return new File(this.getClass().getClassLoader().getResource(relativePath).getFile()).getAbsolutePath().replace("\\", "/");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please try to use Path instead of File

import static org.assertj.swing.finder.WindowFinder.findFrame;
import static org.assertj.swing.launcher.ApplicationLauncher.application;

public abstract class AbstractUITest extends AssertJSwingJUnitTestCase {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for extracting this

@chriba chriba force-pushed the scrollingthroughentrylisttest#988 branch from bb77b52 to 5b75ee0 Compare May 19, 2016 21:18
@simonharrer simonharrer merged commit fd81b71 into JabRef:master May 24, 2016
@Braunch Braunch deleted the scrollingthroughentrylisttest#988 branch May 30, 2016 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants