diff --git a/config/deprecation-workflow.js b/config/deprecation-workflow.js index 928d179a..791c2aa1 100644 --- a/config/deprecation-workflow.js +++ b/config/deprecation-workflow.js @@ -27,6 +27,5 @@ window.deprecationWorkflow.config = { { handler: "silence", matchMessage: "Using `ApplicationInstance.container.lookup` is deprecated. Please use `ApplicationInstance.lookup` instead." }, { handler: "silence", matchMessage: "this.resource() is deprecated. Use this.route('name', { resetNamespace: true }, function () {}) instead." }, { handler: "silence", matchMessage: new RegExp("the component:.*? test module is implicitly running in unit test mode, which will change to integration test mode by default in an upcoming version of ember-test-helpers. Add `unit: true` or a `needs:[]` list to explicitly opt in to unit test mode.") }, - { handler: "silence", matchMessage: "this.append() is deprecated. Please use this.render() or this.$() instead." } ] }; diff --git a/tests/unit/components/branch-row-test.js b/tests/unit/components/branch-row-test.js index 08215775..31e76cdd 100644 --- a/tests/unit/components/branch-row-test.js +++ b/tests/unit/components/branch-row-test.js @@ -45,7 +45,7 @@ test('it renders', function() { component = this.subject({ build: attributes }); - this.append(); + this.render(); ok(component.$().hasClass('passed'), 'component should have state class (passed)'); equal(component.$('.row-name .label-align').text().trim(), 'master', 'should display correct branch name'); equal(component.$('.row-request .label-align').text().trim(), '#1 passed', 'should display build number and state'); diff --git a/tests/unit/components/build-repo-actions-test.js b/tests/unit/components/build-repo-actions-test.js index 2c5008df..3f211fd7 100644 --- a/tests/unit/components/build-repo-actions-test.js +++ b/tests/unit/components/build-repo-actions-test.js @@ -9,7 +9,7 @@ test('it shows cancel button if canCancel is true', function() { component = this.subject({ canCancel: true }); - this.append(); + this.render(); return ok(component.$('a[title="Cancel Build"]').length, 'cancel link should be visible'); }); @@ -18,7 +18,7 @@ test('it shows restart button if canRestart is true', function() { component = this.subject({ canRestart: true }); - this.append(); + this.render(); return ok(component.$('a[title="Restart Build"]').length, 'restart link should be visible'); }); diff --git a/tests/unit/components/builds-item-test.js b/tests/unit/components/builds-item-test.js index 9f36158d..ef0963ad 100644 --- a/tests/unit/components/builds-item-test.js +++ b/tests/unit/components/builds-item-test.js @@ -26,7 +26,7 @@ test('it renders', function(assert) { }; component = this.subject(); component.set('build', attributes); - this.append(); + this.render(); ok(component.$().hasClass('passed'), 'component has right status class'); equal(component.$('.row-branch a').text().trim(), 'foobarbranch', 'component renders branch if event is push'); return equal(component.$('a[title="See the commit on GitHub"]').attr('href'), 'https://github.com/foo/bar/commit/a5e8093098f9c0fb46856b753fb8943c7fbf26f3', 'component generates right commit link'); diff --git a/tests/unit/components/caches-item-test.js b/tests/unit/components/caches-item-test.js index 958a9d7a..fcf7b890 100644 --- a/tests/unit/components/caches-item-test.js +++ b/tests/unit/components/caches-item-test.js @@ -16,7 +16,7 @@ test('it renders', function() { component = this.subject({ cache: attributes }); - this.append(); + this.render(); ok(component.$().hasClass('push'), 'component should have a type class (push)'); equal(component.$('.row-item:first-child .label-align').text().trim(), 'master', 'branch name should be displayed'); return equal(component.$('.row-item:nth-child(3) .label-align').text().trim(), '1.00MB', 'size should be displayed'); diff --git a/tests/unit/components/hooks-list-item-test.js b/tests/unit/components/hooks-list-item-test.js index 236e1c56..dd09da12 100644 --- a/tests/unit/components/hooks-list-item-test.js +++ b/tests/unit/components/hooks-list-item-test.js @@ -18,7 +18,7 @@ test('it renders', function() { component = this.subject({ hook: attributes }); - this.append(); + this.render(); ok(component.$().hasClass('active'), 'component should have active class'); ok(component.$('.switch--icon').hasClass('active'), 'switch should have active class'); return equal(component.$('.profile-repo span').text().trim(), 'A foo repo', 'repo description should be displayed'); diff --git a/tests/unit/components/job-repo-actions-test.js b/tests/unit/components/job-repo-actions-test.js index cbe524dd..d054320d 100644 --- a/tests/unit/components/job-repo-actions-test.js +++ b/tests/unit/components/job-repo-actions-test.js @@ -10,7 +10,7 @@ test('it shows cancel button if canCancel is true', function() { component = this.subject({ canCancel: true }); - this.append(); + this.render(); return ok(component.$('a[title="Cancel job"]').length, 'cancel link should be visible'); }); @@ -19,7 +19,7 @@ test('it shows restart button if canRestart is true', function() { component = this.subject({ canRestart: true }); - this.append(); + this.render(); return ok(component.$('a[title="Restart job"]').length, 'restart link should be visible'); }); diff --git a/tests/unit/components/jobs-item-test.js b/tests/unit/components/jobs-item-test.js index 5af424db..05657b5f 100644 --- a/tests/unit/components/jobs-item-test.js +++ b/tests/unit/components/jobs-item-test.js @@ -22,7 +22,7 @@ test('it renders', function() { component = this.subject({ job: job }); - this.append(); + this.render(); ok(component.$().hasClass('passed'), 'component should have a state class (passed)'); equal(component.$('.job-number').text().trim(), '2', 'job number should be displayed'); equal(component.$('.job-lang').text().trim(), 'JDK: openjdk6 Ruby: 2.1.2', 'langauges list should be displayed'); @@ -37,7 +37,7 @@ test('outputs info on not set properties', function() { component = this.subject({ job: job }); - this.append(); + this.render(); ok(component.$('.job-env').text().match(/no environment variables set/), 'a message for no env vars should be displayed'); return ok(component.$('.job-lang').text().match(/no language set/), 'a message about no language being set should be displayed'); }); @@ -58,7 +58,7 @@ test('when env is not set, gemfile is displayed in the env section', function() component = this.subject({ job: job }); - this.append(); + this.render(); equal(component.$('.job-lang .label-align').text().trim(), 'Ruby: 2.1.2', 'langauges list should be displayed'); return equal(component.$('.job-env .label-align').text().trim(), 'Gemfile: foo/Gemfile', 'env should be displayed'); }); @@ -80,7 +80,7 @@ test('when env is set, gemfile is displayed in the language section', function() component = this.subject({ job: job }); - this.append(); + this.render(); equal(component.$('.job-lang .label-align').text().trim(), 'Ruby: 2.1.2 Gemfile: foo/Gemfile', 'Gemfile should be displayed in languages section'); return equal(component.$('.job-env .label-align').text().trim(), 'FOO=bar', 'env should be displayed'); }); diff --git a/tests/unit/components/jobs-list-test.js b/tests/unit/components/jobs-list-test.js index a0b4d072..353f4f74 100644 --- a/tests/unit/components/jobs-list-test.js +++ b/tests/unit/components/jobs-list-test.js @@ -20,7 +20,7 @@ test('it renders a list of jobs', function() { jobs: jobs, required: true }); - this.append(); + this.render(); equal(component.$('.section-title').text().trim(), 'Build Jobs'); equal(component.$('.jobs-item').length, 2, 'there should be 2 job items'); ok(component.$('.jobs-item:nth(0)').hasClass('passed'), 'passed class should be applied to a job'); @@ -37,6 +37,6 @@ test('it renders "Allowed Failures" version without a `required` property', func component = this.subject({ jobs: jobs }); - this.append(); + this.render(); return ok(component.$('.section-title').text().match(/Allowed Failures/)); }); diff --git a/tests/unit/components/loading-indicator-test.js b/tests/unit/components/loading-indicator-test.js index 412810e9..47ec04d3 100644 --- a/tests/unit/components/loading-indicator-test.js +++ b/tests/unit/components/loading-indicator-test.js @@ -9,7 +9,7 @@ test('it renders', function(assert) { component = this.subject({ center: true }); - this.append(); + this.render(); ok(component.$('span').hasClass('loading-indicator'), 'component has loading indicator class'); return ok(component.$().hasClass('loading-container'), 'indicator gets parent class if centered flag is given'); }); diff --git a/tests/unit/components/owner-repo-tile-test.js b/tests/unit/components/owner-repo-tile-test.js index 75f2e145..592e6418 100644 --- a/tests/unit/components/owner-repo-tile-test.js +++ b/tests/unit/components/owner-repo-tile-test.js @@ -30,7 +30,7 @@ test('it renders', function() { component = this.subject({ repo: attributes }); - this.append(); + this.render(); ok(component.$().hasClass('passed'), 'component should have state class (passed)'); equal(component.$('.row-item:nth-of-type(1)').text().trim(), 'travis-chat', 'should display correct repo name'); equal(component.$('.row-item:nth-of-type(3)').text().trim(), 'master', 'should display branch name'); diff --git a/tests/unit/components/repo-actions-test.js b/tests/unit/components/repo-actions-test.js index dbc7ab80..27d94614 100644 --- a/tests/unit/components/repo-actions-test.js +++ b/tests/unit/components/repo-actions-test.js @@ -9,7 +9,7 @@ test('it renders', function() { var component; component = this.subject({}); - this.append(); + this.render(); return ok(component.$().hasClass('repo-main-tools'), 'component has class'); }); diff --git a/tests/unit/components/travis-status-test.js b/tests/unit/components/travis-status-test.js index b06126c9..19fc7962 100644 --- a/tests/unit/components/travis-status-test.js +++ b/tests/unit/components/travis-status-test.js @@ -21,7 +21,7 @@ test('adds incident class to .status-circle', function() { }); }; ok(!component.get('status'), 'status is initially not set'); - this.append(); + this.render(); equal(component.get('status'), 'major', 'status is updated from the API'); return ok(component.$('.status-circle').hasClass('major'), 'status class is set on .status-circle'); }); diff --git a/tests/unit/components/user-avatar-test.js b/tests/unit/components/user-avatar-test.js index 8bac40b7..1d1335e7 100644 --- a/tests/unit/components/user-avatar-test.js +++ b/tests/unit/components/user-avatar-test.js @@ -12,7 +12,7 @@ test('it renders', function() { var url = "https://someurl.com/someimage.jpg"; var component = this.subject({url: url, name: name}); - this.append(); + this.render(); ok(component.$().hasClass('avatar'), 'component should have right class'); equal(component.$('.pseudo-avatar').data('initials'), 'HT', 'initials should be correct'); diff --git a/tests/unit/mixins/polling-test.js b/tests/unit/mixins/polling-test.js index 76963def..9c957f0e 100644 --- a/tests/unit/mixins/polling-test.js +++ b/tests/unit/mixins/polling-test.js @@ -61,7 +61,7 @@ test('it properly stops polling hook without any models', function() { component = this.subject({ pollModels: null }); - this.append(); + this.render(); Ember.run(function() { return component.destroy(); }); @@ -84,7 +84,7 @@ test('it works even if one of the model is null', function() { name: 'model1' } }); - this.append(); + this.render(); Ember.run(function() { return component.destroy(); }); @@ -120,7 +120,7 @@ test('it polls for both models if they are present', function() { name: 'model2' } }); - this.append(); + this.render(); Ember.run(function() { return component.destroy(); }); @@ -163,7 +163,7 @@ test('it detects model changes', function() { name: 'foo' } }); - this.append(); + this.render(); Ember.run(function() { return component.set('model1', { name: 'bar'