• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

se-edu / addressbook-level4 / 4706
94%

Build:
DEFAULT BRANCH: master
Ran 08 Sep 2018 06:55AM UTC
Jobs 1
Files 90
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
4706

push

travis-ci

pyokagan
HelpWindowTest: fix bogus "focus on another stage" code

When run in head-full mode, HelpWindowTest fails with the following
exception:

    seedu.address.ui.HelpWindowTest > focus_helpWindowNotFocused_focused FAILED
        java.lang.AssertionError at HelpWindowTest.java:64

The line in question is from the following:

    assertFalse(helpWindow.getRoot().isFocused());

which comes right after:

    // Focus on another stage to remove focus from the helpWindow
    FxToolkit.setupStage(Stage::requestFocus);

However, despite what the comment claims, the call to
FxToolkit.setupStage(...) does not "focus on another stage". This is
because the Stage registered with TestFX is the HelpWindow stage itself.
In other words, we are just requesting the HelpWindow to focus itself,
which is the complete opposite of "removing focus from the helpWindow".

This "focus on another stage" code was written in 1c6071fa
(HelpWindowTest: fix failing test in non-headless mode, 2018-04-16). At
that point in time, the stage registered with TestFX _was_ "another
stage"[1] and so the code was correct. However, in a42ededd (Fix
stalling HelpWindowTest, 2018-06-26) this was changed such that the
stage registered with TestFX is the HelpWindow stage itself. Yet, the
code was not modified to properly operate in the new world order[2].

Fix this piece of code by creating a temporary stage to focus on, so
that the goal of "removing focus from the helpWindow" is properly
achieved.

[1]: Somewhat-ish. The full story can be found in a42ededd (Fix stalling
     HelpWindowTest, 2018-06-26).

[2]: And obviously, the author did not run tests in head-full mode :-S

1433 of 1544 relevant lines covered (92.81%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4706.1 08 Sep 2018 06:55AM UTC 0
92.81
Travis Job 4706.1
Source Files on build 4706
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #4706
  • 4bc8fdce on github
  • Prev Build on master (#4686)
  • Next Build on master (#4711)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc