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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
95b82607
Commit
95b82607
authored
Mar 04, 2013
by
Sato Hiroyuki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some tests for network graph
parent
f8009a48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
4 deletions
+55
-4
features/project/network.feature
features/project/network.feature
+16
-0
features/steps/project/project_network_graph.rb
features/steps/project/project_network_graph.rb
+39
-4
No files found.
features/project/network.feature
View file @
95b82607
...
...
@@ -7,3 +7,19 @@ Feature: Project Network Graph
@javascript
Scenario
:
I
should see project network
Then
page should have network graph
And
page should select
"master"
in select box
And
page should have
"master"
on graph
@javascript
Scenario
:
I
should switch ref to
"stable"
When
I switch ref to
"stable"
Then
page should have network graph
And
page should select
"stable"
in select box
And
page should have
"stable"
on graph
@javascript
Scenario
:
I
should looking for a commit by SHA of
"v2.1.0"
When
I looking for a commit by SHA of
"v2.1.0"
Then
page should have network graph
And
page should select
"master"
in select box
And
page should have
"v2.1.0"
on graph
features/steps/project/project_network_graph.rb
View file @
95b82607
...
...
@@ -4,16 +4,51 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
Then
'page should have network graph'
do
page
.
should
have_content
"Project Network Graph"
within
".graph"
do
page
.
should
have_content
"master"
end
page
.
should
have_selector
".graph"
end
And
'I visit project "Shop" network page'
do
When
'I visit project "Shop" network page'
do
# Stub Graph::JsonBuilder max_size to speed up test (10 commits vs. 650)
Graph
::
JsonBuilder
.
stub
(
max_count:
10
)
project
=
Project
.
find_by_name
(
"Shop"
)
visit
project_graph_path
(
project
,
"master"
)
end
And
'page should select "master" in select box'
do
page
.
should
have_selector
'#ref_chzn span'
,
:text
=>
"master"
end
And
'page should have "master" on graph'
do
within
'.graph'
do
page
.
should
have_content
'master'
end
end
And
'I switch ref to "stable"'
do
page
.
select
'stable'
,
:from
=>
'ref'
end
And
'page should select "stable" in select box'
do
page
.
should
have_selector
'#ref_chzn span'
,
:text
=>
"stable"
end
And
'page should have "stable" on graph'
do
within
'.graph'
do
page
.
should
have_content
'stable'
end
end
And
'I looking for a commit by SHA of "v2.1.0"'
do
within
".content .search"
do
fill_in
'q'
,
:with
=>
'98d6492'
find
(
'button'
).
click
end
end
And
'page should have "v2.1.0" on graph'
do
within
'.graph'
do
page
.
should
have_content
'v2.1.0'
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