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
7545290d
Commit
7545290d
authored
Jul 03, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move audit tests for project in separate class
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
376bf540
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
47 deletions
+53
-47
features/project/audit_event.feature
features/project/audit_event.feature
+10
-1
features/project/project.feature
features/project/project.feature
+0
-11
features/steps/project/audit_event.rb
features/steps/project/audit_event.rb
+43
-0
features/steps/project/project.rb
features/steps/project/project.rb
+0
-35
No files found.
features/project/audit_event.feature
View file @
7545290d
...
...
@@ -11,4 +11,13 @@ Feature: Audit Event
And
I visit audit event page
Then
I see remove deploy key event
\ No newline at end of file
@javascript
Scenario
:
I
should see audit events
And
gitlab user
"Pete"
And
"Pete"
is
"Shop"
developer
When
I visit project
"Shop"
page
And
I go to
"Members"
And
I change
"Pete"
access level to master
And
I visit project
"Shop"
settings page
And
I go to
"Audit Events"
Then
I should see the audit event listed
features/project/project.feature
View file @
7545290d
...
...
@@ -63,17 +63,6 @@ Feature: Project
And
I visit project
"Shop"
page
Then
I should see project
"Shop"
README
@javascript
Scenario
:
I
should see audit events
And
gitlab user
"Pete"
And
"Pete"
is
"Shop"
developer
When
I visit project
"Shop"
page
And
I go to
"Members"
And
I change
"Pete"
access level to master
And
I visit project
"Shop"
settings page
And
I go to
"Audit Events"
Then
I should see the audit event listed
Scenario
:
I
tag a project
When
I visit edit project
"Shop"
page
Then
I should see project settings
...
...
features/steps/project/audit_event.rb
View file @
7545290d
...
...
@@ -24,4 +24,47 @@ class Spinach::Features::AuditEvent < Spinach::FeatureSteps
step
'I see deploy key event'
do
expect
(
page
).
to
have_content
(
"Add deploy key"
)
end
step
'I should see the audit event listed'
do
page
.
within
(
'table#audits'
)
do
expect
(
page
).
to
have_content
"Change access level from developer to master"
expect
(
page
).
to
have_content
(
project
.
owner
.
name
)
expect
(
page
).
to
have_content
(
'Pete'
)
end
end
step
'gitlab user "Pete"'
do
create
(
:user
,
name:
"Pete"
)
end
step
'"Pete" is "Shop" developer'
do
user
=
User
.
find_by
(
name:
"Pete"
)
project
=
Project
.
find_by
(
name:
"Shop"
)
project
.
team
<<
[
user
,
:developer
]
end
step
'I go to "Members"'
do
find
(
:link
,
'Members'
).
trigger
(
'click'
)
end
step
'I visit project "Shop" settings page'
do
find
(
:link
,
'Settings'
).
trigger
(
'click'
)
end
step
'I change "Pete" access level to master'
do
user
=
User
.
find_by
(
name:
"Pete"
)
project_member
=
@project
.
project_members
.
find_by
(
user_id:
user
)
page
.
within
"#project_member_
#{
project_member
.
id
}
"
do
click_button
"Edit access level"
select
"Master"
,
from:
"project_member_access_level"
click_button
"Save"
end
sleep
0.05
end
step
'I go to "Audit Events"'
do
find
(
:link
,
'Audit Events'
).
trigger
(
'click'
)
end
end
features/steps/project/project.rb
View file @
7545290d
...
...
@@ -112,16 +112,6 @@ class Spinach::Features::Project < Spinach::FeatureSteps
expect
(
page
).
to
have_content
'testme'
end
step
'gitlab user "Pete"'
do
create
(
:user
,
name:
"Pete"
)
end
step
'"Pete" is "Shop" developer'
do
user
=
User
.
find_by
(
name:
"Pete"
)
project
=
Project
.
find_by
(
name:
"Shop"
)
project
.
team
<<
[
user
,
:developer
]
end
step
'I visit project "Shop" settings page'
do
click_link
'Settings'
end
...
...
@@ -130,31 +120,6 @@ class Spinach::Features::Project < Spinach::FeatureSteps
click_link
'Members'
end
step
'I change "Pete" access level to master'
do
user
=
User
.
find_by
(
name:
"Pete"
)
project_member
=
@project
.
project_members
.
find_by
(
user_id:
user
)
page
.
within
"#project_member_
#{
project_member
.
id
}
"
do
click_button
"Edit access level"
select
"Master"
,
from:
"project_member_access_level"
click_button
"Save"
end
sleep
0.05
end
step
'I go to "Audit Events"'
do
find
(
:link
,
'Audit Events'
).
trigger
(
'click'
)
end
step
'I should see the audit event listed'
do
page
.
within
(
'table#audits'
)
do
expect
(
page
).
to
have_content
"Change access level from developer to master"
expect
(
page
).
to
have_content
(
project
.
owner
.
name
)
expect
(
page
).
to
have_content
(
'Pete'
)
end
end
step
'I add project tags'
do
fill_in
'Tags'
,
with:
'tag1, tag2'
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