Skip to content

Commit

Permalink
Replace List by ObservableList
Browse files Browse the repository at this point in the history
  • Loading branch information
dkokkotas committed May 3, 2023
1 parent 5ca78d1 commit 2cd605b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/java/org/jabref/gui/search/GlobalSearchBarTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.List;

import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.control.TextInputControl;
import javafx.scene.layout.HBox;
Expand Down Expand Up @@ -88,8 +89,8 @@ void recordingSearchQueriesOnFocusLostOnly(FxRobot robot) throws InterruptedExce

// Set the focus to another node to trigger the listener and finally record the query.
DefaultTaskExecutor.runInJavaFXThread(() -> hBox.requestFocus());
List<String> lastSearchHistory = stateManager.getWholeSearchHistory();
List<String> expected = List.of("Smith");
ObservableList<String> lastSearchHistory = stateManager.getWholeSearchHistory();
ObservableList<String> expected = FXCollections.observableArrayList("Smith");

assertEquals(FXCollections.observableList(expected), FXCollections.observableList(lastSearchHistory));
}
Expand Down

0 comments on commit 2cd605b

Please sign in to comment.