summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2015-12-23 16:56:36 -0500
committerJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2015-12-23 16:56:36 -0500
commit7e43fa67096f60856d1cf862f245367bc710a44f (patch)
tree5677bd54c231574e5ea306e98c9f623b6464952c /spec/javascripts
parent3ea3d9ef284fcfaaa1b631e98926df7dae4129c9 (diff)
downloadgitlab-ce-7e43fa67096f60856d1cf862f245367bc710a44f.tar.gz
fixes tests to work with jasmine/jquery
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/fixtures/issues_show.html.haml11
-rw-r--r--spec/javascripts/issue_spec.js.coffee18
2 files changed, 16 insertions, 13 deletions
diff --git a/spec/javascripts/fixtures/issues_show.html.haml b/spec/javascripts/fixtures/issues_show.html.haml
index 6c985a32966..f67ea5a13c7 100644
--- a/spec/javascripts/fixtures/issues_show.html.haml
+++ b/spec/javascripts/fixtures/issues_show.html.haml
@@ -1,7 +1,10 @@
-.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
diff --git a/spec/javascripts/issue_spec.js.coffee b/spec/javascripts/issue_spec.js.coffee
index ef78cfbc653..142eb05cc67 100644
--- a/spec/javascripts/issue_spec.js.coffee
+++ b/spec/javascripts/issue_spec.js.coffee
@@ -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