Skip to content
Snippets Groups Projects
Commit 713b6d94 authored by Kumiko Ono's avatar Kumiko Ono Committed by Yas Naoi
Browse files

Issue #3274946 by kumikoono, yas: Refactor BDD test scenarios using a user...

Issue #3274946 by kumikoono, yas: Refactor BDD test scenarios using a user with least privileges (Cloud)
parent 3fe1bb59
No related branches found
No related tags found
4 merge requests!1759Issue #3356778: Release 5.1.1,!1679Issue #3349074: Fix the OpenStack Project create and edit form in SPA that "Member" cannot be saved due to a validation error,!1607Issue #3343582: Add the function to preview OpenStack stack in the SPA,!1032Issue #3284576: Release 5.0.0-alpha2
......@@ -10,63 +10,66 @@ Feature: Login, Check the Clean State, and Logout
And I should see the heading "Log in"
@api
Scenario Outline: Log in as "Authenticated user" and "Administrator"
Scenario Outline: See links in the navigation bar
Given I am logged in as a user with the <role> role
When I should see the link "Cloud service providers" in the "nav_bar"
And I should see the link "Design" in the "nav_bar"
Then I should <verb> the link "Manage" in the "nav_bar"
Examples:
| role | verb |
| "Authenticated user" | not see |
| "Cloud administrator" | see |
| "Administrator" | see |
@api
Scenario Outline: Access cloud service providers
Given I am logged in as a user with the <role> role
# Make sure the clean state where no cloud service providers exist
And I should not see the link "All" in the "nav_bar"
And I should <verb> "Add cloud service provider" in the "nav_bar"
When I go to "/clouds"
Then I should get a <code> HTTP response
Then I should be on "/admin/structure/cloud_config/add"
And I should get a <code> HTTP response
And I should see the heading <heading>
Examples:
| role | code | heading |
| "Authenticated user" | 403 | "Access denied" |
| "Administrator" | 200 | "Add cloud service provider" |
| role | verb | code | heading |
| "Authenticated user" | not see | 403 | "Access denied" |
| "Cloud administrator" | see | 200 | "Add cloud service provider" |
| "Administrator" | see | 200 | "Add cloud service provider" |
@api
Scenario: Log in as "Administrator" and see if no cloud service provider
Given I am logged in as a user with the "Administrator" role
And I should not see the link "All" in the "nav_bar"
When I visit "/clouds"
Scenario: Manage cloud service providers as "Cloud administrator"
Given I am logged in as a user with the "Cloud administrator" role
And I should see the link "Manage" in the "nav_bar"
When I click "Manage" in the "nav_bar"
Then I should be on "/admin/structure/cloud_config"
And I should see "Cloud service providers"
@api
Scenario: View the list of cloud service providers as "Cloud administrator"
Given I am logged in as a user with the "Cloud administrator" role
And I visit "/clouds"
Then I should be on "/admin/structure/cloud_config/add"
And I should see "There is no cloud service provider."
# Make sure the clean state where no cloud service providers exist
And I should see the success message "There is no cloud service provider."
And I should see the link "AWS Cloud"
And I should see the link "K8s"
And I should see the link "VMware"
@api
Scenario Outline: Log out as "Authenticated user" and "Administrator"
Scenario Outline: Log out
Given I am logged in as a user with the <role> role
And I should not see the link "All" in the "nav_bar"
And I visit "/"
And I see the heading "Cloud Service Provider Location Map"
When I click "Log out"
When I see the heading "Cloud Service Provider Location Map"
And I should see the link "Log out"
And I click "Log out"
Then I should be on "/user/login"
And I should see the link "Log in"
Examples:
| role |
| "Authenticated user" |
| "Cloud administrator"|
| "Administrator" |
@api
Scenario Outline: View the list of cloud service providers
Given I am logged in as a user with the <role> role
And I should not see the link "All" in the "nav_bar"
When I go to "/clouds"
Then I should be on "/admin/structure/cloud_config/add"
And I should get a <code> HTTP response
And I should see the heading <heading>
Examples:
| role | code | heading |
| "Authenticated user" | 403 | "Access denied" |
| "Administrator" | 200 | "Add cloud service provider" |
@api
Scenario: "Administrator" can view the list of cloud service providers
Given I am logged in as a user with the "Administrator" role
And I should not see the link "All" in the "nav_bar"
When I visit "/clouds"
Then I should be on "/admin/structure/cloud_config/add"
And I should see "There is no cloud service provider."
And I should see the link "AWS Cloud"
And I should see the link "K8s"
And I should see the link "VMware"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment