Added text_utility to JS tests
This commit is contained in:
parent
4140c4622f
commit
b543a96e1c
|
@ -1,3 +1,4 @@
|
||||||
|
#= require lib/text_utility
|
||||||
#= require issue
|
#= require issue
|
||||||
|
|
||||||
describe 'Issue', ->
|
describe 'Issue', ->
|
||||||
|
@ -38,7 +39,7 @@ describe 'reopen/close issue', ->
|
||||||
expect(typeof $btnClose.prop('disabled')).toBe('undefined')
|
expect(typeof $btnClose.prop('disabled')).toBe('undefined')
|
||||||
|
|
||||||
$btnClose.trigger('click')
|
$btnClose.trigger('click')
|
||||||
|
|
||||||
expect($btnReopen).toBeVisible()
|
expect($btnReopen).toBeVisible()
|
||||||
expect($btnClose).toBeHidden()
|
expect($btnClose).toBeHidden()
|
||||||
expect($('div.status-box-closed')).toBeVisible()
|
expect($('div.status-box-closed')).toBeVisible()
|
||||||
|
@ -50,7 +51,7 @@ describe 'reopen/close issue', ->
|
||||||
expect(req.type).toBe('PUT')
|
expect(req.type).toBe('PUT')
|
||||||
expect(req.url).toBe('http://goesnowhere.nothing/whereami')
|
expect(req.url).toBe('http://goesnowhere.nothing/whereami')
|
||||||
req.success saved: false
|
req.success saved: false
|
||||||
|
|
||||||
$btnClose = $('a.btn-close')
|
$btnClose = $('a.btn-close')
|
||||||
$btnReopen = $('a.btn-reopen')
|
$btnReopen = $('a.btn-reopen')
|
||||||
$btnClose.attr('href','http://goesnowhere.nothing/whereami')
|
$btnClose.attr('href','http://goesnowhere.nothing/whereami')
|
||||||
|
@ -59,7 +60,7 @@ describe 'reopen/close issue', ->
|
||||||
expect(typeof $btnClose.prop('disabled')).toBe('undefined')
|
expect(typeof $btnClose.prop('disabled')).toBe('undefined')
|
||||||
|
|
||||||
$btnClose.trigger('click')
|
$btnClose.trigger('click')
|
||||||
|
|
||||||
expect($btnReopen).toBeHidden()
|
expect($btnReopen).toBeHidden()
|
||||||
expect($btnClose).toBeVisible()
|
expect($btnClose).toBeVisible()
|
||||||
expect($('div.status-box-closed')).toBeHidden()
|
expect($('div.status-box-closed')).toBeHidden()
|
||||||
|
@ -73,7 +74,7 @@ describe 'reopen/close issue', ->
|
||||||
expect(req.type).toBe('PUT')
|
expect(req.type).toBe('PUT')
|
||||||
expect(req.url).toBe('http://goesnowhere.nothing/whereami')
|
expect(req.url).toBe('http://goesnowhere.nothing/whereami')
|
||||||
req.error()
|
req.error()
|
||||||
|
|
||||||
$btnClose = $('a.btn-close')
|
$btnClose = $('a.btn-close')
|
||||||
$btnReopen = $('a.btn-reopen')
|
$btnReopen = $('a.btn-reopen')
|
||||||
$btnClose.attr('href','http://goesnowhere.nothing/whereami')
|
$btnClose.attr('href','http://goesnowhere.nothing/whereami')
|
||||||
|
@ -82,7 +83,7 @@ describe 'reopen/close issue', ->
|
||||||
expect(typeof $btnClose.prop('disabled')).toBe('undefined')
|
expect(typeof $btnClose.prop('disabled')).toBe('undefined')
|
||||||
|
|
||||||
$btnClose.trigger('click')
|
$btnClose.trigger('click')
|
||||||
|
|
||||||
expect($btnReopen).toBeHidden()
|
expect($btnReopen).toBeHidden()
|
||||||
expect($btnClose).toBeVisible()
|
expect($btnClose).toBeVisible()
|
||||||
expect($('div.status-box-closed')).toBeHidden()
|
expect($('div.status-box-closed')).toBeHidden()
|
||||||
|
@ -105,4 +106,4 @@ describe 'reopen/close issue', ->
|
||||||
expect($btnReopen).toBeHidden()
|
expect($btnReopen).toBeHidden()
|
||||||
expect($btnClose).toBeVisible()
|
expect($btnClose).toBeVisible()
|
||||||
expect($('div.status-box-open')).toBeVisible()
|
expect($('div.status-box-open')).toBeVisible()
|
||||||
expect($('div.status-box-closed')).toBeHidden()
|
expect($('div.status-box-closed')).toBeHidden()
|
||||||
|
|
Loading…
Reference in New Issue