ui.test_add_account

Tests for the Add Account wizard interface.

caseautomation:automated
casecomponent:ui
caseimportance:low
caselevel:integration
requirement:Cloud Meter
testtype:functional
upstream:yes
integrade.tests.ui.test_add_account.test_account_name_required(options, browser_session, ui_addacct_page1)

The first page’s Account Name field is required before proceeding.

Id:

259bf756-86da-11e8-bec5-8c1645548902

Description:

The Account Name field must not be empty before proceeding. The “Next” button must be disabled if this field is invalid.

Steps:
  1. Navigate to the dashboard and click the “Add Account” button
  2. Observe the “Next” button is disabled by default
  3. Try to enter less than 3 characters, observe the button is still disabled
  4. Entry a longer name and observe the button is enabled now
  5. Clear the field and observe the button is disabled again
Expectedresults:
 

The “Next” button should only ever be enabled when the account name field is valid.

integrade.tests.ui.test_add_account.test_add_account(drop_account_data, browser_session, ui_addacct_page3, ui_user)

The user can add a new account using a valid current ARN.

Id:

8c5e7e59-94f8-43fa-9e05-682346552252

Description:

The user can create and name a new cloud account.

Steps:
  1. Open the dashboard and click the “Add Account”
  2. Enter a name for the account
  3. Proceed to page 3
  4. Enter an ARN which is valid ARN for a resource we are granted permission to
  5. Click the “Add” button to attempt to create the account
Expectedresults:
 

The Account is created and can be fetched by the account list API for verification with the given name and ARN.

integrade.tests.ui.test_add_account.test_arn_mistakes(mistake, browser_session, ui_addacct_page3, ui_user)

The user will fail to create a new account using an invalid current ARN.

Id:

7f4e55e8-b4c2-42ac-b651-b7f6689aeebe

Description:

We ensure the correct error reponse for a number of mistakes the user can make

Steps:
  1. Open the dashboard and click the “Add Account”
  2. Enter a name for the account
  3. Proceed to page 3
  4. Enter an incorrect ARN
  5. Click the “Add” button to attempt to create the account
Expectedresults:
 

The Account is not created and the proper error is shown and is able to be corrected

Check the Add Account dialog’s AWS link.

Id:

9f7d2780-63b9-4691-a7e3-3dfa738a994b

Description:

The link to the AWS IAM console must open in a new tab and must link to the correct section, not the top-level console.

Steps:
  1. Navigate to the dashboard and click the “Add Account” button
  2. Observe the AWS link on the dialog
Expectedresults:
 

The link should go to the expected page and should target a new, blank tab.

integrade.tests.ui.test_add_account.test_aws_policy(drop_account_data, browser_session, ui_addacct_page1, ui_user)

Test the shared policy between UI and API.

Id:

82c82a98-4e03-4459-8944-9cca03b59955

Description:

The UI should use the currently single policy from the API.

Steps:
  1. Open the Add Account dialog and view the policy
  2. Get the policy from the API directly
Expectedresults:
 

The policy named traditional_inspection from the API should match the policy contents in the UI precisely.

integrade.tests.ui.test_add_account.test_cancel(drop_account_data, browser_session, ui_addacct_page3, ui_user)

The user can add a new account using a valid current ARN.

Id:

fa01c0a2-86da-11e8-af5f-8c1645548902

Description:

The user can create and name a new cloud account.

Steps:
  1. Open the dashboard and click the “Add Account”
  2. Enter a name for the account
  3. Proceed to page 3
  4. Enter an ARN which is valid ARN for a resource we are granted permission to
  5. Click the “Add” button to attempt to create the account
Expectedresults:
 

The Account is created and can be fetched by the account list API for verification with the given name and ARN.

integrade.tests.ui.test_add_account.test_fill_name_and_clear(selenium, ui_addacct_page1, ui_user)

The account name’s validity is always reflected in the Next button state.

Id:

b37525f1-e3d7-4fc9-80c1-270de82783fb

Description:

The Account Name field must not be empty before proceeding.

Steps:
  1. Navigate to the dashboard and click the “Add Account” button
  2. Observe the “Next” button is disabled by default

3) Enter a valid name and observe the “Next” button becomes enabled 5) Clear the field and observe the button is disabled again

Expectedresults:
 

The “Next” button should only ever be enabled when the account name field is valid.

integrade.tests.ui.test_add_account.test_incorrect_arn(drop_account_data, browser_session, ui_addacct_page3, ui_user)

The account cannot be added if the ARN given is not valid.

Id:

3dc59808-86c3-11e8-9cd4-8c1645548902

Description:

Walking to the end of the wizard fails if the ARN given does not give our account access to the resource.

Steps:
  1. Open the dashboard and click the “Add Account”
  2. Enter a name for the account
  3. Proceed to page 3
  4. Enter an ARN which is not a valid ARN for a resource we are granted permission to
  5. Click the “Add” button to attempt to create the account
Expectedresults:
 

The user should see the page load for a few seconds and then receive an error, after which they should not be able to continue.