ui.test_acct_detail¶
Tests for account summary list.
caseautomation: | automated |
---|---|
casecomponent: | ui |
caseimportance: | high |
caselevel: | integration |
requirement: | Cloud Meter |
testtype: | functional |
upstream: | yes |
-
integrade.tests.ui.test_acct_detail.
product_id_tag_present
(driver, tag)¶ Return a boolean if the tag is found on the account detail screen.
Parameters: tag – Expects either RHEL or RHOCP Currently only can safely identify the tag if there is only one account.
-
integrade.tests.ui.test_acct_detail.
test_empty
(cloud_account_data, browser_session, ui_acct_list)¶ Test that accounts with no activity have no detail view.
Id: fb671b8a-92b7-4493-b706-b13bf76036b2
Description: Test accounts with no activity have no detail view.
Steps: - Create a user and a cloud account.
- Assert the account with no usage have no detail view.
Expectedresults: Only accounts with usage have detail views.
-
integrade.tests.ui.test_acct_detail.
test_flag_icons_on_challenged_accounts
(cloud_account_data, browser_session, ui_acct_list)¶ Presence of flag icon should correlate across accounts and images.
Id: DC7F8495-FDFE-4B55-8B95-858E8021FA7A
Description: Check that flags ARE or ARE NOT present for accounts accurately representing the status of their images (challenged/not challenged)
Steps: 1) Given a user with accounts, mock an account with images for each combination of RHEL / Openshift and disputed / undisputed. 2) Dispute images such that there are account instances of each of the following: Both RHEL and RHOCP, neither disputed Both RHEL and RHOCP, RHEL disputed Both RHEL and RHOCP, RHOCP disputed Both RHEL and RHOCP, both RHEL and RHOCP disputed
Expectedresults: - Accounts with undisputed (non-flagged) images should have no flag
- Accounts with a disputed (flagged) image should have a flag by the
disputed image tag (‘RHEL’ or ‘RHOCP’) - Accounts with both RHEL and RHOCP disputes should have both flagged
-
integrade.tests.ui.test_acct_detail.
test_hours_image
(events, cloud_account_data, browser_session, ui_acct_list)¶ Test that the account detail view displays correct data for images.
Id: 2f666f93-5844-4bfb-b0bf-e31f856657a3
Description: Test that the account detail view shows the detailed breakdown of hours used per image.
Steps: - Given a user and cloud account, mock usage for an image.
- Navigate to the account detail view.
- Assert that the image is listed.
- Assert that the image has the correct number of hours displayed.
Expectedresults: The image used is listed in the detail view and has the hours used displayed correctly.
-
integrade.tests.ui.test_acct_detail.
test_image_flagging
(cloud_account_data, browser_session, ui_acct_list, tag, flagged)¶ Flagging images should negate the detected states w/ proper indication.
Id: 5c9b8d7c-9b0d-43b5-ab1a-220556adf99c
Description: Test flagging both detected and undetected states for RHEL and Openshfit.
Steps: - Given a user and cloud account, mock an image with some usage for each combination of RHEL and Openshift being detected or undetected by cloudigrade.
- For each tag flag the detected state
Expectedresults: - For either detected or undetected states the label should appear
- Once flagged, a flag should be added
- The graph should be updated with new data
-
integrade.tests.ui.test_acct_detail.
test_image_tag
(events, cloud_account_data, browser_session, ui_acct_list, tag)¶ Test that the account detail view displays correct tags for images.
Id: 20b060c0-c2f4-4864-bb71-239720ceaa8f
Description: Test the account detail view shows correct tags for images.
Steps: - Given a user and cloud account, mock usage for an image.
- Navigate to the account detail view.
- Assert that the image is listed.
- Assert that the image has the correct number of hours displayed.
- Assert that the correct tags are displayed.
Expectedresults: Image tags are displayed in the detail view and tags do not interfere with any listing of other data.
-
integrade.tests.ui.test_acct_detail.
test_multiple_accounts
(events, drop_account_data, ui_user, ui_dashboard, browser_session)¶ Test that having multiple accounts does not interfere with detail view.
Id: 8bc0e630-2f52-4c73-a46d-355a7f79e339
Description: Test that having many accounts does not change how detail view works for a given individual account.
Steps: - Given a user and several cloud accounts, mock usage for an image
- associated with one of the accounts.
- Assert the accounts with no usage have no detail view.
- Navigate to the account detail view of the active account.
- Assert that the image is listed.
- Assert that the image has the correct number of hours displayed.
Expectedresults: Only accounts with usage have detail views and having multiple accounts does not degrade any use of the detail view.
-
integrade.tests.ui.test_acct_detail.
test_reused_image
(cloud_account_data, browser_session, ui_acct_list)¶ Multiple instances uses one image should be reflected properly.