Fix a few more integration tests
This commit is contained in:
parent
3442610244
commit
c6d1f4fa59
|
@ -1,15 +1,18 @@
|
|||
Travis.BuildsController = Em.ArrayController.extend
|
||||
# sortAscending: false
|
||||
sortAscending: false
|
||||
sortProperties: ['number']
|
||||
|
||||
needs: ['repo']
|
||||
|
||||
repoBinding: 'controllers.repo.repo'
|
||||
buildsBinding: 'controllers.repo.builds'
|
||||
contentBinding: 'controllers.repo.builds'
|
||||
tabBinding: 'controllers.repo.tab'
|
||||
isLoadedBinding: 'content.isLoaded'
|
||||
|
||||
showMore: ->
|
||||
id = @get('repo.id')
|
||||
number = @get('builds.lastObject.number')
|
||||
@get('builds').load Travis.Build.olderThanNumber(id, number, @get('tab'))
|
||||
number = @get('lastObject.number')
|
||||
@get('content').load Travis.Build.olderThanNumber(id, number, @get('tab'))
|
||||
|
||||
displayShowMoreButton: (->
|
||||
@get('tab') != 'branches'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{#if builds.isLoaded}}
|
||||
{{#if content.isLoaded}}
|
||||
<table id="builds" class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -21,7 +21,7 @@
|
|||
</thead>
|
||||
|
||||
<tbody>
|
||||
{{#each build in builds}}
|
||||
{{#each build in controller}}
|
||||
{{#view Travis.BuildsItemView contextBinding="build"}}
|
||||
<td class="number">
|
||||
<span class="status"></span>
|
||||
|
|
|
@ -16,25 +16,27 @@
|
|||
<dd class="duration" {{bindAttr title="startedAt"}}>{{formatDuration build.duration}}</dd>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<dt>{{t builds.commit}}</dt>
|
||||
<dd class="commit"><a href="{{unbound urlGithubCommit}}">{{formatCommit build.commit}}</a></dd>
|
||||
{{#if commit.compareUrl}}
|
||||
<dt>{{t builds.compare}}</dt>
|
||||
<dd class="compare"><a href="{{unbound commit.compareUrl}}">{{pathFrom build.commit.compareUrl}}</a></dd>
|
||||
{{/if}}
|
||||
{{#if commit.authorName}}
|
||||
<dt>{{t builds.author}}</dt>
|
||||
<dd class="author"><a href="{{unbound urlAuthor}}">{{build.commit.authorName}}</a></dd>
|
||||
{{/if}}
|
||||
{{#if commit.committerName}}
|
||||
<dt>{{t builds.committer}}</dt>
|
||||
<dd class="committer"><a href="{{unbound urlCommitter}}">{{build.commit.committerName}}</a></dd>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if commit}}
|
||||
<div class="right">
|
||||
<dt>{{t builds.commit}}</dt>
|
||||
<dd class="commit"><a {{bindAttr href="urlGithubCommit"}}>{{formatCommit build.commit}}</a></dd>
|
||||
{{#if commit.compareUrl}}
|
||||
<dt>{{t builds.compare}}</dt>
|
||||
<dd class="compare"><a {{bindAttr href="commit.compareUrl"}}>{{pathFrom build.commit.compareUrl}}</a></dd>
|
||||
{{/if}}
|
||||
{{#if commit.authorName}}
|
||||
<dt>{{t builds.author}}</dt>
|
||||
<dd class="author"><a {{bindAttr href="urlAuthor"}}>{{build.commit.authorName}}</a></dd>
|
||||
{{/if}}
|
||||
{{#if commit.committerName}}
|
||||
<dt>{{t builds.committer}}</dt>
|
||||
<dd class="committer"><a {{bindAttr href="urlCommitter"}}>{{build.commit.committerName}}</a></dd>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<dt>{{t builds.message}}</dt>
|
||||
<dd class="message">{{{formatMessage build.commit.message}}}</dd>
|
||||
<dd class="message">{{formatMessage build.commit.message}}</dd>
|
||||
|
||||
{{#unless isMatrix}}
|
||||
<dt>{{t builds.config}}</dt>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{{#if repo.isLoaded}}
|
||||
{{#with repo}}
|
||||
<h3>
|
||||
<a {{bindAttr href="urlGithub"}}>{{slug}}</a>
|
||||
<a {{bindAttr href="controller.urlGithub"}}>{{slug}}</a>
|
||||
</h3>
|
||||
|
||||
<p class="description">{{description}}</p>
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
describe 'on the "builds" state', ->
|
||||
beforeEach ->
|
||||
app 'travis-ci/travis-core/builds'
|
||||
app '/travis-ci/travis-core/builds'
|
||||
waitFor buildsRendered
|
||||
|
||||
afterEach ->
|
||||
window.history.pushState({}, null, '/spec.html')
|
||||
|
||||
it 'displays the expected stuff', ->
|
||||
listsRepos [
|
||||
{ slug: 'travis-ci/travis-hub', build: { number: 4, url: '/travis-ci/travis-hub/builds/4', duration: '1 min', finishedAt: '-' } }
|
||||
|
|
|
@ -3,9 +3,6 @@ describe 'on the "current" state', ->
|
|||
app 'travis-ci/travis-core'
|
||||
waitFor buildRendered
|
||||
|
||||
afterEach ->
|
||||
window.history.pushState({}, null, '/spec.html')
|
||||
|
||||
it 'displays the expected stuff', ->
|
||||
listsRepos [
|
||||
{ slug: 'travis-ci/travis-hub', build: { number: 4, url: '/travis-ci/travis-hub/builds/4', duration: '1 min', finishedAt: '-' } }
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
describe 'events', ->
|
||||
afterEach ->
|
||||
window.history.pushState({}, null, '/spec.html')
|
||||
|
||||
describe 'an event adding a repository', ->
|
||||
beforeEach ->
|
||||
app 'travis-ci/travis-core'
|
||||
|
|
|
@ -3,9 +3,6 @@ describe 'on the "index" state', ->
|
|||
app 'travis-ci/travis-core'
|
||||
waitFor buildRendered
|
||||
|
||||
afterEach ->
|
||||
window.history.pushState({}, null, '/spec.html')
|
||||
|
||||
it 'displays the expected stuff', ->
|
||||
listsRepos [
|
||||
{ slug: 'travis-ci/travis-hub', build: { number: 4, url: '/travis-ci/travis-hub/builds/4', duration: '1 min', finishedAt: '-' } }
|
||||
|
|
|
@ -5,9 +5,6 @@ describe 'on the "job" state', ->
|
|||
runs ->
|
||||
waitFor hasText('#tab_build', 'Build #1')
|
||||
|
||||
afterEach ->
|
||||
window.history.pushState({}, null, '/spec.html')
|
||||
|
||||
it 'displays the expected stuff', ->
|
||||
listsRepos [
|
||||
{ slug: 'travis-ci/travis-hub', build: { number: 4, url: '/travis-ci/travis-hub/builds/4', duration: '1 min', finishedAt: '-' } }
|
||||
|
|
|
@ -5,9 +5,6 @@ describe 'the sidebar', ->
|
|||
runs ->
|
||||
waitFor hasText('#tab_build', 'Build #1')
|
||||
|
||||
afterEach ->
|
||||
window.history.pushState({}, null, '/spec.html')
|
||||
|
||||
it 'displays the expected stuff', ->
|
||||
listsQueues [
|
||||
{ name: 'common', item: { number: '5.1', repo: 'travis-ci/travis-core' } }
|
||||
|
|
|
@ -6,6 +6,8 @@ minispade.require 'app'
|
|||
waits(50)
|
||||
runs ->
|
||||
Travis.reset()
|
||||
|
||||
url = "/#{url}" unless url.match /^\//
|
||||
Travis.__container__.lookup('router:main').handleURL(url)
|
||||
|
||||
_Date = Date
|
||||
|
|
Loading…
Reference in New Issue
Block a user