From 8dae9a873af1ab3e29f4f9479fa3f590014d0804 Mon Sep 17 00:00:00 2001
From: jojohoch <joachim.hoch@iqb.hu-berlin.de>
Date: Fri, 6 Jan 2023 17:02:48 +0100
Subject: [PATCH] [player] Fix test for dropLists in
 ElementModelElementCodeMappingService

---
 ...model-element-code-mapping.service.spec.ts | 48 ++++++++++++++-----
 1 file changed, 36 insertions(+), 12 deletions(-)

diff --git a/projects/player/src/app/services/element-model-element-code-mapping.service.spec.ts b/projects/player/src/app/services/element-model-element-code-mapping.service.spec.ts
index 1cbfb8ae8..28013ea5f 100644
--- a/projects/player/src/app/services/element-model-element-code-mapping.service.spec.ts
+++ b/projects/player/src/app/services/element-model-element-code-mapping.service.spec.ts
@@ -235,31 +235,41 @@ describe('ElementModelElementCodeMappingService', () => {
         text: 'a',
         id: 'value_1',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 0
       },
       {
         text: 'b',
         id: 'value_2',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 0
       },
       {
         text: 'c',
         id: 'value_3',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 0
       },
       {
         text: 'd',
         id: 'value_4',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 0
       },
       {
         text: 'e',
         id: 'value_5',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 0
       }
     ];
     const elementModel: DropListElement = JSON.parse(JSON.stringify(dropList_130));
@@ -268,7 +278,9 @@ describe('ElementModelElementCodeMappingService', () => {
         text: 'e',
         id: 'value_5',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 0
       }
     ];
     expect(service.mapToElementModelValue(['value_5'], elementModel))
@@ -281,31 +293,41 @@ describe('ElementModelElementCodeMappingService', () => {
         text: 'a',
         id: 'value_1',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 0
       },
       {
         text: 'b',
         id: 'value_2',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 1
       },
       {
         text: 'c',
         id: 'value_3',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 2
       },
       {
         text: 'd',
         id: 'value_4',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 3
       },
       {
         text: 'e',
         id: 'value_5',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 4
       }
     ];
     const elementModel: DropListElement = JSON.parse(JSON.stringify(dropList_130));
@@ -314,7 +336,9 @@ describe('ElementModelElementCodeMappingService', () => {
         text: 'e',
         id: 'value_5',
         imgSrc: null,
-        imgPosition: 'above'
+        imgPosition: 'above',
+        originListID: 'id',
+        originListIndex: 4
       }
     ];
     expect(service.mapToElementModelValue(['value_5'], elementModel))
-- 
GitLab