diff --git a/app/components/recipe-list.hbs b/app/components/recipe-list.hbs index 2986a43..f875b7f 100644 --- a/app/components/recipe-list.hbs +++ b/app/components/recipe-list.hbs @@ -1,21 +1,20 @@ + + {{#each group.model as |meal|}} + + + + + + {{/each}} + + - - - {{#each group.model as |modelItem|}} - - - - {{modelItem.strMeal}} - - - {{/each}} - diff --git a/app/components/recipe-preview.hbs b/app/components/recipe-preview.hbs new file mode 100644 index 0000000..3a3b83c --- /dev/null +++ b/app/components/recipe-preview.hbs @@ -0,0 +1,19 @@ +
+
+
+
+
+
+ {{@meal.strMeal}} +
+

+ Lorem... +

+
+
+ #{{@meal.strCategory}} + #{{@meal.strArea}} +
+
+
diff --git a/app/templates/application.hbs b/app/templates/application.hbs index 717d874..60c698c 100644 --- a/app/templates/application.hbs +++ b/app/templates/application.hbs @@ -1,5 +1,11 @@ -
- -
+
+
+ +
+
+ Content goes here. + {{outlet}} +
+
diff --git a/tests/integration/components/recipe-preview-test.js b/tests/integration/components/recipe-preview-test.js new file mode 100644 index 0000000..cc3c42a --- /dev/null +++ b/tests/integration/components/recipe-preview-test.js @@ -0,0 +1,26 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; + +module('Integration | Component | recipe-preview', function(hooks) { + setupRenderingTest(hooks); + + test('it renders', async function(assert) { + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.set('myAction', function(val) { ... }); + + await render(hbs``); + + assert.equal(this.element.textContent.trim(), ''); + + // Template block usage: + await render(hbs` + + template block text + + `); + + assert.equal(this.element.textContent.trim(), 'template block text'); + }); +});