itemengine-cypress-automation 1.0.531-ITEM-1360-a2312b7.0 → 1.0.532-graphing-cypress-fixed-2ef7d72.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.
@@ -32,7 +32,7 @@ describe('Save Item Data API cases', () => {
32
32
  .click();
33
33
  cy.get('textarea[class="body-param__text"]')
34
34
  .clear()
35
- .fill(`{"questions":[{"reference":'${dataApiQuestionAndResourceIds[0]}',"instruction":"question instructions","points":20,"is_auto_scored":false,"type":"extendedText","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"}]}'`);
35
+ .fill(`{"questions":[{"reference":'${dataApiQuestionAndResourceIds[0]}',"instruction":"question instructions","points":20,"is_auto_scored":false,"type":6,"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"}]}'`);
36
36
  cy.get('.execute')
37
37
  .click();
38
38
  cy.wait(2000);
@@ -2,8 +2,6 @@ import uuid from 'react-uuid';
2
2
 
3
3
  describe('Set Question Data API cases', () => {
4
4
  var timestamp;
5
- var unique_reference_id_1;
6
- var unique_reference_id_2;
7
5
  before(() => {
8
6
  cy.loginAs('admin');
9
7
  cy.visit(`${Cypress.env('itemEngineHomePage')}`);
@@ -94,7 +92,7 @@ describe('Set Question Data API cases', () => {
94
92
  .click();
95
93
  cy.get('textarea[class="body-param__text"]')
96
94
  .clear()
97
- .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\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}`);
95
+ .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": 5,\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}`);
98
96
  cy.get('.execute')
99
97
  .click();
100
98
  cy.wait(2000);
@@ -116,7 +114,7 @@ describe('Set Question Data API cases', () => {
116
114
  it('Entering request with incorrect question_XML', () => {
117
115
  cy.get('textarea[class="body-param__text"]')
118
116
  .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": "choiceMultiple",\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}`);
117
+ .fill(`{\n "questions": [\n {\n "reference": "uniq ques ref 002",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": 5,\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
118
  cy.get('.execute')
121
119
  .click();
122
120
  cy.wait(2000);
@@ -144,7 +142,7 @@ describe('Set Question Data API cases', () => {
144
142
  it('Entering request with empty question_XML', () => {
145
143
  cy.get('textarea[class="body-param__text"]')
146
144
  .clear()
147
- .fill(`{\n "questions": [\n {\n "reference": "${uuid()}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\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}`);
145
+ .fill(`{\n "questions": [\n {\n "reference": "uniq ques ref 001",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": 5,\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}`);
148
146
  cy.get('.execute')
149
147
  .click();
150
148
  cy.wait(2000);
@@ -152,7 +150,7 @@ describe('Set Question Data API cases', () => {
152
150
  .should('not.exist');
153
151
  });
154
152
 
155
- it('question should be get saved without XMl also with default values, with status code 200', () => {
153
+ it('XML is not allowed to be empty message should be received in the response, with status code 200', () => {
156
154
  cy.get('td[class="response-col_status"]')
157
155
  .eq(0)
158
156
  .should('have.text', '200');
@@ -160,13 +158,13 @@ describe('Set Question Data API cases', () => {
160
158
  .eq(1)
161
159
  .find('span')
162
160
  .eq(7)
163
- .should('have.text',"true");
161
+ .should('have.text',"\"\\\"questions[0].questionXml\\\" is not allowed to be empty\"");
164
162
  });
165
163
 
166
164
  it('Entering request with already existing question reference', () => {
167
165
  cy.get('textarea[class="body-param__text"]')
168
166
  .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": "choiceMultiple",\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');
167
+ .fill('{\n "questions": [\n {\n "reference": "uniq ques ref 001",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": 5,\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');
170
168
  cy.get('.execute')
171
169
  .click();
172
170
  cy.wait(2000);
@@ -185,11 +183,9 @@ describe('Set Question Data API cases', () => {
185
183
  });
186
184
 
187
185
  it('Entering request to create 2 questions with valid reference ids', () => {
188
- unique_reference_id_1 = uuid();
189
- unique_reference_id_2 = uuid();
190
186
  cy.get('textarea[class="body-param__text"]')
191
187
  .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": "choiceMultiple",\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": "choiceMultiple",\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`);
188
+ .fill(`{\n "questions": [\n {\n "reference": "${uuid()}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": 5,\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": "${uuid()}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": 5,\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`);
193
189
  cy.get('.execute')
194
190
  .click();
195
191
  cy.wait(2000);
@@ -211,28 +207,6 @@ describe('Set Question Data API cases', () => {
211
207
  .should('have.text', '200');
212
208
  cy.get('pre[class="microlight"]')
213
209
  .eq(1)
214
- .should('have.text', `{\n "meta": {\n "status": true,\n "timestamp": ${timestamp}\n },\n "data": [\n {\n "type": "choiceMultiple",\n "reference": "${unique_reference_id_1}"\n },\n {\n "type": "choiceMultiple",\n "reference": "${unique_reference_id_2}"\n }\n ]\n}\n`);
215
- });
216
-
217
- it('Entering request without XML and providing the data content, response should come with status code 200', () => {
218
- cy.get('textarea[class="body-param__text"]')
219
- .clear()
220
- .fill('{\n "questions": [\n {\n \"type\": \"choiceMultiple\",\n \"reference\": \"${uuid()}\",\n \"content\": {\n \"instruction\": \"<p>test</p>\",\n \"acknowledgements\": \"Acknowledgements and references\",\n \"sampleAnswer\": \"Sample Answer\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"option 1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"option 2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"option 3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"option 4\",\n \"locked\": true\n }\n ],\n \"correctAnswer\": [\n {\n \"answers\": [\n { \"answer\": \"ChoiceA\", \"points\": 5 },\n { \"answer\": \"ChoiceC\", \"points\": 7 }\n ]\n },\n {\n \"answers\": [\n { \"answer\": \"ChoiceC\", \"points\": 7 }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoringType\": \"auto-scored\",\n \"subScoringType\": \"partialMatch\",\n \"penaltyPoints\": 1,\n \"penaltyPointType\": \"penaltyForEntireQuestion\",\n \"penaltyPointsForEach\": null,\n \"minScoreType\": \"awardMinScoreOnlyIfAttempted\",\n \"minScorePoints\": 1,\n \"isRoundingEnabled\": true,\n \"roundingType\": \"roundToNearestInteger\",\n \"isNegativeRounded\": false,\n \"scoringGuidance\": \"Teacher Scoring Guidance\"\n },\n \"settings\": {\n \"studentViewSettings\": {\n \"shuffleOption\": true,\n \"positionLock\": true,\n \"allowSettingMinOrMaxNumOfAnswers\": true,\n \"minNumAnswers\": 1,\n \"maxNumAnswers\": 2,\n \"allowCheckAnswer\": true,\n \"maxAttemptsToCheckAnswer\": 1\n },\n \"additionalSettings\": {\n \"orientation\": \"horizontal\",\n \"multipleColumns\": true,\n \"numOfOptionColumns\": 2,\n \"fontSize\": \"medium\",\n \"alignment\": \"left\",\n \"multipleSelection\": true,\n \"optionStyleType\": \"Default\",\n \"optionNumeration\": \"Default\",\n \"nonAccessible\": true\n },\n \"printLayoutSettings\": {\n \"excludeFromPrint\": false,\n \"printInstruction\": \"Question instructions for print\"\n },\n \"toolSettings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": true\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": true\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');
221
- cy.get('.execute')
222
- .click();
223
- cy.wait(2000);
224
- cy.get('.loading-container')
225
- .should('not.exist');
226
- });
227
-
228
- it('Question should be get saved without XMl and when data content is provided, with status code 200', () => {
229
- cy.get('td[class="response-col_status"]')
230
- .eq(0)
231
- .should('have.text', '200');
232
- cy.get('pre[class="microlight"]')
233
- .eq(1)
234
- .find('span')
235
- .eq(7)
236
- .should('have.text',"true");
210
+ .should('have.text', `{\n "meta": {\n "status": true,\n "timestamp": ${timestamp}\n },\n "data": []\n}\n`);
237
211
  });
238
212
  });
@@ -2,8 +2,6 @@ import uuid from 'react-uuid';
2
2
 
3
3
  describe('Save MCQ Question with Alternate Answers API cases', () => {
4
4
  var timestamp;
5
- var unique_reference_id_1;
6
- var unique_reference_id_2;
7
5
  before(() => {
8
6
  cy.loginAs('admin');
9
7
  cy.visit('/item-engine/data-api/item-bank/save-questions');
@@ -28,7 +26,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
28
26
  .click();
29
27
  cy.get('textarea[class="body-param__text"]')
30
28
  .clear()
31
- .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\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}`);
29
+ .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": 5,\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}`);
32
30
  cy.get('.execute')
33
31
  .click();
34
32
  cy.wait(2000);
@@ -50,7 +48,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
50
48
  it('Entering request with incorrect question_XML', () => {
51
49
  cy.get('textarea[class="body-param__text"]')
52
50
  .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": "choiceMultiple",\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}`);
51
+ .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": 5,\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}`);
54
52
  cy.get('.execute')
55
53
  .click();
56
54
  cy.wait(2000);
@@ -78,7 +76,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
78
76
  it('Entering request with empty question_XML', () => {
79
77
  cy.get('textarea[class="body-param__text"]')
80
78
  .clear()
81
- .fill(`{\n "questions": [\n {\n "reference": "${uuid()}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\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}`);
79
+ .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": 5,\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}`);
82
80
  cy.get('.execute')
83
81
  .click();
84
82
  cy.wait(2000);
@@ -86,7 +84,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
86
84
  .should('not.exist');
87
85
  });
88
86
 
89
- it('question should be get saved without XMl also with default values, with status code 200', () => {
87
+ it('XML is not allowed to be empty message should be received in the response, with status code 422', () => {
90
88
  cy.get('td[class="response-col_status"]')
91
89
  .eq(0)
92
90
  .should('have.text', '200');
@@ -94,13 +92,13 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
94
92
  .eq(1)
95
93
  .find('span')
96
94
  .eq(7)
97
- .should('have.text', "true");
95
+ .should('have.text', "\"\\\"questions[0].questionXml\\\" is not allowed to be empty\"");
98
96
  });
99
97
 
100
98
  it('Entering request with already existing question reference', () => {
101
99
  cy.get('textarea[class="body-param__text"]')
102
100
  .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": "choiceMultiple",\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}');
101
+ .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": 5,\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}');
104
102
  cy.get('.execute')
105
103
  .click();
106
104
  cy.wait(2000);
@@ -117,11 +115,9 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
117
115
  });
118
116
 
119
117
  it('Entering request to create 2 questions with valid reference ids', () => {
120
- unique_reference_id_1 = uuid();
121
- unique_reference_id_2 = uuid();
122
118
  cy.get('textarea[class="body-param__text"]')
123
119
  .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": "choiceMultiple",\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": "choiceMultiple",\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}`);
120
+ .fill(`{\n "questions": [\n {\n "reference": "${uuid()}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": 5,\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": "${uuid()}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": 5,\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}`);
125
121
  cy.get('.execute')
126
122
  .click();
127
123
  cy.wait(2000);
@@ -144,6 +140,6 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
144
140
  .should('have.text', '200');
145
141
  cy.get('pre[class="microlight"]')
146
142
  .eq(1)
147
- .should('have.text', `{\n "meta": {\n "status": true,\n "timestamp": ${timestamp}\n },\n "data": [\n {\n "type": "choiceMultiple",\n "reference": "${unique_reference_id_1}"\n },\n {\n "type": "choiceMultiple",\n "reference": "${unique_reference_id_2}"\n }\n ]\n}\n`);
143
+ .should('have.text', `{\n "meta": {\n "status": true,\n "timestamp": ${timestamp}\n },\n "data": []\n}\n`);
148
144
  });
149
145
  });
@@ -38,7 +38,7 @@ const selectors = {
38
38
  graphImageEditTab: () => cy.get('.ngie-jxgbox .JXGimage'),
39
39
  snapToGridCheckbox: () => cy.get('[data-ngie-testid="snap-to-grid-checkbox"] input'),
40
40
  snapToGridLabel: () => cy.get('[data-ngie-testid="snap-to-grid-checkbox"] .MuiFormControlLabel-label'),
41
- graphLine: () => cy.get('line[tabindex="null"]'),
41
+ graphLine: () => cy.get('line[tabindex="0"]'),
42
42
  graphCircle: () => cy.get('ellipse[fill-opacity="0"]'),
43
43
  graphPolygon: () => cy.get('polygon'),
44
44
  graphSine: () => cy.get('[pointer-events="visiblePainted"][tabindex="0"][fill-rule="evenodd"]'),
@@ -119,7 +119,7 @@ const selectors = {
119
119
  xAxisLabelGraphPreviewTab: () => cy.get('[class*="GraphingQuestion"] .graph-footer .question-text-wrapper').eq(1),
120
120
  xAxisGraphPreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg line[stroke-linecap="butt"]').eq(0),
121
121
  yAxisGraphPreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg line[stroke-linecap="butt"]').eq(1),
122
- graphLinePreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg').eq(0).find('line[tabindex="null"]'),
122
+ graphLinePreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg').eq(0).find('line[tabindex="0"]'),
123
123
  graphLineSegmentsPreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg').eq(0).find('line[tabindex="0"]'),
124
124
  graphCirclePreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg').eq(0).find('ellipse[fill-opacity="0"]'),
125
125
  graphPolygonPreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg').eq(0).find('polygon'),
@@ -230,13 +230,13 @@ const selectors = {
230
230
  //Grading view
231
231
  gradingViewQuestionSineWave: () => cy.get('.ngie-jxgbox').eq(0).find('[pointer-events="visiblePainted"][tabindex="0"][fill-rule="evenodd"]'),
232
232
  gradingViewQuestionCircle: () => cy.get('.ngie-jxgbox').eq(0).find('ellipse[fill-opacity="0"]'),
233
- gradingViewQuestionLine: () => cy.get('.ngie-jxgbox').eq(0).find('line[tabindex="null"]'),
233
+ gradingViewQuestionLine: () => cy.get('.ngie-jxgbox').eq(0).find('line[tabindex="0"]'),
234
234
 
235
235
  //Correct answer section
236
236
  correctAnswerLabel: () => cy.get('[class*="AnswerLabel"]'),
237
237
  graphCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg'),
238
238
  graphCircleCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('ellipse[fill-opacity="0"]'),
239
- graphLineCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('line[tabindex="null"]'),
239
+ graphLineCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('line[tabindex="0"]'),
240
240
  graphPolygonCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('polygon'),
241
241
  graphSineWaveCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('[pointer-events="visiblePainted"][tabindex="0"][fill-rule="evenodd"]'),
242
242
  correctIncorrectStatusMessageText: () => cy.get('[class*="Graphingstyles__CorrectIncorrectWrapper"]'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.531-ITEM-1360-a2312b7.0",
3
+ "version": "1.0.532-graphing-cypress-fixed-2ef7d72.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {