@@ -13,43 +13,3 @@ def test_successful_login_to_bcss(page: Page) -> None:
1313 BcssLoginPage (page ).login_as_user_bcss401 ()
1414 # Confirm user has successfully signed in and is viewing the bcss homepage
1515 expect (page .locator ("#ntshAppTitle" )).to_contain_text ("Bowel Cancer Screening System" )
16-
17-
18- def test_login_to_bcss_with_invalid_username (page : Page ) -> None :
19- """
20- Confirms that a user with a valid password, and invalid username, can NOT log in to bcss
21- """
22- # Take environment variables from .env
23- load_dotenv ()
24- # Set an invalid username
25- username = "BCSSZZZ"
26- # Retrieve valid password from .env file
27- password = os .getenv ("BCSS_PASS" )
28- # Enter valid password with an invalid username and click 'sign in' button
29- BcssLoginPage (page ).login (username , password )
30- # Confirm error message is displayed
31- expect (page .locator ("body" )).to_contain_text ("Incorrect username or password." )
32-
33-
34- def test_login_to_bcss_with_invalid_password (page : Page ) -> None :
35- """
36- Confirms that a user with a valid username, and invalid password, can NOT log in to bcss
37- """
38- # Enter a valid username with an invalid password and click 'sign in' button
39- username = "BCSS401"
40- password = "zzzzzz"
41- BcssLoginPage (page ).login (username , password )
42- # Confirm error message is displayed
43- expect (page .locator ("body" )).to_contain_text ("Incorrect username or password." )
44-
45-
46- def test_login_to_bcss_with_no_username_or_password (page : Page ) -> None :
47- """
48- Confirms that a user can NOT log in to bcss if no credentials are entered in the log in form
49- """
50- # At the login screen, leave the fields empty and click 'sign in' button
51- username = ""
52- password = ""
53- BcssLoginPage (page ).login (username , password )
54- # Login should fail - verify that sign-in button is still visible
55- expect (page .get_by_role ("button" , name = "submit" )).to_be_visible ()
0 commit comments