fixes tests to work with jasmine/jquery
This commit is contained in:
parent
3ea3d9ef28
commit
7e43fa6709
2 changed files with 16 additions and 13 deletions
|
@ -1,7 +1,10 @@
|
||||||
.issue-box.issue-box-open Open
|
:css
|
||||||
.issue-box.issue-box-closed.hidden Closed
|
.hidden { display: none !important; }
|
||||||
%a.btn-close{"data-url" => "http://gitlab/issues/6/close"} Close
|
|
||||||
%a.btn-reopen.hidden{"data-url" => "http://gitlab/issues/6/reopen"} Reopen
|
.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
|
.detail-page-description
|
||||||
.description.js-task-list-container
|
.description.js-task-list-container
|
||||||
|
|
|
@ -33,16 +33,16 @@ describe 'reopen/close issue', ->
|
||||||
|
|
||||||
$btnClose = $('a.btn-close')
|
$btnClose = $('a.btn-close')
|
||||||
$btnReopen = $('a.btn-reopen')
|
$btnReopen = $('a.btn-reopen')
|
||||||
expect($btnReopen.toBeHidden())
|
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')
|
||||||
|
|
||||||
$btnClose.trigger('click')
|
$btnClose.trigger('click')
|
||||||
|
|
||||||
expect($btnClose.toBeHidden())
|
expect($btnReopen).toBeVisible()
|
||||||
expect($btnReopen.toBeVisible())
|
expect($btnClose).toBeHidden()
|
||||||
expect($('div.issue-box-open').toBeVisible())
|
expect($('div.status-box-closed')).toBeVisible()
|
||||||
expect($('div.issue-box-closed').toBeHidden())
|
expect($('div.status-box-open')).toBeHidden()
|
||||||
|
|
||||||
it 'reopens an issue', ->
|
it 'reopens an issue', ->
|
||||||
$.ajax = (obj) ->
|
$.ajax = (obj) ->
|
||||||
|
@ -56,7 +56,7 @@ describe 'reopen/close issue', ->
|
||||||
|
|
||||||
$btnReopen.trigger('click')
|
$btnReopen.trigger('click')
|
||||||
|
|
||||||
expect($btnReopen.toBeHidden())
|
expect($btnReopen).toBeHidden()
|
||||||
expect($btnClose.toBeVisible())
|
expect($btnClose).toBeVisible()
|
||||||
expect($('div.issue-box-open').toBeVisible())
|
expect($('div.status-box-open')).toBeVisible()
|
||||||
expect($('div.issue-box-closed').toBeHidden())
|
expect($('div.status-box-closed')).toBeHidden()
|
Loading…
Reference in a new issue