fix test
This commit is contained in:
parent
a5c3cf69f2
commit
9052ec133c
|
@ -2,12 +2,5 @@
|
|||
|
||||
Route = TravisRoute.extend
|
||||
needsAuth: true
|
||||
# activate: ->
|
||||
# @get('stylesheetsManager').disable('main')
|
||||
# @get('stylesheetsManager').enable('dashboard')
|
||||
|
||||
# deactivate: ->
|
||||
# @get('stylesheetsManager').enable('main')
|
||||
# @get('stylesheetsManager').disable('dashboard')
|
||||
|
||||
`export default Route`
|
||||
|
|
|
@ -13,44 +13,72 @@ module 'Acceptance: Dashboard',
|
|||
server = new Pretender ->
|
||||
@get('/v3/repos', (request) ->
|
||||
data = {
|
||||
"@type": "repositories",
|
||||
"repositories": [{
|
||||
"repositories": [
|
||||
"@type": "repository",
|
||||
"active": true,
|
||||
"id": 1,
|
||||
"name": "travis-web",
|
||||
"slug": "travis-ci/travis-web",
|
||||
"description": "The Ember web client for Travis CI",
|
||||
"github_language": "CoffeeScript",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"@type": "organization",
|
||||
"id": 1,
|
||||
"login": "travis-ci"
|
||||
"@href": "/v3/repo/4289199",
|
||||
"@representation": "standard",
|
||||
"@permissions": {
|
||||
"read": true,
|
||||
"enable": true,
|
||||
"disable": true,
|
||||
"create_request": true
|
||||
},
|
||||
"last_build": {
|
||||
"@type": "build",
|
||||
"id": 1,
|
||||
"number": "1",
|
||||
"state": "passed",
|
||||
"duration": 20,
|
||||
"started_at": "2015-02-05T09:58:31Z",
|
||||
"finished_at": "2015-02-05T10:09:10Z"
|
||||
}
|
||||
}, {
|
||||
"@type": "repository",
|
||||
"id": 4289199,
|
||||
"name": "jupiter-brain",
|
||||
"slug": "travis-ci/jupiter-brain",
|
||||
"description": "Jupiter Brain manages servers",
|
||||
"github_language": "Go",
|
||||
"active": true,
|
||||
"id": 2,
|
||||
"name": "travis-test",
|
||||
"slug": "travis-ci/travis-test",
|
||||
"private": false,
|
||||
"owner": {
|
||||
"@type": "organization",
|
||||
"id": 87,
|
||||
"login": "travis-ci"
|
||||
"login": "travis-ci",
|
||||
"@href": "/v3/org/87"
|
||||
},
|
||||
"last_build": null
|
||||
}]
|
||||
"default_branch": {
|
||||
"@type": "branch",
|
||||
"@href": "/v3/repo/4289199/branch/master",
|
||||
"@representation": "standard",
|
||||
"name": "master",
|
||||
"repository": {
|
||||
"@href": "/v3/repo/4289199"
|
||||
},
|
||||
"default_branch": true,
|
||||
"exists_on_github": true,
|
||||
"last_build": {
|
||||
"@type": "build",
|
||||
"@href": "/v3/build/81667484",
|
||||
"@representation": "minimal",
|
||||
"id": 81667484,
|
||||
"number": "77",
|
||||
"state": "passed",
|
||||
"duration": 107,
|
||||
"event_type": "push",
|
||||
"previous_state": "passed",
|
||||
"started_at": "2015-09-22T20:56:03Z",
|
||||
"finished_at": "2015-09-22T20:57:50Z",
|
||||
"commit": {
|
||||
"@type": "commit",
|
||||
"@representation": "standard",
|
||||
"id": 23259185,
|
||||
"sha": "39f658654f2d458af074b600d11e47547988ee56",
|
||||
"ref": "refs/heads/master",
|
||||
"message": "Merge pull request #6 from travis-ci/hh-circuit-breaker\n\nvsphere: add circuit breaker between Jupiter Brain and vSphere",
|
||||
"compare_url": "https://github.com/travis-ci/jupiter-brain/compare/923f220a494f...39f658654f2d",
|
||||
"committed_at": "2015-09-22T20:55:43Z",
|
||||
"committer": {
|
||||
"name": "emma trimble",
|
||||
"avatar_url": "https://0.gravatar.com/avatar/e3058e8bba1f2b87defccd5695070782"
|
||||
},
|
||||
"author": {
|
||||
"name": "emma trimble",
|
||||
"avatar_url": "https://0.gravatar.com/avatar/e3058e8bba1f2b87defccd5695070782"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
return [200, { "Content-Type": "application/json" }, JSON.stringify(data)]
|
||||
)
|
||||
|
@ -64,4 +92,4 @@ test 'visiting /dashboard', ->
|
|||
|
||||
andThen ->
|
||||
equal find('.dashboard-active .dashboard-row').length, 1, 'there should be one repo displayed on dashboard'
|
||||
equal find('.dashboard-active .dashboard-row h2').text(), 'travis-web', 'travis-web repository should be displayed'
|
||||
equal find('.dashboard-active .dashboard-row h2').text(), 'jupiter-brain', 'jupiter-brain repository should be displayed'
|
||||
|
|
Loading…
Reference in New Issue
Block a user