fix failing tests

This commit is contained in:
Lisa Passing 2015-07-16 12:28:14 +02:00
parent a2af72a10d
commit cc0bed2974
5 changed files with 15 additions and 9 deletions

View File

@ -2,7 +2,8 @@
"predef": [
"document",
"window",
"-Promise"
"-Promise",
"jQuery"
],
"browser": true,
"boss": true,

View File

@ -2,6 +2,7 @@
`import { githubCommit as githubCommitUrl } from 'travis/utils/urls'`
`import configKeysMap from 'travis/utils/keys-map'`
`import config from 'travis/config/environment'`
`import Ember from 'ember'`
timeago = $.timeago
mapObject = $.map
@ -66,9 +67,9 @@ formatMessage = (message, options) ->
message = message || ''
message = message.split(/\n/)[0] if options.short
message = _emojize(_escape(message))
if !!options.repo
message = githubify(message, options.repo.get('owner'), options.repo.get('name'))
if !!options.pre
if options.repo
message = githubify(message, Ember.get(options.repo, 'owner'), Ember.get(options.repo, 'name'))
if options.pre
message = message.replace /\n/g, '<br/>'
message

View File

@ -44,7 +44,8 @@
"andThen",
"currentURL",
"currentPath",
"currentRouteName"
"currentRouteName",
"jQuery"
],
"node": false,
"browser": false,

View File

@ -1,3 +1,4 @@
import Ember from 'ember';
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
@ -22,12 +23,12 @@ test('it adds an env var on submit', function(assert) {
this.render(hbs`{{add-env-var repo=repo}}`);
this.$('.env-name').val('FOO');
var e = jQuery.Event("keyup");
var e = $.Event("keyup");
e.which = 50;
this.$('.env-name').trigger(e);
this.$('.env-value').val('bar');
var e = jQuery.Event("keyup");
e = $.Event("keyup");
e.which = 50;
this.$('.env-value').trigger(e);
@ -54,7 +55,7 @@ test('it shows an error if no name is present', function(assert) {
assert.ok(this.$('.form-error-message').length, 'the error message should be displayed');
var e = jQuery.Event("keypress");
var e = $.Event("keypress");
e.which = 50;
this.$('.env-name').trigger(e);

View File

@ -25,7 +25,9 @@ test 'it renders', (assert) ->
slug: 'foo/bar'
}
}
component = @subject(build: attributes)
component = @subject()
component.set('build', attributes)
@append()
ok component.$().hasClass('passed'), 'component has right status class'