Skip to content
Snippets Groups Projects
Commit b543a96e authored by Phil Hughes's avatar Phil Hughes
Browse files

Added text_utility to JS tests

parent 4140c462
No related branches found
No related tags found
No related merge requests found
#= require lib/text_utility
#= require issue #= require issue
   
describe 'Issue', -> describe 'Issue', ->
Loading
@@ -38,7 +39,7 @@ describe 'reopen/close issue', ->
Loading
@@ -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()
Loading
@@ -50,7 +51,7 @@ describe 'reopen/close issue', ->
Loading
@@ -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')
Loading
@@ -59,7 +60,7 @@ describe 'reopen/close issue', ->
Loading
@@ -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()
Loading
@@ -73,7 +74,7 @@ describe 'reopen/close issue', ->
Loading
@@ -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')
Loading
@@ -82,7 +83,7 @@ describe 'reopen/close issue', ->
Loading
@@ -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()
Loading
@@ -105,4 +106,4 @@ describe 'reopen/close issue', ->
Loading
@@ -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()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment