Fix expanding folds on firefox
This commit is contained in:
parent
ac675e5918
commit
17923af973
|
@ -7,7 +7,7 @@ Travis.reopen
|
|||
@rerender()
|
||||
).observes('templateName')
|
||||
|
||||
click: ->
|
||||
click: (event) ->
|
||||
# TODO: this solves the case of closing menus and popups,
|
||||
# but I would like to rewrite it later, not sure how
|
||||
# yet, but this does not seem optimal
|
||||
|
|
|
@ -83,7 +83,7 @@ Travis.reopen
|
|||
$('#log').on 'mouseenter', 'a', ->
|
||||
$(@).attr('href', '#L' + ($("#log p:visible").index(@parentNode) + 1))
|
||||
|
||||
click: ->
|
||||
click: (event) ->
|
||||
if (href = $(event.target).attr('href')) && matches = href?.match(/#L(\d+)$/)
|
||||
@lineNumberClicked(matches[1])
|
||||
event.stopPropagation()
|
||||
|
|
|
@ -3,7 +3,7 @@ describe 'on the "job" state', ->
|
|||
$.mockjax
|
||||
url: '/jobs/1/log?cors_hax=true'
|
||||
responseTime: 0
|
||||
responseText: 'log 1'
|
||||
responseText: "First line\ncontent:travis_fold:start:install\r$ Install something\nInstalling something\ncontent:travis_fold:end:install\r$ End"
|
||||
|
||||
|
||||
app 'travis-ci/travis-core/jobs/1'
|
||||
|
@ -41,9 +41,22 @@ describe 'on the "job" state', ->
|
|||
job: { href: '/travis-ci/travis-core/jobs/1', active: true }
|
||||
|
||||
displaysLog [
|
||||
'log 1'
|
||||
'First line',
|
||||
'$ Install something',
|
||||
'Installing something',
|
||||
'$ End'
|
||||
]
|
||||
|
||||
it 'allows to expand folds', ->
|
||||
waits 100
|
||||
runs ->
|
||||
expect($('#fold-start-install').hasClass('open')).toBeFalsy()
|
||||
$('#fold-start-install').click()
|
||||
waits 20
|
||||
runs ->
|
||||
expect($('#fold-start-install').hasClass('open')).toBeTruthy()
|
||||
|
||||
|
||||
describe 'too long log', ->
|
||||
beforeEach ->
|
||||
$.mockjax
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
expect(element.text()).toEqual data.message
|
||||
|
||||
@displaysLog = (lines) ->
|
||||
log = lines.join()
|
||||
log = lines.join('')
|
||||
expect($('#log p').text().trim()).toEqual log
|
||||
|
||||
@listsRepos = (items) ->
|
||||
|
|
Loading…
Reference in New Issue
Block a user