working callbacks, working search filtering/facets

This commit is contained in:
Jason Kulatunga 2023-05-12 09:12:09 -04:00
parent 363dc49636
commit 8e203a5b3c
5 changed files with 28 additions and 10 deletions

View File

@ -8,17 +8,15 @@
test: backend-test frontend-test
.PHONY: serve-frontend
serve-web:
cd frontend
yarn dist -- -c sandbox
serve-frontend:
cd frontend && yarn dist -- -c sandbox
.PHONY: serve-frontend-prod
serve-web:
cd frontend
yarn dist -- -c prod
serve-frontend-prod:
cd frontend && yarn dist -- -c prod
.PHONY: serve-backend
serve-web:
serve-backend:
go run backend/cmd/fasten/fasten.go start --config ./config.dev.yaml --debug

View File

@ -1,6 +1,10 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MedicalSourcesConnectedComponent } from './medical-sources-connected.component';
import {HTTP_CLIENT_TOKEN} from '../../dependency-injection';
import {HttpClient} from '@angular/common/http';
import {HttpClientTestingModule} from '@angular/common/http/testing';
import {RouterTestingModule} from '@angular/router/testing';
describe('MedicalSourcesConnectedComponent', () => {
let component: MedicalSourcesConnectedComponent;
@ -8,7 +12,14 @@ describe('MedicalSourcesConnectedComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ MedicalSourcesConnectedComponent ]
declarations: [ MedicalSourcesConnectedComponent ],
imports: [HttpClientTestingModule, RouterTestingModule],
providers: [
{
provide: HTTP_CLIENT_TOKEN,
useClass: HttpClient,
},
]
})
.compileComponents();

View File

@ -1,6 +1,7 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MedicalSourcesFilterComponent } from './medical-sources-filter.component';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
describe('MedicalSourcesFilterComponent', () => {
let component: MedicalSourcesFilterComponent;
@ -8,6 +9,7 @@ describe('MedicalSourcesFilterComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [FormsModule, ReactiveFormsModule],
declarations: [ MedicalSourcesFilterComponent ]
})
.compileComponents();

View File

@ -5,6 +5,7 @@ import {HttpClientTestingModule} from '@angular/common/http/testing';
import {RouterTestingModule} from '@angular/router/testing';
import {HTTP_CLIENT_TOKEN} from '../../dependency-injection';
import {HttpClient} from '@angular/common/http';
import {FormBuilder, FormsModule, ReactiveFormsModule} from '@angular/forms';
describe('MedicalSourcesComponent', () => {
let component: MedicalSourcesComponent;
@ -13,7 +14,7 @@ describe('MedicalSourcesComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ MedicalSourcesComponent ],
imports: [HttpClientTestingModule, RouterTestingModule],
imports: [HttpClientTestingModule, RouterTestingModule, FormsModule, ReactiveFormsModule],
providers: [
{
provide: HTTP_CLIENT_TOKEN,

View File

@ -2,11 +2,17 @@ import { TestBed } from '@angular/core/testing';
import { MedicalSourcesFilterService } from './medical-sources-filter.service';
import {FormBuilder, FormsModule, ReactiveFormsModule} from '@angular/forms';
describe('MedicalSourcesFilterService', () => {
let service: MedicalSourcesFilterService;
beforeEach(() => {
TestBed.configureTestingModule({});
TestBed.configureTestingModule({
declarations: [],
providers: [FormBuilder],
imports: [FormsModule, ReactiveFormsModule],
});
service = TestBed.inject(MedicalSourcesFilterService);
});