Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloud
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
cloud
Merge requests
!851
Issue
#3274946
: Refactor BDD test scenarios using a user with least privileges (Cloud)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3274946
: Refactor BDD test scenarios using a user with least privileges (Cloud)
issue/cloud-3274946:3274946--refactor-bdd
into
5.x
Overview
1
Commits
3
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Merged
Kumiko Ono
requested to merge
issue/cloud-3274946:3274946--refactor-bdd
into
5.x
3 years ago
Overview
1
Commits
3
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Compare
5.x
version 4
994fa2d8
3 years ago
version 3
25da13f0
3 years ago
version 2
50f8ec45
3 years ago
version 1
226b7c61
3 years ago
5.x (base)
and
latest version
latest version
994fa2d8
3 commits,
3 years ago
version 4
994fa2d8
3 commits,
3 years ago
version 3
25da13f0
4 commits,
3 years ago
version 2
50f8ec45
2 commits,
3 years ago
version 1
226b7c61
1 commit,
3 years ago
1 file
+
42
−
39
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
tests/src/Behat/features/admin/CLOUD-ATDD-00-01-AdminCheckCleanState.feature
+
42
−
39
Options
@@ -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"
Loading