Skip to content

Commit

Permalink
Release 3.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSlimvReal authored Mar 16, 2023
2 parents cd517d2 + abb6761 commit 6878b96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 27 deletions.
28 changes: 3 additions & 25 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import { Database } from "./core/database/database";
import { UpdatedEntity } from "./core/entity/model/entity-update";
import { EntityMapperService } from "./core/entity/entity-mapper.service";
import { mockEntityMapper } from "./core/entity/mock-entity-mapper-service";
import { DemoDataService } from "./core/demo-data/demo-data.service";
import { SessionType } from "./core/session/session-type";
import { HttpClientTestingModule } from "@angular/common/http/testing";
import { Angulartics2Matomo } from "angulartics2";
Expand All @@ -44,19 +43,14 @@ describe("AppComponent", () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
let entityUpdates: Subject<UpdatedEntity<Config>>;
const defaultTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;

beforeAll(() => {
componentRegistry.allowDuplicates();
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
});

afterAll(() => {
jasmine.DEFAULT_TIMEOUT_INTERVAL = defaultTimeout;
});

beforeEach(waitForAsync(() => {
environment.session_type = SessionType.mock;
environment.production = false;
environment.demo_mode = false;
const entityMapper = mockEntityMapper();
entityUpdates = new Subject();
spyOn(entityMapper, "receiveUpdates").and.returnValue(entityUpdates);
Expand All @@ -75,10 +69,7 @@ describe("AppComponent", () => {
fixture.detectChanges();
}

afterEach(() => {
fixture.debugElement.nativeElement.style.visibility = "hidden";
return TestBed.inject(Database).destroy();
});
afterEach(() => TestBed.inject(Database).destroy());

it("should be created", () => {
createComponent();
Expand All @@ -87,7 +78,6 @@ describe("AppComponent", () => {

it("should start tracking with config from db", fakeAsync(() => {
environment.production = true; // tracking is only active in production mode
environment.demo_mode = false;
const testConfig = new Config(Config.CONFIG_KEY, {
[USAGE_ANALYTICS_CONFIG_ID]: {
url: "matomo-test-endpoint",
Expand All @@ -110,16 +100,4 @@ describe("AppComponent", () => {

discardPeriodicTasks();
}));

xit("published the demo data", fakeAsync(() => {
// TODO the lazy loading throws an error in this test
environment.demo_mode = true;

createComponent();
flush();
discardPeriodicTasks();
const demoDataService = TestBed.inject(DemoDataService);
expect(demoDataService).toBeTruthy();
environment.demo_mode = false;
}));
});
4 changes: 3 additions & 1 deletion src/app/child-dev-project/children/children.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export class ChildrenService {
const relations = await this.queryRelations(`${Child.ENTITY_TYPE}:`);
groupBy(relations, "childId").forEach(([id, rels]) => {
const child = children.find((c) => c.getId() === id);
this.extendChildWithSchoolInfo(child, rels);
if (child) {
this.extendChildWithSchoolInfo(child, rels);
}
});
return children;
}
Expand Down
1 change: 0 additions & 1 deletion src/styles/variables/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with ndb-core. If not, see <http://www.gnu.org/licenses/>.
*/
@use "../themes/ndb-theme" as theme;
@use "@angular/material" as mat;

$err-palette : mat.define-palette(mat.$red-palette);
Expand Down

0 comments on commit 6878b96

Please sign in to comment.