No value accessor for form control with name... for mat-select controls

In my case I forgot

import {MatSelectModule} from '@angular/material/select';

in module.

So if you import it should work.


You're not importing the material modules in your testing module.

So mat-form-field, mat-select, etc. are just treated as unknown elements by Angular (since you told it to do so by using NO_ERRORS_SCHEMA).


I think you're missing some important modules, that's why those are not known to the Angular compiler. Put at least the following (and more I guess) in your imports:

imports: [ReactiveFormsModule, FormsModule,
  BrowserModule,
  BrowserAnimationsModule,
  MatSelectModule,
  MatOptionModule,
  MatInputModule
],

Use also

schemas: [CUSTOM_ELEMENTS_SCHEMA],

to tell the compiler to be able to detect non-HTML tags.

With that fix, you won't need the NO_ERRORS_SCHEMA, which should NOT be used in these simple cases.