mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
feat: assessments module
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion,@typescript-eslint/no-explicit-any */
|
||||
/*
|
||||
* Copyright (C) 2018, 2019 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licens for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion,@typescript-eslint/no-explicit-any */
|
||||
import {CUSTOM_ELEMENTS_SCHEMA, DebugElement} from '@angular/core';
|
||||
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
import {ActivatedRoute, RouterModule} from '@angular/router';
|
||||
@@ -118,9 +119,10 @@ describe('DataDetailComponent', () => {
|
||||
});
|
||||
|
||||
it('should get a data item', () => {
|
||||
comp.getItem(sampleThing.uid);
|
||||
comp.getItem(sampleThing.uid, false);
|
||||
expect(DataDetailComponent.prototype.getItem).toHaveBeenCalledWith(
|
||||
sampleThing.uid,
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -128,6 +130,7 @@ describe('DataDetailComponent', () => {
|
||||
comp.ionViewWillEnter();
|
||||
expect(DataDetailComponent.prototype.getItem).toHaveBeenCalledWith(
|
||||
sampleThing.uid,
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -135,6 +138,7 @@ describe('DataDetailComponent', () => {
|
||||
await comp.refresh(refresher);
|
||||
expect(DataDetailComponent.prototype.getItem).toHaveBeenCalledWith(
|
||||
sampleThing.uid,
|
||||
true,
|
||||
);
|
||||
expect(refresher.complete).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user