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
iv
gitlab-ce
Commits
1281c122
Commit
1281c122
authored
Aug 03, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issues cucumber. refactored step_definitoons
parent
b846ac10
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
115 additions
and
184 deletions
+115
-184
features/projects/issues/issues.feature
features/projects/issues/issues.feature
+28
-2
features/step_definitions/profile/profile_keys_steps.rb
features/step_definitions/profile/profile_keys_steps.rb
+0
-0
features/step_definitions/profile/profile_steps.rb
features/step_definitions/profile/profile_steps.rb
+0
-0
features/step_definitions/project/browse_code_steps.rb
features/step_definitions/project/browse_code_steps.rb
+0
-0
features/step_definitions/project/project_commits_steps.rb
features/step_definitions/project/project_commits_steps.rb
+0
-0
features/step_definitions/project/project_issues_steps.rb
features/step_definitions/project/project_issues_steps.rb
+47
-0
features/step_definitions/project/project_merge_requests_steps.rb
.../step_definitions/project/project_merge_requests_steps.rb
+0
-0
features/step_definitions/project/project_team_steps.rb
features/step_definitions/project/project_team_steps.rb
+0
-0
features/step_definitions/project/project_wiki_steps.rb
features/step_definitions/project/project_wiki_steps.rb
+0
-0
features/step_definitions/project/projects_steps.rb
features/step_definitions/project/projects_steps.rb
+0
-0
spec/requests/atom/issues_spec.rb
spec/requests/atom/issues_spec.rb
+40
-0
spec/requests/issues_notes_spec.rb
spec/requests/issues_notes_spec.rb
+0
-27
spec/requests/issues_spec.rb
spec/requests/issues_spec.rb
+0
-155
No files found.
features/projects/issues/issues.feature
View file @
1281c122
...
@@ -7,6 +7,32 @@ Feature: Issues
...
@@ -7,6 +7,32 @@ Feature: Issues
And
I visit project
"Shop"
issues page
And
I visit project
"Shop"
issues page
Scenario
:
I
should see open issues
Scenario
:
I
should see open issues
Given
I should see
"Release 0.4"
open issue
Given
I should see
"Release 0.4"
in issues
And
I should not see
"Release 0.3"
closed issue
And
I should not see
"Release 0.3"
in issues
Scenario
:
I
should see closed issues
Given
I click link
"Closed"
Then
I should see
"Release 0.3"
in issues
And
I should not see
"Release 0.4"
in issues
Scenario
:
I
should see all issues
Given
I click link
"All"
Then
I should see
"Release 0.3"
in issues
And
I should see
"Release 0.4"
in issues
Scenario
:
I
visit issue page
Given
I click link
"Release 0.4"
Then
I should see issue
"Release 0.4"
@javascript
Scenario
:
I
submit new unassigned issue
Given
I click link
"New Issue"
And
I submit new issue
"500 error on profile"
Given
I click link
"500 error on profile"
Then
I should see issue
"500 error on profile"
@javascript
Scenario
:
I
comment issue
Given
I visit issue page
"Release 0.4"
And
I leave a comment like
"XML attached"
Then
I should see commetn
"XML attached"
features/step_definitions/profile_keys_steps.rb
→
features/step_definitions/profile
/profile
_keys_steps.rb
View file @
1281c122
File moved
features/step_definitions/profile_steps.rb
→
features/step_definitions/profile
/profile
_steps.rb
View file @
1281c122
File moved
features/step_definitions/browse_code_steps.rb
→
features/step_definitions/
project/
browse_code_steps.rb
View file @
1281c122
File moved
features/step_definitions/project_commits_steps.rb
→
features/step_definitions/project
/project
_commits_steps.rb
View file @
1281c122
File moved
features/step_definitions/project_issues_steps.rb
→
features/step_definitions/project
/project
_issues_steps.rb
View file @
1281c122
...
@@ -12,11 +12,36 @@ Given /^I visit project "(.*?)" issues page$/ do |arg1|
...
@@ -12,11 +12,36 @@ Given /^I visit project "(.*?)" issues page$/ do |arg1|
visit
project_issues_path
(
Project
.
find_by_name
(
arg1
))
visit
project_issues_path
(
Project
.
find_by_name
(
arg1
))
end
end
Given
/^I should see "(.*?)"
open issue
$/
do
|
arg1
|
Given
/^I should see "(.*?)"
in issues
$/
do
|
arg1
|
page
.
should
have_content
arg1
page
.
should
have_content
arg1
end
end
Given
/^I should not see "(.*?)"
closed issue
$/
do
|
arg1
|
Given
/^I should not see "(.*?)"
in issues
$/
do
|
arg1
|
page
.
should_not
have_content
arg1
page
.
should_not
have_content
arg1
end
end
Then
/^I should see issue "(.*?)"$/
do
|
arg1
|
issue
=
Issue
.
find_by_title
(
arg1
)
page
.
should
have_content
issue
.
title
page
.
should
have_content
issue
.
author_name
page
.
should
have_content
issue
.
project
.
name
end
Given
/^I visit issue page "(.*?)"$/
do
|
arg1
|
issue
=
Issue
.
find_by_title
(
arg1
)
visit
project_issue_path
(
issue
.
project
,
issue
)
end
Given
/^I leave a comment like "(.*?)"$/
do
|
arg1
|
fill_in
"note_note"
,
:with
=>
arg1
click_button
"Add Comment"
end
Then
/^I should see commetn "(.*?)"$/
do
|
arg1
|
page
.
should
have_content
(
arg1
)
end
Given
/^I submit new issue "(.*?)"$/
do
|
arg1
|
fill_in
"issue_title"
,
:with
=>
arg1
click_button
"Submit new issue"
end
features/step_definitions/project_merge_requests_steps.rb
→
features/step_definitions/project
/project
_merge_requests_steps.rb
View file @
1281c122
File moved
features/step_definitions/project_team_steps.rb
→
features/step_definitions/project
/project
_team_steps.rb
View file @
1281c122
File moved
features/step_definitions/project_wiki_steps.rb
→
features/step_definitions/project
/project
_wiki_steps.rb
View file @
1281c122
File moved
features/step_definitions/projects_steps.rb
→
features/step_definitions/project
/project
s_steps.rb
View file @
1281c122
File moved
spec/requests/atom/issues_spec.rb
0 → 100644
View file @
1281c122
require
'spec_helper'
describe
"Issues"
do
let
(
:project
)
{
Factory
:project
}
before
do
login_as
:user
project
.
add_access
(
@user
,
:read
,
:write
)
end
describe
"GET /issues"
do
before
do
@issue
=
Factory
:issue
,
:author
=>
@user
,
:assignee
=>
@user
,
:project
=>
project
visit
project_issues_path
(
project
)
end
it
"should render atom feed"
do
visit
project_issues_path
(
project
,
:atom
)
page
.
response_headers
[
'Content-Type'
].
should
have_content
(
"application/atom+xml"
)
page
.
body
.
should
have_selector
(
"title"
,
:text
=>
"
#{
project
.
name
}
issues"
)
page
.
body
.
should
have_selector
(
"author email"
,
:text
=>
@issue
.
author_email
)
page
.
body
.
should
have_selector
(
"entry summary"
,
:text
=>
@issue
.
title
)
end
it
"should render atom feed via private token"
do
logout
visit
project_issues_path
(
project
,
:atom
,
:private_token
=>
@user
.
private_token
)
page
.
response_headers
[
'Content-Type'
].
should
have_content
(
"application/atom+xml"
)
page
.
body
.
should
have_selector
(
"title"
,
:text
=>
"
#{
project
.
name
}
issues"
)
page
.
body
.
should
have_selector
(
"author email"
,
:text
=>
@issue
.
author_email
)
page
.
body
.
should
have_selector
(
"entry summary"
,
:text
=>
@issue
.
title
)
end
end
end
spec/requests/issues_notes_spec.rb
deleted
100644 → 0
View file @
b846ac10
require
'spec_helper'
describe
"Issues"
do
let
(
:project
)
{
Factory
:project
}
before
do
login_as
:user
project
.
add_access
(
@user
,
:read
,
:write
)
@issue
=
Factory
:issue
,
:author
=>
@user
,
:assignee
=>
@user
,
:project
=>
project
end
describe
"add new note"
,
:js
=>
true
do
before
do
visit
project_issue_path
(
project
,
@issue
)
fill_in
"note_note"
,
:with
=>
"I commented this issue"
click_button
"Add Comment"
end
it
"should conatin new note"
do
page
.
should
have_content
(
"I commented this issue"
)
end
end
end
spec/requests/issues_spec.rb
View file @
1281c122
...
@@ -11,161 +11,6 @@ describe "Issues" do
...
@@ -11,161 +11,6 @@ describe "Issues" do
project
.
add_access
(
@user2
,
:read
,
:write
)
project
.
add_access
(
@user2
,
:read
,
:write
)
end
end
describe
"GET /issues"
do
before
do
@issue
=
Factory
:issue
,
:author
=>
@user
,
:assignee
=>
@user
,
:project
=>
project
visit
project_issues_path
(
project
)
end
subject
{
page
}
it
{
should
have_content
(
@issue
.
title
[
0
..
20
])
}
it
{
should
have_content
(
@issue
.
project
.
name
)
}
it
{
should
have_content
(
@issue
.
assignee
.
name
)
}
it
"should render atom feed"
do
visit
project_issues_path
(
project
,
:atom
)
page
.
response_headers
[
'Content-Type'
].
should
have_content
(
"application/atom+xml"
)
page
.
body
.
should
have_selector
(
"title"
,
:text
=>
"
#{
project
.
name
}
issues"
)
page
.
body
.
should
have_selector
(
"author email"
,
:text
=>
@issue
.
author_email
)
page
.
body
.
should
have_selector
(
"entry summary"
,
:text
=>
@issue
.
title
)
end
it
"should render atom feed via private token"
do
logout
visit
project_issues_path
(
project
,
:atom
,
:private_token
=>
@user
.
private_token
)
page
.
response_headers
[
'Content-Type'
].
should
have_content
(
"application/atom+xml"
)
page
.
body
.
should
have_selector
(
"title"
,
:text
=>
"
#{
project
.
name
}
issues"
)
page
.
body
.
should
have_selector
(
"author email"
,
:text
=>
@issue
.
author_email
)
page
.
body
.
should
have_selector
(
"entry summary"
,
:text
=>
@issue
.
title
)
end
describe
"statuses"
do
before
do
@closed_issue
=
Factory
:issue
,
:author
=>
@user
,
:assignee
=>
@user
,
:project
=>
project
,
:closed
=>
true
end
it
"should show only open"
do
should
have_content
(
@issue
.
title
[
0
..
25
])
should
have_no_content
(
@closed_issue
.
title
)
end
it
"should show only closed"
do
click_link
"Closed"
should
have_no_content
(
@issue
.
title
)
should
have_content
(
@closed_issue
.
title
[
0
..
25
])
end
it
"should show all"
do
click_link
"All"
should
have_content
(
@issue
.
title
[
0
..
25
])
should
have_content
(
@closed_issue
.
title
[
0
..
25
])
end
end
end
describe
"New issue"
,
:js
=>
true
do
before
do
visit
project_issues_path
(
project
)
click_link
"New Issue"
end
it
"should open new issue form"
do
page
.
should
have_content
(
"New Issue"
)
end
describe
"fill in"
do
describe
'assign to me'
do
before
do
fill_in
"issue_title"
,
:with
=>
"bug 345"
page
.
execute_script
(
"$('#issue_assignee_id').show();"
)
select
@user
.
name
,
:from
=>
"issue_assignee_id"
end
it
{
expect
{
click_button
"Submit new issue"
}.
to
change
{
Issue
.
count
}.
by
(
1
)
}
it
"should add new issue to table"
do
click_button
"Submit new issue"
page
.
should_not
have_content
(
"Add new issue"
)
page
.
should
have_content
@user
.
name
page
.
should
have_content
"bug 345"
page
.
should
have_content
project
.
name
end
it
"should call send mail"
do
Notify
.
should_not_receive
(
:new_issue_email
)
click_button
"Submit new issue"
end
end
describe
'assign to other'
do
before
do
fill_in
"issue_title"
,
:with
=>
"bug 345"
page
.
execute_script
(
"$('#issue_assignee_id').show();"
)
select
@user2
.
name
,
:from
=>
"issue_assignee_id"
end
it
{
expect
{
click_button
"Submit new issue"
}.
to
change
{
Issue
.
count
}.
by
(
1
)
}
it
"should add new issue to table"
do
click_button
"Submit new issue"
page
.
should_not
have_content
(
"Add new issue"
)
page
.
should
have_content
@user2
.
name
page
.
should
have_content
"bug 345"
page
.
should
have_content
project
.
name
end
it
"should call send mail"
do
Issue
.
observers
.
enable
:issue_observer
do
Notify
.
should_receive
(
:new_issue_email
).
and_return
(
stub
(
:deliver
=>
true
))
click_button
"Submit new issue"
end
end
it
"should send valid email to user"
do
Issue
.
observers
.
enable
:issue_observer
do
with_resque
do
click_button
"Submit new issue"
end
issue
=
Issue
.
last
email
=
ActionMailer
::
Base
.
deliveries
.
last
email
.
subject
.
should
have_content
(
"New Issue was created"
)
email
.
body
.
should
have_content
(
issue
.
title
)
end
end
end
end
end
describe
"Show issue"
do
before
do
@issue
=
Factory
:issue
,
:author
=>
@user
,
:assignee
=>
@user
,
:project
=>
project
visit
project_issue_path
(
project
,
@issue
)
end
it
"should have valid show page for issue"
do
page
.
should
have_content
@issue
.
title
page
.
should
have_content
@user
.
name
end
end
describe
"Edit issue"
,
:js
=>
true
do
describe
"Edit issue"
,
:js
=>
true
do
before
do
before
do
@issue
=
Factory
:issue
,
@issue
=
Factory
:issue
,
...
...
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