Commit b543a96e authored by Phil Hughes's avatar Phil Hughes

Added text_utility to JS tests

parent 4140c462
#= require lib/text_utility
#= require issue #= require issue
describe 'Issue', -> describe 'Issue', ->
...@@ -38,7 +39,7 @@ describe 'reopen/close 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', -> ...@@ -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', -> ...@@ -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', -> ...@@ -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', -> ...@@ -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', -> ...@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment