Commit 7e43fa67 authored by Jacob Schatz's avatar Jacob Schatz

fixes tests to work with jasmine/jquery

parent 3ea3d9ef
.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
......
......@@ -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($btnClose.toBeHidden())
expect($btnReopen.toBeVisible())
expect($('div.issue-box-open').toBeVisible())
expect($('div.issue-box-closed').toBeHidden())
expect($btnReopen).toBeVisible()
expect($btnClose).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
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