title: Angular Testing with ngxs/store @select gives error: "SelectFactory not connected to store!"
body: <p>The project is running without errors. But all the tests are failing with "SelectFactory not connected to store!".  It was working before we broke the Observables out to the base class. </p>
  
  <p>Can I stub the Base Class? Stub @Select? Stub the store? Use something beside @Select?</p>
  
  <p>I need it to keep listening to the store observables. And it needs to extend the base class. Everything else is up in the air. </p>
  
  <p>Packages: </p>
  
  <pre><code>"@angular/core": "7.2.11",
  "@ngxs/store": "^3.4.3"
  </code></pre>
  
  <p>Component</p>
  
  <pre><code>@Component({
      selector: "app-billing-landing",
      templateUrl: "./billing-landing.component.html",
      styleUrls: ["./billing-landing.component.scss"],
      animations: [fadeInRightLeft]
  })
  export class BillingLandingComponent extends BillingCore implements OnInit {
      constructor(public dialog: MatDialog, public router: Router) {
          super(router, dialog);    
      }
      ....Other Methods
  }
  </code></pre>
  
  <p>Base Component</p>
  
  <pre><code>@NgModule()
  export class BillingCore {
      @Select(AccountState.getCurrentPatient) currentPatient$: Observable&lt;ProxySwitchUser&gt;;
      @Select(AccountState.getLoggedInUser) loggedInUser$: Observable&lt;Patient&gt;;
  
      constructor(public router: Router, public dialog: MatDialog) {
  
          combineLatest([this.currentPatient$, this.loggedInUser$]).subscribe(dataArray =&gt; {
              ....Do Stuff
          });
      }
      ....Other Methods
  }
  </code></pre>
  
  <p>Test File</p>
  
  <pre><code>describe("BillingLandingComponent", () =&gt; {
      let component: BillingLandingComponent;
      let fixture: ComponentFixture&lt;BillingLandingComponent&gt;;
      const matDialogServiceSpy = jasmine.createSpyObj("MatDialog", ["open"]);
  
      beforeEach(async(() =&gt; {
          TestBed.configureTestingModule({
              imports: [JssModule.forRoot(), RouterTestingModule, NoopAnimationsModule],
              declarations: [BillingLandingComponent],
              providers: [{ provide: MatDialog, useValue: matDialogServiceSpy }],
              schemas: [CUSTOM_ELEMENTS_SCHEMA]
          });
  
          fixture = TestBed.createComponent(BillingLandingComponent);
          component = fixture.componentInstance;
  
          Object.defineProperty(component, "currentPatient$", { writable: true });
          Object.defineProperty(component, "loggedInUser$", { writable: true });
          component.currentPatient$ = of(mockPatient as Patient);
          component.loggedInUser$ = of(mockPatient as Patient);
  
  
          fixture.detectChanges();
      }));
  
      it("should create", () =&gt; {
          expect(component).toBeTruthy();
      });
  });
  </code></pre>