Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4eaeb3b6
Commit
4eaeb3b6
authored
Nov 24, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factor audit events tests.
parent
6bcb1a03
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
31 deletions
+21
-31
features/groups.feature
features/groups.feature
+11
-11
features/project/project.feature
features/project/project.feature
+2
-2
features/steps/groups.rb
features/steps/groups.rb
+5
-9
features/steps/project/project.rb
features/steps/project/project.rb
+3
-9
No files found.
features/groups.feature
View file @
4eaeb3b6
...
...
@@ -60,17 +60,6 @@ Feature: Groups
And
I add a new LDAP synchronization
Then
I see a new LDAP synchronization listed
@javascript
Scenario
:
I
should see audit events
Given
User
"Mary Jane"
exists
When
I visit group
"Owned"
members page
And
I select user
"Mary Jane"
from list with role
"Reporter"
And
I change the role to
"Developer"
When
I visit group
"Owned"
settings page
And
I go to
"Audit Events"
Then
I should see the audit event listed
# Leave
@javascript
...
...
@@ -157,3 +146,14 @@ Feature: Groups
And
I click on one group milestone
Then
I should see group milestone with descriptions and expiry date
And
I should see group milestone with all issues and MRs assigned to that milestone
@javascript
Scenario
:
I
should see audit events
Given
User
"Mary Jane"
exists
When
I visit group
"Owned"
members page
And
I select user
"Mary Jane"
from list with role
"Reporter"
And
I change the role to
"Developer"
And
I click on the
"Remove User From Group"
button for
"Mary Jane"
When
I visit group
"Owned"
settings page
And
I go to
"Audit Events"
Then
I should see the audit event listed
features/project/project.feature
View file @
4eaeb3b6
...
...
@@ -56,7 +56,7 @@ Feature: Project
And
"Pete"
is
"Shop"
developer
When
I visit project
"Shop"
settings page
And
I go to
"Members"
Then
I change
"Pete"
access level to master
And
I visit project
"Shop"
settings page
And
I change
"Pete"
access level to master
When
I visit project
"Shop"
settings page
And
I go to
"Audit Events"
Then
I should see the audit event listed
features/steps/groups.rb
View file @
4eaeb3b6
...
...
@@ -75,16 +75,12 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
step
'I should see the audit event listed'
do
within
(
'table#audits tr:nth-child(1) td:nth-child(6)'
)
do
within
(
'table#audits'
)
do
page
.
should
have_content
'Add user access as reporter'
page
.
should
have_content
'Change access level from reporter to developer'
end
within
(
'table#audits tr:nth-child(1) td:nth-child(3)'
)
do
page
.
should
have_content
'John Doe'
end
within
(
'table#audits tr:nth-child(1) td:nth-child(8)'
)
do
page
.
should
have_content
'Mary Jane'
page
.
should
have_content
'Remove user access'
page
.
should
have_content
(
'John Doe'
,
count:
3
)
page
.
should
have_content
(
'Mary Jane'
,
count:
3
)
end
end
...
...
features/steps/project/project.rb
View file @
4eaeb3b6
...
...
@@ -101,16 +101,10 @@ class Spinach::Features::Project < Spinach::FeatureSteps
end
step
'I should see the audit event listed'
do
within
(
'table#audits
tr:nth-child(1) td:nth-child(6)
'
)
do
within
(
'table#audits'
)
do
page
.
should
have_content
"Change access level from developer to master"
end
within
(
'table#audits tr:nth-child(1) td:nth-child(3)'
)
do
page
.
should
have_content
project
.
owner
.
name
end
within
(
'table#audits tr:nth-child(1) td:nth-child(8)'
)
do
page
.
should
have_content
'Pete'
page
.
should
have_content
(
project
.
owner
.
name
)
page
.
should
have_content
(
'Pete'
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment