itemengine-cypress-automation 1.0.551-IEI-5835-4b5c9f4.0 → 1.0.551-ITEM-1376-6bf72d0.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.
- package/cypress/e2e/ILC/dataApi/saveItems.js +1 -1
 - package/cypress/e2e/ILC/dataApi/saveQuestions.js +7 -7
 - package/cypress/e2e/ILC/dataApi/saveQuestionsMCQAlternateAnswers.js +6 -6
 - package/package.json +1 -1
 - package/cypress/e2e/ILC/LiveItem/liveItem.js +0 -56
 - package/cypress/pages/components/liveItemPage.js +0 -58
 
| 
         @@ -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":" 
     | 
| 
      
 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"}]}'`);
         
     | 
| 
       36 
36 
     | 
    
         
             
                    cy.get('.execute')
         
     | 
| 
       37 
37 
     | 
    
         
             
                        .click();
         
     | 
| 
       38 
38 
     | 
    
         
             
                    cy.wait(2000);
         
     | 
| 
         @@ -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": " 
     | 
| 
      
 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}`);
         
     | 
| 
       98 
98 
     | 
    
         
             
                    cy.get('.execute')
         
     | 
| 
       99 
99 
     | 
    
         
             
                        .click();
         
     | 
| 
       100 
100 
     | 
    
         
             
                    cy.wait(2000);
         
     | 
| 
         @@ -116,7 +116,7 @@ describe('Set Question Data API cases', () => { 
     | 
|
| 
       116 
116 
     | 
    
         
             
                it('Entering request with incorrect question_XML', () => {
         
     | 
| 
       117 
117 
     | 
    
         
             
                    cy.get('textarea[class="body-param__text"]')
         
     | 
| 
       118 
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": " 
     | 
| 
      
 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 
120 
     | 
    
         
             
                    cy.get('.execute')
         
     | 
| 
       121 
121 
     | 
    
         
             
                        .click();
         
     | 
| 
       122 
122 
     | 
    
         
             
                    cy.wait(2000);
         
     | 
| 
         @@ -144,7 +144,7 @@ describe('Set Question Data API cases', () => { 
     | 
|
| 
       144 
144 
     | 
    
         
             
                it('Entering request with empty question_XML', () => {
         
     | 
| 
       145 
145 
     | 
    
         
             
                    cy.get('textarea[class="body-param__text"]')
         
     | 
| 
       146 
146 
     | 
    
         
             
                        .clear()
         
     | 
| 
       147 
     | 
    
         
            -
                        .fill(`{\n  "questions": [\n    {\n      "reference": "${uuid()}",\n      "instruction": "question instructions",\n      "points": 10,\n      "is_auto_scored": true,\n      "type": " 
     | 
| 
      
 147 
     | 
    
         
            +
                        .fill(`{\n  "questions": [\n    {\n      "reference": "${uuid()}",\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}`);
         
     | 
| 
       148 
148 
     | 
    
         
             
                    cy.get('.execute')
         
     | 
| 
       149 
149 
     | 
    
         
             
                        .click();
         
     | 
| 
       150 
150 
     | 
    
         
             
                    cy.wait(2000);
         
     | 
| 
         @@ -166,7 +166,7 @@ describe('Set Question Data API cases', () => { 
     | 
|
| 
       166 
166 
     | 
    
         
             
                it('Entering request with already existing question reference', () => {
         
     | 
| 
       167 
167 
     | 
    
         
             
                    cy.get('textarea[class="body-param__text"]')
         
     | 
| 
       168 
168 
     | 
    
         
             
                        .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": " 
     | 
| 
      
 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');
         
     | 
| 
       170 
170 
     | 
    
         
             
                    cy.get('.execute')
         
     | 
| 
       171 
171 
     | 
    
         
             
                        .click();
         
     | 
| 
       172 
172 
     | 
    
         
             
                    cy.wait(2000);
         
     | 
| 
         @@ -189,7 +189,7 @@ describe('Set Question Data API cases', () => { 
     | 
|
| 
       189 
189 
     | 
    
         
             
                    unique_reference_id_2 = uuid();
         
     | 
| 
       190 
190 
     | 
    
         
             
                    cy.get('textarea[class="body-param__text"]')
         
     | 
| 
       191 
191 
     | 
    
         
             
                        .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": " 
     | 
| 
      
 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`);
         
     | 
| 
       193 
193 
     | 
    
         
             
                    cy.get('.execute')
         
     | 
| 
       194 
194 
     | 
    
         
             
                        .click();
         
     | 
| 
       195 
195 
     | 
    
         
             
                    cy.wait(2000);
         
     | 
| 
         @@ -211,13 +211,13 @@ describe('Set Question Data API cases', () => { 
     | 
|
| 
       211 
211 
     | 
    
         
             
                        .should('have.text', '200');
         
     | 
| 
       212 
212 
     | 
    
         
             
                    cy.get('pre[class="microlight"]')
         
     | 
| 
       213 
213 
     | 
    
         
             
                        .eq(1)
         
     | 
| 
       214 
     | 
    
         
            -
                        .should('have.text', `{\n  "meta": {\n    "status": true,\n    "timestamp": ${timestamp}\n  },\n  "data": [\n    {\n      "type": " 
     | 
| 
      
 214 
     | 
    
         
            +
                        .should('have.text', `{\n  "meta": {\n    "status": true,\n    "timestamp": ${timestamp}\n  },\n  "data": [\n    {\n      "type": "multiple selection",\n      "reference": "${unique_reference_id_1}"\n    },\n    {\n      "type": "multiple selection",\n      "reference": "${unique_reference_id_2}"\n    }\n  ]\n}\n`);
         
     | 
| 
       215 
215 
     | 
    
         
             
                });
         
     | 
| 
       216 
216 
     | 
    
         | 
| 
       217 
217 
     | 
    
         
             
                it('Entering request without XML and providing the data content, response should come with status code 200', () => {
         
     | 
| 
       218 
218 
     | 
    
         
             
                    cy.get('textarea[class="body-param__text"]')
         
     | 
| 
       219 
219 
     | 
    
         
             
                        .clear()
         
     | 
| 
       220 
     | 
    
         
            -
                        .fill('{\n  "questions": [\n  {\n  \"type\": \" 
     | 
| 
      
 220 
     | 
    
         
            +
                        .fill('{\n  "questions": [\n  {\n  \"type\": \"multiple selection\",\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 
221 
     | 
    
         
             
                    cy.get('.execute')
         
     | 
| 
       222 
222 
     | 
    
         
             
                        .click();
         
     | 
| 
       223 
223 
     | 
    
         
             
                    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": " 
     | 
| 
      
 31 
     | 
    
         
            +
                        .fill(`{\n  "questions": [\n    {\n      "instruction": "question instructions",\n      "points": 10,\n      "is_auto_scored": true,\n      "type": "multiple choice",\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 
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": " 
     | 
| 
      
 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 choice",\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 
54 
     | 
    
         
             
                    cy.get('.execute')
         
     | 
| 
       55 
55 
     | 
    
         
             
                        .click();
         
     | 
| 
       56 
56 
     | 
    
         
             
                    cy.wait(2000);
         
     | 
| 
         @@ -78,7 +78,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => { 
     | 
|
| 
       78 
78 
     | 
    
         
             
                it('Entering request with empty question_XML', () => {
         
     | 
| 
       79 
79 
     | 
    
         
             
                    cy.get('textarea[class="body-param__text"]')
         
     | 
| 
       80 
80 
     | 
    
         
             
                        .clear()
         
     | 
| 
       81 
     | 
    
         
            -
                        .fill(`{\n  "questions": [\n    {\n      "reference": "${uuid()}",\n      "instruction": "question instructions",\n      "points": 10,\n      "is_auto_scored": true,\n      "type": " 
     | 
| 
      
 81 
     | 
    
         
            +
                        .fill(`{\n  "questions": [\n    {\n      "reference": "${uuid()}",\n      "instruction": "question instructions",\n      "points": 10,\n      "is_auto_scored": true,\n      "type": "multiple choice",\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 
82 
     | 
    
         
             
                    cy.get('.execute')
         
     | 
| 
       83 
83 
     | 
    
         
             
                        .click();
         
     | 
| 
       84 
84 
     | 
    
         
             
                    cy.wait(2000);
         
     | 
| 
         @@ -100,7 +100,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => { 
     | 
|
| 
       100 
100 
     | 
    
         
             
                it('Entering request with already existing question reference', () => {
         
     | 
| 
       101 
101 
     | 
    
         
             
                    cy.get('textarea[class="body-param__text"]')
         
     | 
| 
       102 
102 
     | 
    
         
             
                        .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": " 
     | 
| 
      
 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 choice",\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 
104 
     | 
    
         
             
                    cy.get('.execute')
         
     | 
| 
       105 
105 
     | 
    
         
             
                        .click();
         
     | 
| 
       106 
106 
     | 
    
         
             
                    cy.wait(2000);
         
     | 
| 
         @@ -121,7 +121,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => { 
     | 
|
| 
       121 
121 
     | 
    
         
             
                    unique_reference_id_2 = uuid();
         
     | 
| 
       122 
122 
     | 
    
         
             
                    cy.get('textarea[class="body-param__text"]')
         
     | 
| 
       123 
123 
     | 
    
         
             
                        .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": " 
     | 
| 
      
 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 choice",\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 choice",\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 
125 
     | 
    
         
             
                    cy.get('.execute')
         
     | 
| 
       126 
126 
     | 
    
         
             
                        .click();
         
     | 
| 
       127 
127 
     | 
    
         
             
                    cy.wait(2000);
         
     | 
| 
         @@ -144,6 +144,6 @@ describe('Save MCQ Question with Alternate Answers API cases', () => { 
     | 
|
| 
       144 
144 
     | 
    
         
             
                        .should('have.text', '200');
         
     | 
| 
       145 
145 
     | 
    
         
             
                    cy.get('pre[class="microlight"]')
         
     | 
| 
       146 
146 
     | 
    
         
             
                        .eq(1)
         
     | 
| 
       147 
     | 
    
         
            -
                        .should('have.text', `{\n  "meta": {\n    "status": true,\n    "timestamp": ${timestamp}\n  },\n  "data": [\n    {\n      "type": " 
     | 
| 
      
 147 
     | 
    
         
            +
                        .should('have.text', `{\n  "meta": {\n    "status": true,\n    "timestamp": ${timestamp}\n  },\n  "data": [\n    {\n      "type": "multiple choice",\n      "reference": "${unique_reference_id_1}"\n    },\n    {\n      "type": "multiple choice",\n      "reference": "${unique_reference_id_2}"\n    }\n  ]\n}\n`);
         
     | 
| 
       148 
148 
     | 
    
         
             
                });
         
     | 
| 
       149 
149 
     | 
    
         
             
            });
         
     | 
    
        package/package.json
    CHANGED
    
    
| 
         @@ -1,56 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import abortEarlySetup from "../../../support/helpers/abortEarly";
         
     | 
| 
       2 
     | 
    
         
            -
            import { liveItemPage } from "../../../pages/components/liveItemPage";
         
     | 
| 
       3 
     | 
    
         
            -
            import utilities from "../../../support/helpers/utilities";
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            describe('Navigate to Live item page and view the page contents', () => {
         
     | 
| 
       6 
     | 
    
         
            -
                before(() => {
         
     | 
| 
       7 
     | 
    
         
            -
                    cy.loginAs('admin');
         
     | 
| 
       8 
     | 
    
         
            -
                });
         
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
                describe('Live item page', () => {
         
     | 
| 
       11 
     | 
    
         
            -
                    abortEarlySetup();
         
     | 
| 
       12 
     | 
    
         
            -
                    before(() => {
         
     | 
| 
       13 
     | 
    
         
            -
                        liveItemPage.steps.navigateToLiveItemPage();
         
     | 
| 
       14 
     | 
    
         
            -
                    });
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
                    it('Live item heading should be displayed', () => {
         
     | 
| 
       17 
     | 
    
         
            -
                        utilities.verifyElementVisibilityState(liveItemPage.liveItemHeaderText(), 'visible');
         
     | 
| 
       18 
     | 
    
         
            -
                        utilities.verifyInnerText(liveItemPage.liveItemHeaderText(), 'Live Item Demo');
         
     | 
| 
       19 
     | 
    
         
            -
                    });
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
                    it('Item id should be displayed', () => {
         
     | 
| 
       22 
     | 
    
         
            -
                        utilities.verifyElementVisibilityState(liveItemPage.liveItemItemId(), 'visible');
         
     | 
| 
       23 
     | 
    
         
            -
                        utilities.verifyInnerText(liveItemPage.liveItemItemId(), 'Item: a61f2-1a16-eff1-421d-ba3defd3e643');
         
     | 
| 
       24 
     | 
    
         
            -
                    });
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
                    it('Student preview should be displayed', () => {
         
     | 
| 
       27 
     | 
    
         
            -
                        utilities.verifyElementVisibilityState(liveItemPage.liveItemStudentPreview(), 'visible');
         
     | 
| 
       28 
     | 
    
         
            -
                        utilities.verifyInnerText(liveItemPage.liveItemStudentPreview(), 'Student Preview');
         
     | 
| 
       29 
     | 
    
         
            -
                    });
         
     | 
| 
       30 
     | 
    
         
            -
                    
         
     | 
| 
       31 
     | 
    
         
            -
                    it('Teacher preview should be displayed', () => {
         
     | 
| 
       32 
     | 
    
         
            -
                        utilities.verifyElementVisibilityState(liveItemPage.liveItemTeacherPreview(), 'visible');
         
     | 
| 
       33 
     | 
    
         
            -
                        utilities.verifyInnerText(liveItemPage.liveItemTeacherPreview(), 'Teacher Preview');
         
     | 
| 
       34 
     | 
    
         
            -
                    });
         
     | 
| 
       35 
     | 
    
         
            -
                });
         
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
                describe.only('Student preview content', () => {
         
     | 
| 
       38 
     | 
    
         
            -
                    abortEarlySetup();
         
     | 
| 
       39 
     | 
    
         
            -
                    before(() => {
         
     | 
| 
       40 
     | 
    
         
            -
                        liveItemPage.steps.navigateToLiveItemPage();
         
     | 
| 
       41 
     | 
    
         
            -
                    });
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                    it('Student preview should be displayed', () => {
         
     | 
| 
       44 
     | 
    
         
            -
                        utilities.verifyElementVisibilityState(liveItemPage.liveItemStudentPreview(), 'visible');
         
     | 
| 
       45 
     | 
    
         
            -
                        utilities.verifyInnerText(liveItemPage.liveItemStudentPreview(), 'Student Preview');
         
     | 
| 
       46 
     | 
    
         
            -
                        cy.wait(2000);
         
     | 
| 
       47 
     | 
    
         
            -
                        liveItemPage.steps.checkOptionForQuestion(0, 1);
         
     | 
| 
       48 
     | 
    
         
            -
                        liveItemPage.steps.checkOptionForQuestion(1, 3);
         
     | 
| 
       49 
     | 
    
         
            -
                        liveItemPage.steps.checkOptionForQuestion(2, [1, 3]);
         
     | 
| 
       50 
     | 
    
         
            -
                        liveItemPage.steps.checkOptionForQuestion(3, 0);
         
     | 
| 
       51 
     | 
    
         
            -
                        liveItemPage.steps.checkOptionForQuestion(4, [0, 2]);
         
     | 
| 
       52 
     | 
    
         
            -
                        liveItemPage.steps.checkOptionForQuestion(5, 0);
         
     | 
| 
       53 
     | 
    
         
            -
                        liveItemPage.steps.checkOptionForQuestion(6, [1, 2, 3]);
         
     | 
| 
       54 
     | 
    
         
            -
                    });
         
     | 
| 
       55 
     | 
    
         
            -
                });
         
     | 
| 
       56 
     | 
    
         
            -
            });
         
     | 
| 
         @@ -1,58 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            import utilities from "../../support/helpers/utilities";
         
     | 
| 
       2 
     | 
    
         
            -
            import { commonComponents } from "./commonComponents";
         
     | 
| 
       3 
     | 
    
         
            -
            const css = Cypress.env('css');
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            const selectors = {
         
     | 
| 
       6 
     | 
    
         
            -
                liveItemHeaderText: () => cy.get('[class*="HeaderTitleComponentstyles__HeaderTitleWrapper"]'),
         
     | 
| 
       7 
     | 
    
         
            -
                liveItemItemId: () => cy.get('[class*="LiveItemDemostyles__ViewInfoWrapper"]'),
         
     | 
| 
       8 
     | 
    
         
            -
                liveItemStudentPreview: () => cy.get('[class*="LiveItemDemostyles__LiveStudentHeader"]'),
         
     | 
| 
       9 
     | 
    
         
            -
                liveItemTeacherPreview: () => cy.get('[class*="LiveTeacherPreviewstyles__LiveTeacherHeader"]'),
         
     | 
| 
       10 
     | 
    
         
            -
                optionsRadioButtonForCorrectAnswer: () => cy.get('.radio-option-wrapper'),
         
     | 
| 
       11 
     | 
    
         
            -
                optionsCheckboxForCorrectAnswer: () => cy.get('.mcq-option-wrapper'),
         
     | 
| 
       12 
     | 
    
         
            -
                selectQuestion: ()=> cy.get('[class*="SinglePageAssessmentQuestionsstyles__QuestionPartContainer"]'),
         
     | 
| 
       13 
     | 
    
         
            -
            };
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            const steps = {
         
     | 
| 
       16 
     | 
    
         
            -
                navigateToLiveItemPage: () => {
         
     | 
| 
       17 
     | 
    
         
            -
                    cy.visit('/item-engine/demo/live-item-demo');
         
     | 
| 
       18 
     | 
    
         
            -
                },
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
                /**
         
     | 
| 
       21 
     | 
    
         
            -
                 * @description Checks the options checkbox in the 'Specify correct answer' section for single selection questions.
         
     | 
| 
       22 
     | 
    
         
            -
                 * @param {number} optionIndex - The index of the option checkbox to be checked.
         
     | 
| 
       23 
     | 
    
         
            -
                 */
         
     | 
| 
       24 
     | 
    
         
            -
                checkRadioOptionInStudentPreview: (optionIndex) => {
         
     | 
| 
       25 
     | 
    
         
            -
                    liveItemPage.optionsRadioButtonForCorrectAnswer()
         
     | 
| 
       26 
     | 
    
         
            -
                        .eq(optionIndex)
         
     | 
| 
       27 
     | 
    
         
            -
                        .click()
         
     | 
| 
       28 
     | 
    
         
            -
                },
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
                checkCheckboxInStudentPreview: (optionIndex) => {
         
     | 
| 
       31 
     | 
    
         
            -
                    liveItemPage.optionsCheckboxForCorrectAnswer()
         
     | 
| 
       32 
     | 
    
         
            -
                        .eq(optionIndex)
         
     | 
| 
       33 
     | 
    
         
            -
                        .click()
         
     | 
| 
       34 
     | 
    
         
            -
                },
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
                checkOptionForQuestion: (questionNumber, optionIndex) => {
         
     | 
| 
       37 
     | 
    
         
            -
                    liveItemPage.selectQuestion()
         
     | 
| 
       38 
     | 
    
         
            -
                    .eq(questionNumber)
         
     | 
| 
       39 
     | 
    
         
            -
                    .within(() => {
         
     | 
| 
       40 
     | 
    
         
            -
                        if (Array.isArray(optionIndex)) {
         
     | 
| 
       41 
     | 
    
         
            -
                            optionIndex.forEach((index) => {
         
     | 
| 
       42 
     | 
    
         
            -
                                liveItemPage.steps.checkCheckboxInStudentPreview(index);
         
     | 
| 
       43 
     | 
    
         
            -
                            });
         
     | 
| 
       44 
     | 
    
         
            -
                        } else {
         
     | 
| 
       45 
     | 
    
         
            -
                            liveItemPage.steps.checkRadioOptionInStudentPreview(optionIndex);
         
     | 
| 
       46 
     | 
    
         
            -
                        }
         
     | 
| 
       47 
     | 
    
         
            -
                    });
         
     | 
| 
       48 
     | 
    
         
            -
                },
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
            };
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
            const tests = {};
         
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
            export const liveItemPage = {
         
     | 
| 
       55 
     | 
    
         
            -
                ...selectors,
         
     | 
| 
       56 
     | 
    
         
            -
                steps,
         
     | 
| 
       57 
     | 
    
         
            -
                tests,
         
     | 
| 
       58 
     | 
    
         
            -
            };
         
     |