From bdca5a288fc13d74730a5374bd6b92c4b1e0734f Mon Sep 17 00:00:00 2001 From: Richard Schmidt Date: Fri, 9 Feb 2024 15:26:53 +0100 Subject: [PATCH] test_StayLoggedIn checkbox in LoginGUI --- src/test/java/LoginGUITest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/LoginGUITest.java b/src/test/java/LoginGUITest.java index c3e76af..2fceb23 100644 --- a/src/test/java/LoginGUITest.java +++ b/src/test/java/LoginGUITest.java @@ -35,6 +35,16 @@ class LoginGUITest { assertFalse(loginGUI.isVisible()); } + @Test + public void testStayLoggedInCheckbox() { + // Initially, checkbox should be unchecked + assertFalse(loginGUI.getStayLoggedInCheckbox().isSelected()); + + // Simulate checking the checkbox + loginGUI.getStayLoggedInCheckbox().doClick(); + + assertTrue(loginGUI.getStayLoggedInCheckbox().isSelected()); + } }