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