Skip to content

Commit

Permalink
Small improvement in the stability of the testfx unit testing in th…
Browse files Browse the repository at this point in the history
…e `jpro-media` module
  • Loading branch information
besidev committed Dec 27, 2023
1 parent 110678a commit 98af724
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ public void playback_rate_behaviour(FxRobot robot) throws TimeoutException, Inte
private void waitForStatusReady() throws TimeoutException {
waitForStatus(Status.READY);
log.debug("Run additional checks...");
WaitForAsyncUtils.waitForFxEvents();
assertThat(playButton.isDisable()).isFalse();
assertThat(pauseButton.isDisable()).isFalse();
assertThat(stopButton.isDisable()).isFalse();
Expand All @@ -553,6 +554,7 @@ private void clickPlayButton(FxRobot robot) throws TimeoutException {
robot.clickOn(playButton);
waitForStatus(Status.PLAYING);
log.debug("Run additional checks...");
WaitForAsyncUtils.waitForFxEvents();
assertThat(playButton.isDisable()).isTrue();
assertThat(pauseButton.isDisable()).isFalse();
assertThat(stopButton.isDisable()).isFalse();
Expand All @@ -564,6 +566,7 @@ private void clickStopButton(FxRobot robot) throws TimeoutException {
robot.clickOn(stopButton);
waitForStatus(Status.STOPPED);
log.debug("Run additional checks...");
WaitForAsyncUtils.waitForFxEvents();
assertThat(playButton.isDisable()).isFalse();
assertThat(pauseButton.isDisable()).isTrue();
assertThat(stopButton.isDisable()).isTrue();
Expand Down

0 comments on commit 98af724

Please sign in to comment.