title: Expected true to equal false
body: <p>I want to test something in angular that really is not in teh Anguar tutorial.</p>
  
  <p>I am trying to test that when the value of this input is invalid teh error message is outputted, so the hidden atributte is false in the case of putting a wor with more than 20 haracters.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  &lt;input #cardInput type="text" class="form-control" name="tarjetaSanitaria" id="field_tarjetaSanitaria"
                   [(ngModel)]="paciente.tarjetaSanitaria" maxlength="20"/&gt;
               &lt;div [hidden]="!(editForm.controls.tarjetaSanitaria?.dirty &amp;&amp; editForm.controls.tarjetaSanitaria?.invalid)"&gt;
                   &lt;small class="form-text text-danger"  id="ref"
                      [hidden]="!editForm.controls.tarjetaSanitaria?.errors?.maxlength"  translateValues="{ max: 20 }"&gt;
                      This field cannot be longer than 20 characters.
                   &lt;/small&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>My component has this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> paciente: Paciente = {tarjetaSanitaria: 'ddd'} as Paciente;</code></pre>
  </div>
  </div>
  </p>
  
  <p>And my test:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>       fit ('Blank input is not valid', async(() =&gt; {
                 
                  comp.paciente.tarjetaSanitaria = 'ddddddddddddddddddddddddddddddddddddddddddd' ;
                  spyOn(comp, 'save');
                var1 = comp.submitButton.nativeElement;
                var1.click();
                fixture.detectChanges();
                expect(comp.save).toHaveBeenCalledTimes(1);
  expect(fixture.debugElement.query(By.css('#ref')).nativeElement.hasAttribute('hidden')).toEqual(false);
  
                  })); </code></pre>
  </div>
  </div>
  </p>
  
  <p>It always fails saying Expected true to qual false.IF I remove fixture.detectChanges it aways passes. Have I done something  wrong?</p>