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
Tatuya Kamada
gitlab-ce
Commits
7e43fa67
Commit
7e43fa67
authored
Dec 23, 2015
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes tests to work with jasmine/jquery
parent
3ea3d9ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
spec/javascripts/fixtures/issues_show.html.haml
spec/javascripts/fixtures/issues_show.html.haml
+7
-4
spec/javascripts/issue_spec.js.coffee
spec/javascripts/issue_spec.js.coffee
+9
-9
No files found.
spec/javascripts/fixtures/issues_show.html.haml
View file @
7e43fa67
.issue-box.issue-box-open
Open
.issue-box.issue-box-closed.hidden
Closed
%a
.btn-close
{
"data-url"
=>
"http://gitlab/issues/6/close"
}
Close
%a
.btn-reopen.hidden
{
"data-url"
=>
"http://gitlab/issues/6/reopen"
}
Reopen
:css
.hidden
{
display
:
none
!important
;
}
.status-box.status-box-open
Open
.status-box.status-box-closed.hidden
Closed
%a
.btn-close
{
"href"
=>
"http://gitlab/issues/6/close"
}
Close
%a
.btn-reopen.hidden
{
"href"
=>
"http://gitlab/issues/6/reopen"
}
Reopen
.detail-page-description
.description.js-task-list-container
...
...
spec/javascripts/issue_spec.js.coffee
View file @
7e43fa67
...
...
@@ -33,16 +33,16 @@ describe 'reopen/close issue', ->
$btnClose
=
$
(
'a.btn-close'
)
$btnReopen
=
$
(
'a.btn-reopen'
)
expect
(
$btnReopen
.
toBeHidden
()
)
expect
(
$btnReopen
).
toBeHidden
(
)
expect
(
$btnClose
.
text
()).
toBe
(
'Close'
)
expect
(
typeof
$btnClose
.
prop
(
'disabled'
)).
toBe
(
'undefined'
)
$btnClose
.
trigger
(
'click'
)
expect
(
$btn
Close
.
toBeHidden
()
)
expect
(
$btn
Reopen
.
toBeVisible
()
)
expect
(
$
(
'div.
issue-box-open'
).
toBeVisible
()
)
expect
(
$
(
'div.
issue-box-closed'
).
toBeHidden
()
)
expect
(
$btn
Reopen
).
toBeVisible
(
)
expect
(
$btn
Close
).
toBeHidden
(
)
expect
(
$
(
'div.
status-box-closed'
)).
toBeVisible
(
)
expect
(
$
(
'div.
status-box-open'
)).
toBeHidden
(
)
it
'reopens an issue'
,
->
$
.
ajax
=
(
obj
)
->
...
...
@@ -56,7 +56,7 @@ describe 'reopen/close issue', ->
$btnReopen
.
trigger
(
'click'
)
expect
(
$btnReopen
.
toBeHidden
())
expect
(
$btnClose
.
toBeVisible
())
expect
(
$
(
'div.issue-box-open'
).
toBeVisible
())
expect
(
$
(
'div.issue-box-closed'
).
toBeHidden
())
\ No newline at end of file
expect
(
$btnReopen
).
toBeHidden
()
expect
(
$btnClose
).
toBeVisible
()
expect
(
$
(
'div.status-box-open'
)).
toBeVisible
()
expect
(
$
(
'div.status-box-closed'
)).
toBeHidden
()
\ No newline at end of file
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