BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
781fd1a8
Commit
781fd1a8
authored
Jun 16, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cucumber -> Dashboard features
parent
85b86e64
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
1 deletion
+97
-1
show.html.haml
app/views/search/show.html.haml
+1
-1
dashboard.feature
features/dashboard/dashboard.feature
+18
-0
search.feature
features/dashboard/search.feature
+11
-0
dashboard_steps.rb
features/step_definitions/dashboard_steps.rb
+67
-0
No files found.
app/views/search/show.html.haml
View file @
781fd1a8
...
...
@@ -3,7 +3,7 @@
=
label_tag
:search
do
%strong
Looking for
.input
=
text_field_tag
:search
,
params
[
:search
],
:placeholder
=>
"issue 143"
,
:class
=>
"input-xxlarge
"
=
text_field_tag
:search
,
params
[
:search
],
:placeholder
=>
"issue 143"
,
:class
=>
"input-xxlarge"
,
:id
=>
"dashboard_search
"
=
submit_tag
'Search'
,
:class
=>
"btn btn-primary"
-
if
params
[
:search
].
present?
%br
...
...
features/dashboard/dashboard.feature
View file @
781fd1a8
Feature
:
Dashboard
Background
:
Given
I signin as a user
And
I own project
"Shop"
And
project
"Shop"
has push event
And
I visit dashboard page
Scenario
:
I
should see projects list
Then
I should see
"New Project"
link
Then
I should see
"Shop"
project link
Then
I should see project
"Shop"
activity feed
Scenario
:
I
should see last pish widget
Then
I should see last push widget
And
I click
"Create Merge Request"
link
Then
I see prefilled new Merge Request page
features/dashboard/search.feature
View file @
781fd1a8
Feature
:
Dashboard Search
Background
:
Given
I signin as a user
And
I own project
"Shop"
And
I visit dashboard search page
Scenario
:
I
should see project i'm looking for
Given
I search for
"Sho"
Then
I should see
"Shop"
project link
features/step_definitions/dashboard_steps.rb
0 → 100644
View file @
781fd1a8
Given
/^I visit dashboard page$/
do
visit
dashboard_path
end
Then
/^I should see "(.*?)" link$/
do
|
arg1
|
page
.
should
have_link
(
arg1
)
end
Then
/^I should see "(.*?)" project link$/
do
|
arg1
|
page
.
should
have_link
(
arg1
)
end
Then
/^I should see project "(.*?)" activity feed$/
do
|
arg1
|
project
=
Project
.
find_by_name
(
arg1
)
page
.
should
have_content
"
#{
@user
.
name
}
pushed new branch new_design at
#{
project
.
name
}
"
end
Given
/^project "(.*?)" has push event$/
do
|
arg1
|
@project
=
Project
.
find_by_name
(
arg1
)
data
=
{
:before
=>
"0000000000000000000000000000000000000000"
,
:after
=>
"0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e"
,
:ref
=>
"refs/heads/new_design"
,
:user_id
=>
@user
.
id
,
:user_name
=>
@user
.
name
,
:repository
=>
{
:name
=>
@project
.
name
,
:url
=>
"localhost/rubinius"
,
:description
=>
""
,
:homepage
=>
"localhost/rubinius"
,
:private
=>
true
}
}
@event
=
Event
.
create
(
:project
=>
@project
,
:action
=>
Event
::
Pushed
,
:data
=>
data
,
:author_id
=>
@user
.
id
)
end
Then
/^I should see last push widget$/
do
page
.
should
have_content
"Your last push was to branch new_design"
page
.
should
have_link
"Create Merge Request"
end
Then
/^I click "(.*?)" link$/
do
|
arg1
|
click_link
"Create Merge Request"
end
Then
/^I see prefilled new Merge Request page$/
do
current_path
.
should
==
new_project_merge_request_path
(
@project
)
find
(
"#merge_request_source_branch"
).
value
.
should
==
"new_design"
find
(
"#merge_request_target_branch"
).
value
.
should
==
"master"
find
(
"#merge_request_title"
).
value
.
should
==
"New Design"
end
Given
/^I visit dashboard search page$/
do
visit
search_path
end
Given
/^I search for "(.*?)"$/
do
|
arg1
|
fill_in
"dashboard_search"
,
:with
=>
arg1
click_button
"Search"
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