Component test - expected template block text

So for my component I recently created, I ran ember test via command prompt in my root directory and got this:

actual: >
expected: >
    template block text

Why am I getting this? This is my code:

In my template, I call this:

{{claims/top-search queryParams=queryParams fname=fname q=q}}

My component object/javascript code:

import Ember from 'ember';

export default Ember.Component.extend({
  queryParams: ['q', 'fname'],
  q: '',
  fname: '',
});

And then my component template:

<div class="top-search">
  <div class="form-inline">
    <div class="form-group">
      <div class="input-group">
        {{autocomplete-search placeholder='Customer name or vin8' inputName='q' value=fname}}
        <div class="input-group-addon">{{fa-icon "search"}}</div>
      </div>
    </div>
  </div>
</div>

Thank you for any help!

It passes when I have {{yield}} in my template somewhere. What if I don’t want to accept a block format for this component?

If your component doesn’t need to yield a block template then remove the part of the test that checks for the template block text.

1 Like