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

se-edu / addressbook-level4 / 4706 / 1
94%
master: 94%

Build:
DEFAULT BRANCH: master
Ran 08 Sep 2018 06:55AM UTC
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

08 Sep 2018 06:52AM UTC coverage: 92.811%. Remained the same
4706.1

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

Source Files on job 4706.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 4455
  • Travis Job 4706.1
  • 4bc8fdce on github
  • Prev Job for on master (#4686.1)
  • Next Job for on master (#4711.1)
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