Permalink
Browse files

Add form component markup

Inner green
Outer red: expected posts.show, actual posts.new

Now that we're rendering markup for the component, its unit test is able to find the title field and fill it in. The acceptance test also gets past the point of filling in the title, and now it reports that it expected to end up at the posts.show route, but it was still on the posts.new route. This is because we haven't told the component to do anything when the save button is clicked. We need to get Ember handling the form submission.
  • Loading branch information...
CodingItWrong committed Jan 11, 2018
1 parent 2abc6e4 commit adc28639c7d46a2d1bf613ce58e9d446db20db78
Showing with 12 additions and 1 deletion.
  1. +12 −1 app/templates/components/post-form.hbs
@@ -1 +1,12 @@
{{yield}}
<form>
<div>
<label for="js-post-form-title">Title</label>
<input type="text" class="js-post-form-title">
</div>
<div>
<label for="js-post-form-body">Body</label>
<textarea class="js-post-form-body" />
</div>

<button type="button" class="js-post-form-save">Save</button>
</form>

0 comments on commit adc2863

Please sign in to comment.