These are chat archives for angular/material

16th
Jul 2017
Douglas Webster
@DouglasWebster
Jul 16 2017 13:11
I forgot to send the event to the form! The updated test, with a slight modification so it uses async instead of fakeAsync and a bit of tidying up is:
  it('should enable the login button when a valid username and password are entered', async(() => {
    const loginBtn = overlayContainerElement.querySelector('button[md-raised-button]') as HTMLButtonElement;
    const nameInput = overlayContainerElement.querySelector('input[formcontrolname="name"]') as HTMLInputElement;
    const passwordInput = overlayContainerElement.querySelector('input[formcontrolname="password"]') as HTMLInputElement;
    nameInput.value = 'ABC';
    nameInput.dispatchEvent(new Event('input'));   // dispatch the change so the form knows to update
    passwordInput.value = '12345678';
    passwordInput.dispatchEvent(new Event('input'));  // ditto
    viewContainerFixture.detectChanges();

    viewContainerFixture.whenStable().then(() => {
      viewContainerFixture.detectChanges();
      expect(nameInput.value).toEqual('ABC');
      expect(passwordInput.value).toEqual('12345678');
      expect(loginBtn.getAttribute('ng-reflect-disabled')).toBe('false', 'Login button disabled should now be false');
    });
  }));
});
Carlos Eduardo
@duard
Jul 16 2017 21:30
why footer positions is 0 left ?