From c6d952e40d92cac00c9cc32fc0586ec0c2a2f7a0 Mon Sep 17 00:00:00 2001 From: "Brian J. Geiger" Date: Mon, 5 Mar 2018 13:32:24 -0500 Subject: [PATCH 1/3] Pass contributors to the contributors list component --- app/components/noteworthy-and-popular-project/template.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/noteworthy-and-popular-project/template.hbs b/app/components/noteworthy-and-popular-project/template.hbs index 1c443ba18bd..aab3b6fa07c 100644 --- a/app/components/noteworthy-and-popular-project/template.hbs +++ b/app/components/noteworthy-and-popular-project/template.hbs @@ -1,7 +1,7 @@
{{project.title}}
- {{t 'dashboard.noteworthy.by'}} {{contributor-list node=project}} + {{t 'dashboard.noteworthy.by'}} {{contributor-list contributors=project.contributors}}

{{project.description}}

\ No newline at end of file From 4805f0dc85a0bf3015807b55a346adec2c962b76 Mon Sep 17 00:00:00 2001 From: "Brian J. Geiger" Date: Mon, 5 Mar 2018 15:40:30 -0500 Subject: [PATCH 2/3] Make test work --- .../noteworthy-and-popular-project/component-test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/components/noteworthy-and-popular-project/component-test.js b/tests/integration/components/noteworthy-and-popular-project/component-test.js index 8743809073f..b14597fac13 100644 --- a/tests/integration/components/noteworthy-and-popular-project/component-test.js +++ b/tests/integration/components/noteworthy-and-popular-project/component-test.js @@ -6,6 +6,7 @@ moduleForComponent('noteworthy-and-popular-project', 'Integration | Component | }); test('it renders', function(assert) { - this.render(hbs`{{noteworthy-and-popular-project}}`); + this.set('project', FactoryGuy.make('node')); + this.render(hbs`{{noteworthy-and-popular-project project=project}}`); assert.ok(this.$().text().trim()); }); From 5630334effea59f0a64a37e68b962df892e8fc47 Mon Sep 17 00:00:00 2001 From: "Brian J. Geiger" Date: Mon, 5 Mar 2018 17:10:50 -0500 Subject: [PATCH 3/3] Update test to include FactoryGuy --- .../noteworthy-and-popular-project/component-test.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/integration/components/noteworthy-and-popular-project/component-test.js b/tests/integration/components/noteworthy-and-popular-project/component-test.js index b14597fac13..9a9e4dff898 100644 --- a/tests/integration/components/noteworthy-and-popular-project/component-test.js +++ b/tests/integration/components/noteworthy-and-popular-project/component-test.js @@ -1,8 +1,13 @@ import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; +import FactoryGuy, { manualSetup } from 'ember-data-factory-guy'; moduleForComponent('noteworthy-and-popular-project', 'Integration | Component | noteworthy and popular project', { integration: true, + + beforeEach() { + manualSetup(this.container); + }, }); test('it renders', function(assert) {