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
3e7e7ae0
Commit
3e7e7ae0
authored
Dec 21, 2015
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarifies tests with methods like `toBeVisible()` etc.
parent
fec7c99e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
issue_spec.js.coffee
spec/javascripts/issue_spec.js.coffee
+10
-12
No files found.
spec/javascripts/issue_spec.js.coffee
View file @
3e7e7ae0
...
@@ -34,7 +34,7 @@ describe 'reopen/close issue', ->
...
@@ -34,7 +34,7 @@ describe 'reopen/close issue', ->
# setup
# setup
$btnClose
=
$
(
'a.btn-close'
)
$btnClose
=
$
(
'a.btn-close'
)
$btnReopen
=
$
(
'a.btn-reopen'
)
$btnReopen
=
$
(
'a.btn-reopen'
)
expect
(
$btnReopen
.
hasClass
(
'hidden'
)).
toBe
(
true
)
expect
(
$btnReopen
.
toBeHidden
()
)
expect
(
$btnClose
.
text
()).
toBe
(
'Close'
)
expect
(
$btnClose
.
text
()).
toBe
(
'Close'
)
expect
(
typeof
$btnClose
.
prop
(
'disabled'
)).
toBe
(
'undefined'
)
expect
(
typeof
$btnClose
.
prop
(
'disabled'
)).
toBe
(
'undefined'
)
...
@@ -42,11 +42,10 @@ describe 'reopen/close issue', ->
...
@@ -42,11 +42,10 @@ describe 'reopen/close issue', ->
$btnClose
.
trigger
(
'click'
)
$btnClose
.
trigger
(
'click'
)
# verify
# verify
expect
(
$btnClose
.
hasClass
(
'hidden'
)).
toBe
(
true
)
expect
(
$btnClose
.
toBeHidden
())
expect
(
$btnReopen
.
hasClass
(
'hidden'
)).
toBe
(
false
)
expect
(
$btnReopen
.
toBeVisible
())
expect
(
$btnClose
.
prop
(
'disabled'
)).
toBe
(
false
)
expect
(
$
(
'div.issue-box-open'
).
toBeVisible
())
expect
(
$
(
'div.issue-box-open'
).
hasClass
(
'hidden'
)).
toBe
(
true
)
expect
(
$
(
'div.issue-box-closed'
).
toBeHidden
())
expect
(
$
(
'div.issue-box-closed'
).
hasClass
(
'hidden'
)).
toBe
(
false
)
# teardown
# teardown
it
'reopens an issue'
,
->
it
'reopens an issue'
,
->
...
@@ -58,17 +57,15 @@ describe 'reopen/close issue', ->
...
@@ -58,17 +57,15 @@ describe 'reopen/close issue', ->
# setup
# setup
$btnClose
=
$
(
'a.btn-close'
)
$btnClose
=
$
(
'a.btn-close'
)
$btnReopen
=
$
(
'a.btn-reopen'
)
$btnReopen
=
$
(
'a.btn-reopen'
)
expect
(
typeof
$btnReopen
.
prop
(
'disabled'
)).
toBe
(
'undefined'
)
expect
(
$btnReopen
.
text
()).
toBe
(
'Reopen'
)
expect
(
$btnReopen
.
text
()).
toBe
(
'Reopen'
)
# excerize
# excerize
$btnReopen
.
trigger
(
'click'
)
$btnReopen
.
trigger
(
'click'
)
# verify
# verify
expect
(
$btnReopen
.
hasClass
(
'hidden'
)).
toBe
(
true
)
expect
(
$btnReopen
.
toBeHidden
())
expect
(
$btnClose
.
hasClass
(
'hidden'
)).
toBe
(
false
)
expect
(
$btnClose
.
toBeVisible
())
expect
(
$btnReopen
.
prop
(
'disabled'
)).
toBe
(
false
)
expect
(
$
(
'div.issue-box-open'
).
toBeVisible
())
expect
(
$
(
'div.issue-box-open'
).
hasClass
(
'hidden'
)).
toBe
(
false
)
expect
(
$
(
'div.issue-box-closed'
).
toBeHidden
())
expect
(
$
(
'div.issue-box-closed'
).
hasClass
(
'hidden'
)).
toBe
(
true
)
# teardown
# teardown
\ 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