itemengine-cypress-automation 1.0.580-IEI-7040-99ff48c.0 → 1.0.580-ITEM-1388-9c911b1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,14 @@ describe('Get Item Data API cases', () => {
8
8
  var dt_updated;
9
9
  before(() => {
10
10
  cy.loginAs('admin');
11
+ cy.deleteItem('dataAPIFetchItem123');
12
+ cy.wait(5000);
13
+ cy.deleteItem('dataAPIFetchItem234');
14
+ cy.wait(5000);
15
+ cy.deleteThinkSphereItem('dataAPIFetchThinkSphereItem123');
16
+ cy.wait(5000);
17
+ cy.deleteThinkSphereItem('dataAPIFetchThinkSphereItem234');
18
+ cy.wait(5000);
11
19
  cy.createItem('dataAPIFetchItem123');
12
20
  cy.wait(5000);
13
21
  cy.createItem('dataAPIFetchItem234');
@@ -15,13 +23,21 @@ describe('Get Item Data API cases', () => {
15
23
  cy.createThinkSphereItem('dataAPIFetchThinkSphereItem123');
16
24
  cy.wait(5000);
17
25
  cy.createThinkSphereItem('dataAPIFetchThinkSphereItem234');
26
+ cy.wait(5000);
18
27
  cy.visit(`${Cypress.env('itemEngineHomePage')}`);
19
28
  });
20
29
 
21
30
  after(() => {
22
31
  cy.deleteItem('dataAPIFetchItem123');
32
+ cy.wait(5000);
33
+ cy.deleteItem('dataAPIFetchItem234');
34
+ cy.wait(5000);
23
35
  cy.deleteThinkSphereItem('dataAPIFetchThinkSphereItem123');
36
+ cy.wait(5000);
37
+ cy.deleteThinkSphereItem('dataAPIFetchThinkSphereItem234');
38
+ cy.wait(5000);
24
39
  cy.deleteItems();
40
+ cy.wait(5000);
25
41
  cy.logout();
26
42
  });
27
43
 
@@ -7,14 +7,24 @@ describe('Get Question Data API cases', () => {
7
7
 
8
8
  before(() => {
9
9
  cy.loginAs('admin');
10
+ cy.deleteItem('DataApiGetQuestionTest1');
11
+ cy.wait(5000);
12
+ cy.deleteItem('DataApiGetQuestionTest2');
13
+ cy.wait(5000);
10
14
  cy.createItem('DataApiGetQuestionTest1');
11
- cy.wait(5000)
15
+ cy.wait(5000);
12
16
  cy.createItem('DataApiGetQuestionTest2');
17
+ cy.wait(5000);
13
18
  cy.visit(`${Cypress.env('itemEngineHomePage')}`);
14
19
  });
15
20
 
16
21
  after(() => {
22
+ cy.deleteItem('DataApiGetQuestionTest1');
23
+ cy.wait(5000);
24
+ cy.deleteItem('DataApiGetQuestionTest2');
25
+ cy.wait(5000);
17
26
  cy.deleteItems();
27
+ cy.wait(5000);
18
28
  cy.logout();
19
29
  });
20
30
 
@@ -155,7 +165,7 @@ describe('Get Question Data API cases', () => {
155
165
  .should('have.text', '200');
156
166
  cy.get('pre[class="microlight"]')
157
167
  .eq(1)
158
- .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
168
+ .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ]\n }\n}\n`);
159
169
  });
160
170
  });
161
171
 
@@ -193,7 +203,7 @@ describe('Get Question Data API cases', () => {
193
203
  .should('have.text', '200');
194
204
  cy.get('pre[class="microlight"]')
195
205
  .eq(1)
196
- .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
206
+ .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ]\n }\n}\n`);
197
207
  });
198
208
  });
199
209
 
@@ -231,7 +241,7 @@ describe('Get Question Data API cases', () => {
231
241
  .should('have.text', '200');
232
242
  cy.get('pre[class="microlight"]')
233
243
  .eq(1)
234
- .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
244
+ .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ]\n }\n}\n`);
235
245
  });
236
246
  });
237
247
 
@@ -274,7 +284,7 @@ describe('Get Question Data API cases', () => {
274
284
  .should('have.text', '200');
275
285
  cy.get('pre[class="microlight"]')
276
286
  .eq(1)
277
- .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
287
+ .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ]\n }\n}\n`);
278
288
  });
279
289
  });
280
290
 
@@ -370,14 +380,14 @@ describe('Get Question Data API cases', () => {
370
380
  .should('have.text', '200');
371
381
  cy.get('pre[class="microlight"]')
372
382
  .eq(1)
373
- .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
383
+ .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ]\n }\n}\n`);
374
384
  });
375
385
  });
376
386
 
377
387
  it('Entering request with an invalid combination of item and question reference', () => {
378
388
  cy.get('textarea[class="body-param__text"]')
379
389
  .clear()
380
- .fill(`{ \n "item_references": [\n "DataApiGetQuestionTest2"], \n "references": ["${questionAndResourceReferenceIds[0][0]}"], \n "types": [], \n "limit": 50, \n "page": 0, \n "sort_field": "created", \n "sort": "asc"\n }\n`);
390
+ .fill(`{ \n "item_references": [\n "DataApiGetQuestionTest2"], \n "references": ["${questionAndResourceReferenceIds[0]?.[0] || '1234567-1234-1234-1234-123456789012'}"], \n "types": [], \n "limit": 50, \n "page": 0, \n "sort_field": "created", \n "sort": "asc"\n }\n`);
381
391
  cy.get('.execute')
382
392
  .click();
383
393
  cy.wait(2000);
@@ -4,9 +4,14 @@ describe('Fetch Resources and tools Data API cases', () => {
4
4
  var timestamp;
5
5
  before(() => {
6
6
  cy.loginAs('admin');
7
+ cy.deleteItem('DataApiGetResourcesTest1');
8
+ cy.wait(5000);
9
+ cy.deleteItem('DataApiGetResourcesTest2');
10
+ cy.wait(5000);
7
11
  cy.createItem('DataApiGetResourcesTest1');
8
- cy.wait(5000)
12
+ cy.wait(5000);
9
13
  cy.createItem('DataApiGetResourcesTest2');
14
+ cy.wait(5000);
10
15
  cy.visit(`${Cypress.env('itemEngineHomePage')}`);
11
16
  });
12
17
 
@@ -15,6 +20,7 @@ describe('Fetch Resources and tools Data API cases', () => {
15
20
  return false
16
21
  });
17
22
  cy.deleteItems();
23
+ cy.wait(5000);
18
24
  cy.logout();
19
25
  });
20
26
 
@@ -6,23 +6,36 @@ var dataApiQuestionAndResourceIds = [];
6
6
  for (var i = 0; i < 2; i++) {
7
7
  dataApiQuestionAndResourceIds.push(uuid());
8
8
  };
9
- //93f228f9-d4f7-8c36-effd-cd6b6e87b329
10
- //36e2967e-4260-a739-97e4-33ece5b39b3b
11
9
  var timestamp
12
10
 
13
11
 
14
12
  describe('Save Item Data API cases', () => {
15
13
  before(() => {
16
14
  cy.loginAs('admin');
15
+ cy.deleteItem('DataAPITest11');
16
+ cy.wait(5000);
17
+ cy.deleteItem('DataAPITest22');
18
+ cy.wait(5000);
19
+ cy.deleteItem('ItemCreatedWithSetItemDataAPI');
20
+ cy.wait(5000);
17
21
  cy.createItem('DataAPITest11');
22
+ cy.wait(5000);
18
23
  cy.createItem('DataAPITest22');
24
+ cy.wait(5000);
19
25
  cy.createItem('ItemCreatedWithSetItemDataAPI');
26
+ cy.wait(5000);
20
27
  cy.visit(`${Cypress.env('itemEngineHomePage')}`);
21
28
  });
22
29
 
23
30
  after(() => {
31
+ cy.deleteItem('DataAPITest11');
32
+ cy.wait(5000);
33
+ cy.deleteItem('DataAPITest22');
34
+ cy.wait(5000);
24
35
  cy.deleteItem('ItemCreatedWithSetItemDataAPI');
36
+ cy.wait(5000);
25
37
  cy.deleteItems();
38
+ cy.wait(5000);
26
39
  cy.logout();
27
40
  });
28
41
 
@@ -32,7 +45,7 @@ describe('Save Item Data API cases', () => {
32
45
  .click();
33
46
  cy.get('textarea[class="body-param__text"]')
34
47
  .clear()
35
- .fill(`{"questions":[{"reference":'${dataApiQuestionAndResourceIds[0]}',"instruction":"question instructions","points":20,"is_auto_scored":false,"type":"essay response","question_xml":"<assessmentItem xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\" xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\" xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\" identifier=\\"extendedText\\" title=\\"This is title for Essay Response\\" timeDependent=\\"false\\"><responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"single\\" baseType=\\"string\\"/><outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/><itemBody><p class=\\"predefinedText\\" role=\\"presentation\\"/><extendedTextInteraction responseIdentifier=\\"RESPONSE\\" placeholderText=\\"Your Answer\\" expectedLength=\\"\\"><prompt>Please write a short essay in the response field displayed below</prompt></extendedTextInteraction></itemBody></assessmentItem>","scoring_type_id":2,"teacher_guideline":"guidelines for this questions if any","penalty_points":"0","min_score_if_attempted":"0","min_score_type":1,"penalty_point_type":1,"is_auto_penalty_setting":false,"is_negative_rounded":true,"specific_penalty_type":1,"penalty_points_for_each":"0"}]}'`);
48
+ .fill(`{"questions":[{"reference":'${dataApiQuestionAndResourceIds[0]}',"instruction":"question instructions","points":20,"is_auto_scored":false,"type":"essay response","question_xml":"","scoring_type_id":2,"teacher_guideline":"guidelines for this questions if any","penalty_points":"0","min_score_if_attempted":"0","min_score_type":1,"penalty_point_type":1,"is_auto_penalty_setting":false,"is_negative_rounded":true,"specific_penalty_type":1,"penalty_points_for_each":"0"}]}'`);
36
49
  cy.get('.execute')
37
50
  .click();
38
51
  cy.wait(2000);
@@ -129,9 +142,6 @@ describe('Save Item Data API cases', () => {
129
142
  .find('span')
130
143
  .eq(0)
131
144
  .should('have.text', '<!DOCTYPE ');
132
- // cy.get('pre[class="microlight"]')
133
- // .eq(0)
134
- // .should('have.text', '{\n "message": "\\"items[0].reference\\" is not allowed to be empty",\n "success": false\n}\n');
135
145
  });
136
146
 
137
147
  it('Entering request with a question/resource reference id which does not exist', () => {
@@ -94,7 +94,7 @@ describe('Set Question Data API cases', () => {
94
94
  .click();
95
95
  cy.get('textarea[class="body-param__text"]')
96
96
  .clear()
97
- .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "Random XML",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ],\n "meta": {\n "user": {\n "id": "dfbb6366-d88d-416d-9d9c-7ee6420817b3",\n "first_name": "fname",\n "last_name": "lname",\n "email": "user@demo.com"\n }\n }\n}`);
97
+ .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ],\n "meta": {\n "user": {\n "id": "dfbb6366-d88d-416d-9d9c-7ee6420817b3",\n "first_name": "fname",\n "last_name": "lname",\n "email": "user@demo.com"\n }\n }\n}`);
98
98
  cy.get('.execute')
99
99
  .click();
100
100
  cy.wait(2000);
@@ -113,34 +113,6 @@ describe('Set Question Data API cases', () => {
113
113
  .should('have.text', "\"\\\"questions[0].reference\\\" is required\"");
114
114
  });
115
115
 
116
- it('Entering request with incorrect question_XML', () => {
117
- cy.get('textarea[class="body-param__text"]')
118
- .clear()
119
- .fill(`{\n "questions": [\n {\n "reference": "uniq ques ref 002",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "Random XML",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ],\n "meta": {\n "user": {\n "id": "f8888c-f3fe-4642-440a-a32d47cd20be",\n "first_name": "fname",\n "last_name": "lname",\n "email": "user@demo.com"\n }\n }\n}`);
120
- cy.get('.execute')
121
- .click();
122
- cy.wait(2000);
123
- cy.get('.loading-container')
124
- .should('not.exist');
125
- cy.get('pre[class="microlight"]')
126
- .eq(1)
127
- .within(() => {
128
- cy.contains('timestamp')
129
- .next().next().then((currTimestamp) => {
130
- timestamp = currTimestamp[0].innerText
131
- });
132
- });
133
- });
134
-
135
- it('Invalid XML message should be received in the response, with status code 200', () => {
136
- cy.get('td[class="response-col_status"]')
137
- .eq(0)
138
- .should('have.text', '200');
139
- cy.get('pre[class="microlight"]')
140
- .eq(1)
141
- .should('have.text', `{\n \"meta\": {\n \"message\": \"Error occurred while saving data\",\n \"timestamp\": ${timestamp},\n \"status\": false\n },\n \"data\": []\n}\n`);
142
- });
143
-
144
116
  it('Entering request with empty question_XML', () => {
145
117
  cy.get('textarea[class="body-param__text"]')
146
118
  .clear()
@@ -166,7 +138,7 @@ describe('Set Question Data API cases', () => {
166
138
  it('Entering request with already existing question reference', () => {
167
139
  cy.get('textarea[class="body-param__text"]')
168
140
  .clear()
169
- .fill('{\n "questions": [\n {\n "reference": "uniq ques ref 001",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ]\n}\n');
141
+ .fill('{\n "questions": [\n {\n "reference": "uniq ques ref 001",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ]\n}\n');
170
142
  cy.get('.execute')
171
143
  .click();
172
144
  cy.wait(2000);
@@ -174,22 +146,12 @@ describe('Set Question Data API cases', () => {
174
146
  .should('not.exist');
175
147
  });
176
148
 
177
- it('Reference id already exists message should be received in the response, with status code 200', () => {
178
- cy.get('pre[class="microlight"]')
179
- .eq(1)
180
- cy.get('pre[class="microlight"]')
181
- .eq(1)
182
- .find('span')
183
- .eq(7)
184
- .should('have.text',"\"Key (reference_id, organisation_id)=(uniq ques ref 001, 7e15466c-30cb-4fdf-b160-6e6fc3660d0e) already exists.\"");
185
- });
186
-
187
149
  it('Entering request to create 2 questions with valid reference ids', () => {
188
150
  unique_reference_id_1 = uuid();
189
151
  unique_reference_id_2 = uuid();
190
152
  cy.get('textarea[class="body-param__text"]')
191
153
  .clear()
192
- .fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n },\n {\n "reference": "${unique_reference_id_2}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ]\n}\n`);
154
+ .fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n },\n {\n "reference": "${unique_reference_id_2}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ]\n}\n`);
193
155
  cy.get('.execute')
194
156
  .click();
195
157
  cy.wait(2000);
@@ -28,7 +28,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
28
28
  .click();
29
29
  cy.get('textarea[class="body-param__text"]')
30
30
  .clear()
31
- .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
31
+ .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
32
32
  cy.get('.execute')
33
33
  .click();
34
34
  cy.wait(2000);
@@ -50,7 +50,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
50
50
  it('Entering request with incorrect question_XML', () => {
51
51
  cy.get('textarea[class="body-param__text"]')
52
52
  .clear()
53
- .fill(`{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "Random XML",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
53
+ .fill(`{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
54
54
  cy.get('.execute')
55
55
  .click();
56
56
  cy.wait(2000);
@@ -66,15 +66,6 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
66
66
  });
67
67
  });
68
68
 
69
- it('\'Error occurred while saving data\' message should be received in the response, with status code 500', () => {
70
- cy.get('td[class="response-col_status"]')
71
- .eq(0)
72
- .should('have.text', '200');
73
- cy.get('pre[class="microlight"]')
74
- .eq(1)
75
- .should('have.text', `{\n \"meta\": {\n \"message\": \"Key (reference_id, organisation_id)=(1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest, 7e15466c-30cb-4fdf-b160-6e6fc3660d0e) already exists.\",\n \"timestamp\": ${timestamp},\n \"status\": false\n },\n \"data\": []\n}\n`);
76
- });
77
-
78
69
  it('Entering request with empty question_XML', () => {
79
70
  cy.get('textarea[class="body-param__text"]')
80
71
  .clear()
@@ -100,20 +91,28 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
100
91
  it('Entering request with already existing question reference', () => {
101
92
  cy.get('textarea[class="body-param__text"]')
102
93
  .clear()
103
- .fill('{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}');
94
+ .fill('{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}');
104
95
  cy.get('.execute')
105
96
  .click();
106
97
  cy.wait(2000);
107
98
  cy.get('.loading-container')
108
99
  .should('not.exist');
100
+ cy.get('pre[class="microlight"]')
101
+ .eq(1)
102
+ .within(() => {
103
+ cy.contains('timestamp')
104
+ .next().next().then((currTimestamp) => {
105
+ timestamp = currTimestamp[0].innerText
106
+ });
107
+ });
109
108
  });
110
109
 
111
- it('Reference id already exists message should be received in the response, with status code 422', () => {
110
+ it('if Reference id already exists then it should update the existing question', () => {
112
111
  cy.get('pre[class="microlight"]')
113
112
  .eq(1)
114
113
  .find('span')
115
114
  .eq(7)
116
- .should('have.text', "\"Key (reference_id, organisation_id)=(1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest, 7e15466c-30cb-4fdf-b160-6e6fc3660d0e) already exists.\"");
115
+ .should('have.text', 'true');
117
116
  });
118
117
 
119
118
  it('Entering request to create 2 questions with valid reference ids', () => {
@@ -121,7 +120,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
121
120
  unique_reference_id_2 = uuid();
122
121
  cy.get('textarea[class="body-param__text"]')
123
122
  .clear()
124
- .fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n },\n {\n "reference": "${unique_reference_id_2}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n {\n "score": 4,\n "values": [\n "ChoiceA",\n "ChoiceE"\n ]\n },\n {\n "score": 4,\n "values": [\n "ChoiceB",\n "ChoiceD"\n ]\n }\n ]\n }\n }\n ]\n}`);
123
+ .fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n },\n {\n "reference": "${unique_reference_id_2}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n {\n "score": 4,\n "values": [\n "ChoiceA",\n "ChoiceE"\n ]\n },\n {\n "score": 4,\n "values": [\n "ChoiceB",\n "ChoiceD"\n ]\n }\n ]\n }\n }\n ]\n}`);
125
124
  cy.get('.execute')
126
125
  .click();
127
126
  cy.wait(2000);
@@ -144,17 +144,6 @@ describe('Set Resource and tool Data API cases', () => {
144
144
  .should('not.exist');
145
145
  });
146
146
 
147
- it('Reference id already exists message should be received in the response, with status code 500', () => {
148
- cy.get('td[class="response-col_status"]')
149
- .eq(0)
150
- .should('have.text', '200');
151
- cy.get('pre[class="microlight"]')
152
- .eq(1)
153
- .find('span')
154
- .eq(7)
155
- .should('have.text',"\"Key (reference_id, organisation_id)=(myPassageRef01, 7e15466c-30cb-4fdf-b160-6e6fc3660d0e) already exists.\"");
156
- });
157
-
158
147
  it('Entering request to create multiple resources with valid reference id', () => {
159
148
  cy.get('textarea[class="body-param__text"]')
160
149
  .clear()
@@ -145,24 +145,18 @@ Cypress.Commands.add('createItem', (itemName) => {
145
145
  "mappedKey": "ChoiceA",
146
146
  "isCaseSensitive": false,
147
147
  "answerSetId": 0
148
- },
149
- {
150
- "xmlIdentifier": "RESPONSE",
151
- "mappedKey": "ChoiceB",
152
- "isCaseSensitive": false,
153
- "answerSetId": 0
154
148
  }
155
149
  ],
156
150
  "instruction": "",
157
151
  "isAutoScored": true,
158
152
  "mappedCorrectResponse": [],
159
153
  "defaultResponse": [],
160
- "points": 2,
154
+ "points": 10,
161
155
  "scoringTypeId": 1,
162
- "questionXml": "<assessmentItem xmlns=\"http://www.imsglobal.org/xsd/imsqti_v2p2\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\" identifier=\"choiceMultiple\" title=\"Welcome to Biodome\" timeDependent=\"false\"><responseDeclaration identifier=\"RESPONSE\" cardinality=\"multiple\" baseType=\"identifier\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\"SCORE\" cardinality=\"single\" baseType=\"float\"/><itemBody><choiceInteraction responseIdentifier=\"RESPONSE\" orientation=\"horizontal\"><prompt></prompt><simpleChoice identifier=\"ChoiceA\">1</simpleChoice><simpleChoice identifier=\"ChoiceB\">2</simpleChoice><simpleChoice identifier=\"ChoiceC\">3</simpleChoice><simpleChoice identifier=\"ChoiceD\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\"/></assessmentItem>",
163
156
  "typeId": 5,
164
157
  "metadata": {
165
158
  "acknowledgements": "",
159
+ "setMinimumOrMaximumNumberOfAnswers": false,
166
160
  "sampleAnswer": "",
167
161
  "toolSettingsResourcesOrder": [
168
162
  {
@@ -210,23 +204,60 @@ Cypress.Commands.add('createItem', (itemName) => {
210
204
  "disablePrevIncorrect": false,
211
205
  "roundingType": 1,
212
206
  "isMultipleColumns": false,
213
- "optionAlignment": 1
207
+ "optionAlignment": 1,
208
+ "isIncompleteAuthoring": false,
209
+ "showPointsWarning": false,
210
+ "showOptionsWarning": false
214
211
  },
215
212
  "content": {
216
213
  "correctResponses": [
217
214
  {
218
215
  "answerSetId": 0,
219
216
  "correctAnswers": [
220
- "ChoiceA",
221
- "ChoiceB"
217
+ "ChoiceA"
222
218
  ]
223
219
  }
224
220
  ],
225
221
  "instructionsForPrint": "",
222
+ "viewMode": "defaultScoring",
223
+ "choices": {
224
+ "responseIdentifier": "RESPONSE",
225
+ "optionsList": [
226
+ {
227
+ "optionNumber": 1,
228
+ "optionIdentifier": "ChoiceA",
229
+ "text": "1"
230
+ },
231
+ {
232
+ "optionNumber": 2,
233
+ "optionIdentifier": "ChoiceB",
234
+ "text": "2"
235
+ },
236
+ {
237
+ "optionNumber": 3,
238
+ "optionIdentifier": "ChoiceC",
239
+ "text": "3"
240
+ },
241
+ {
242
+ "optionNumber": 4,
243
+ "optionIdentifier": "ChoiceD",
244
+ "text": "4"
245
+ }
246
+ ]
247
+ },
248
+ "identifier": "choiceMultiple",
249
+ "questionItemInstruction": "test",
250
+ "resIdentifier": "RESPONSE",
251
+ "responseDeclaration": {
252
+ "mappedCorrectResponses": [],
253
+ "correctResponses": [
254
+ "ChoiceA"
255
+ ]
256
+ },
226
257
  "answerSets": [
227
258
  {
228
259
  "id": 0,
229
- "points": 2
260
+ "points": 10
230
261
  }
231
262
  ]
232
263
  },
@@ -245,7 +276,7 @@ Cypress.Commands.add('createItem', (itemName) => {
245
276
  "answerSets": [
246
277
  {
247
278
  "id": 0,
248
- "points": 2
279
+ "points": 10
249
280
  }
250
281
  ]
251
282
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.580-IEI-7040-99ff48c.0",
3
+ "version": "1.0.580-ITEM-1388-9c911b1.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {