Commit 1c4b753e authored by Konstantin Schulz's avatar Konstantin Schulz
Browse files

fixed unit tests

parent 4fe65605
Pipeline #11074 passed with stage
in 2 minutes and 23 seconds
{
"name": "mc_frontend",
"version": "1.8.0",
"version": "1.8.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
......
......@@ -129,6 +129,7 @@ describe('ExerciseParametersPage', () => {
Promise.resolve(new AnnisResponse()));
const navSpy: Spy = spyOn(exerciseParametersPage.helperService, 'goToPreviewPage').and.returnValue(Promise.resolve(true));
exerciseParametersPage.corpusService.annisResponse = new AnnisResponse();
exerciseParametersPage.helperService.applicationState.next(exerciseParametersPage.helperService.deepCopy(MockMC.applicationState));
exerciseParametersPage.getH5Pexercise(new FormData()).then(() => {
expect(navSpy).toHaveBeenCalledTimes(1);
requestSpy.and.callFake(() => Promise.reject());
......
......@@ -124,7 +124,7 @@ export class PreviewPage implements OnDestroy, OnInit {
return new Promise<void>((resolve, reject) => {
const fileUrl: string = configMC.backendBaseUrl + configMC.backendApiFilePath;
const formData = new FormData();
formData.append('learning_result', JSON.stringify(result.statement));
formData.append('learning_result', JSON.stringify({0: result.statement}));
this.helperService.makePostRequest(this.http, this.toastCtrl, fileUrl, formData, '').then(() => {
return resolve();
}, () => {
......
......@@ -118,7 +118,7 @@
<ion-col>
<ion-card>
<ion-item *ngIf="isTestMode">
<ion-icon name="stats" slot="start"></ion-icon>
<ion-icon name="stats-chart" slot="start"></ion-icon>
<ion-label position="stacked">
<h2>{{ 'RESULT' | translate }} {{ 'UNIT_DIAGNOSIS_TITLE' | translate}}:</h2></ion-label>
<br>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment