# Login and logout test cases

A starting point: adapt these to your app. These cases cover signing in with an email and password, and signing out. They are generic, not full coverage of your app: remove what does not apply and add what is special about yours.

## LOG-01: Sign in with a registered email and its password

Type: Positive

Steps:

1. Open the sign in page
2. Enter a registered email and its password
3. Select Sign in

Expected result: The signed-in home page opens and shows the account's name.

Status: Not run

## LOG-02: A wrong password is refused

Type: Negative

Steps:

1. Open the sign in page
2. Enter a registered email and a wrong password
3. Select Sign in

Expected result: A message says the email or password is wrong, without saying which. The page stays on sign in.

Status: Not run

## LOG-03: An unregistered email gets the same message

Type: Negative

Steps:

1. Enter an email with no account and any password
2. Select Sign in

Expected result: The same message as for a wrong password shows, so nobody can learn which emails have accounts.

Status: Not run

## LOG-04: Empty fields are refused before sending

Type: Negative

Steps:

1. Leave the email and password empty
2. Select Sign in

Expected result: Each empty field is marked as required, and nothing is sent.

Status: Not run

## LOG-05: The email's letter case does not matter

Type: Boundary

Steps:

1. Enter the registered email in capitals, with the right password
2. Select Sign in

Expected result: Sign in works, if your app treats emails as case-insensitive (most do).

Status: Not run

## LOG-06: Spaces around the email are ignored

Type: Boundary

Steps:

1. Enter the registered email with a space before and after it
2. Enter the right password and select Sign in

Expected result: Sign in works, because the spaces are trimmed.

Status: Not run

## LOG-07: Repeated failures are slowed down

Type: Negative

Steps:

1. Enter a wrong password as many times as your app allows
2. Try once more

Expected result: After the limit, a message says to wait or reset the password, and further attempts are refused for a while.

Status: Not run

## LOG-08: The password is hidden as it is typed

Type: Positive

Steps:

1. Type a password in the password field
2. Select the show password control, if there is one

Expected result: The characters show as dots, and the control reveals and hides them.

Status: Not run

## LOG-09: Sign in returns to the page that was asked for

Type: Positive

Steps:

1. While signed out, open a link to a page that needs an account
2. Sign in

Expected result: The page that was asked for opens, not the home page.

Status: Not run

## LOG-10: Keyboard only sign in

Type: Positive

Steps:

1. Use Tab to reach the email, the password and the button
2. Press Enter in the password field

Expected result: Focus moves in order with a visible outline, and Enter signs in.

Status: Not run

## LOG-11: Sign out ends the session

Type: Positive

Steps:

1. While signed in, select Sign out
2. Press the browser's back button

Expected result: The sign in page shows, and the back button does not show the account's pages.

Status: Not run

## LOG-12: A saved account link needs sign in after sign out

Type: Negative

Steps:

1. Sign out
2. Open a bookmarked account page

Expected result: The sign in page opens instead of the account page.

Status: Not run

## LOG-13: A very long password

Type: Boundary

Steps:

1. Enter a password of 128 characters on the sign in form
2. Select Sign in

Expected result: It is accepted, or refused with a clear message. It is never cut short without telling the user.

Status: Not run
