Skip to content

Commit eac5555

Browse files
author
MartinTCode
committed
Slayed dragon, wrong fxml id in startview.
1 parent 270c698 commit eac5555

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

src/main/resources/com/javafullstacklibrary/frontend/borrowerViews/Start_View_Borrower.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<!-- Home Button -->
4040
<StackPane>
4141
<ImageView
42-
fx:id="homeMenuBorrower"
42+
fx:id="startMenuBorrower"
4343
styleClass="home-icon-inactive" />
4444
<!-- No Region for current/active page -->
4545
</StackPane>

src/test/java/com/javafullstacklibrary/frontend/MenuEntryTestData.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
public class MenuEntryTestData {
66

7-
private static final MenuEntry BORROWER_TRANSITION_GW = new MenuEntry(
7+
public static final MenuEntry BORROWER_TRANSITION_GW = new MenuEntry(
88
//1. transition to sign in view:
99
"#signInMenuGuest", "#ssnField", true,
1010
// List<MenuEntry>.
@@ -22,23 +22,24 @@ public class MenuEntryTestData {
2222
public static final List<MenuEntry> MENU_ENTRIES_GUESTVIEWS = List.of(
2323
new MenuEntry("#homeMenuGuest", "#welcomeTextGuest"),
2424
new MenuEntry("#searchMenuGuest", "#searchField"),
25-
new MenuEntry("#signInMenuGuest", "#ssnField"),
26-
BORROWER_TRANSITION_GW
25+
new MenuEntry("#signInMenuGuest", "#ssnField")
26+
//BORROWER_TRANSITION_GW
2727
);
2828

2929

3030

3131
// represents menus: start > search > loan > return > account > sign_out
3232
public static final List<MenuEntry> MENU_ENTRIES_BORROWERVIEWS = List.of(
33-
new MenuEntry("#homeMenuBorrower", "#welcomeMsgUser"),
33+
BORROWER_TRANSITION_GW,
34+
new MenuEntry("#startMenuBorrower", "#welcomeMsgUser"),
3435
new MenuEntry("#searchMenuBorrower", "#searchField"),
3536
new MenuEntry("#loanMenuBorrower", "#loanButtonBorrower"),
3637
new MenuEntry("#returnMenuBorrower", "#returnButtonBorrower"),
3738
new MenuEntry("#accountMenuBorrower", "#userInfoButtonBorrower"),
3839
new MenuEntry("#signOutMenuBorrower", "#confirmSignOutButtonBorrower")
3940
);
4041

41-
private static final MenuEntry LIBRARIAN_TRANSITION_GW = new MenuEntry(
42+
public static final MenuEntry LIBRARIAN_TRANSITION_GW = new MenuEntry(
4243
//1. transition to sign in view:
4344
"#signInMenuGuest", "#ssnField", true,
4445
// List<MenuEntry>.

src/test/java/com/javafullstacklibrary/frontend/StartViewGuestControllerTest.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ public class StartViewGuestControllerTest extends ApplicationTest {
5454

5555
private static final int SLEEP_TIME = 100; // milliseconds
5656

57-
//@Test
58-
@Disabled
57+
@Test
5958
@Order(1)
6059
void testGuestViewMenuButtons() {
6160
testMenuButtonClick_All (
@@ -65,14 +64,9 @@ void testGuestViewMenuButtons() {
6564
}
6665

6766

68-
// Test fails because it tries to find the node by selector "#searchButtonBorrower" after clicking the button.
69-
// This is most likely because the test is not properly transitioning to the next view.
70-
// This is disabled, beware of the dragons here.
71-
//@Test
72-
@Disabled
67+
68+
@Test
7369
@Order(2)
74-
// FIXME: there be dragons here, transition works fine, but then it finds no node for:
75-
// lookup by selector: "#searchButtonBorrower"
7670
void testBorrowerViewMenuButtons() {
7771
testMenuButtonClick_All(MENU_ENTRIES_BORROWERVIEWS,
7872
null

0 commit comments

Comments
 (0)