fix failing tests
This commit is contained in:
parent
a2af72a10d
commit
cc0bed2974
|
@ -2,7 +2,8 @@
|
|||
"predef": [
|
||||
"document",
|
||||
"window",
|
||||
"-Promise"
|
||||
"-Promise",
|
||||
"jQuery"
|
||||
],
|
||||
"browser": true,
|
||||
"boss": true,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
"andThen",
|
||||
"currentURL",
|
||||
"currentPath",
|
||||
"currentRouteName"
|
||||
"currentRouteName",
|
||||
"jQuery"
|
||||
],
|
||||
"node": false,
|
||||
"browser": false,
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue
Block a user