ui.test_login

Tests for the UI Login page.

caseautomation:automated
casecomponent:ui
caseimportance:low
caselevel:integration
requirement:Cloud Meter
testtype:functional
upstream:yes
integrade.tests.ui.test_login.test_correct_login(browser_session, ui_dashboard, ui_user)

Test the login fails with the correct username and password for the user.

Id:

5c590b1b-ad1e-4efe-ba79-ed06e558e46a

Description:

Open the cloudigrade login page and successfully log into the dashboard

Steps:
  1. Open the page and make sure we see the login form, not dashboard
  2. Fill the username field with correct credentials for the test user
  3. Click the login button to attempt a login
Expectedresults:
 

We should see the dashboard page, which the user is taken to after a successful login.

integrade.tests.ui.test_login.test_incorrect_login(browser_session, ui_loginpage, ui_user)

Test the login fails with the correct username but incorrect password.

Id:

55ce36fe-4055-4394-9cfe-2ae95a84d9d2

Description:

Open the cloudigrade interface and test that incorrect credentials fail.

Steps:
  1. Open the page and make sure we see the login form, not dashboard
  2. Fill the username field with incorrect credentials for the test user
  3. Click the login button to attempt a login
Expectedresults:
 

The login should fail with an error on the page.

integrade.tests.ui.test_login.test_login_invalid_username(new_session, browser_session, ui_loginpage_empty, ui_user)

Test the login form is invalid without an e-mail in the username.

Id:

e3858c7d-1be8-475a-944b-4a05392f404f

Description:

Open the cloudigrade interface and test non-email usernames

Steps:
  1. Open the page and make sure we see the login form, not dashboard
  2. Fill the username field with a non-email
Expectedresults:
 

The login form’s username field should not be marked as valid by the browser.

integrade.tests.ui.test_login.test_login_valid_username(browser_session, ui_loginpage, ui_user)

Test the login form is valid with an e-mail in the username.

Id:

f5288391-08b3-4a4f-9fd3-b558caadd396

Description:

Open the cloudigrade interface and test email usernames

Steps:
  1. Open the page and make sure we see the login form, not dashboard
  2. Fill the username field with an email address
Expectedresults:
 

The login form’s username field should be marked as valid by the browser.

integrade.tests.ui.test_login.test_logout(new_session, browser_session, ui_dashboard, ui_user)

Test the user can log out of the dashboard through the user menu.

Id:

88763345-a218-4d70-8dab-c98b16e2d1ef

Description:

After a successful login try to logout of the site through the user menu.

Steps:
  1. Follow the login steps to the dashboard
  2. Click the user menu identified by the username to open the menu
  3. Click the logout link in the open menu
Expectedresults:
 

The user should be taken back to the login page and when loading the site again they should still be logged out to ensure no session cookies remain valid.