itemengine-cypress-automation 1.0.573-IEI-7080-f70315e.0 → 1.0.573-IEI-7079-ed54ea2.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/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +248 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +247 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +175 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +191 -0
- package/cypress/e2e/ILC/ChartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePointsLocked.js +24 -24
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +177 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +228 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +229 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +229 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +184 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +181 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +37 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js +72 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +19 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +56 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +57 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +15 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +54 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +12 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomizationAllViews.js +156 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +0 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +9 -124
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +8 -123
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +8 -123
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +6 -93
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +2 -23
- package/cypress/e2e/ILC/ImageHighlight/additionalSettings.js +86 -0
- package/cypress/e2e/ILC/ImageHighlight/backgroundImageAndCanvasProperties.js +60 -9
- package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +14 -12
- package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +12 -3
- package/cypress/e2e/ILC/ImageHighlight/minimumScoringPenaltyPointsAndRoundingDropdown.js +65 -2
- package/cypress/e2e/ILC/ImageHighlight/studentViewSettings.js +15 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +1 -168
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +284 -17
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +397 -25
- package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +320 -20
- package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +0 -130
- package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +97 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +164 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +165 -11
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +165 -11
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +24 -14
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +26 -16
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +25 -15
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +24 -13
- 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/cypress/pages/chartsBarPage.js +44 -1
- package/cypress/pages/chartsDotPlotPage.js +99 -1
- package/cypress/pages/chartsLinePage.js +48 -1
- package/cypress/pages/components/additionalSettingsPanel.js +9 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +1 -1
- package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +4 -10
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +14 -37
- package/cypress/pages/components/gradingViewEnumerationComponent.js +5 -0
- package/cypress/pages/components/imageCanvasComponent.js +0 -3
- package/cypress/pages/components/placeholderTextSectionComponent.js +10 -0
- package/cypress/pages/components/showAlternativeAnswersComponent.js +41 -65
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +21 -1
- package/cypress/pages/imageHighlightPage.js +184 -7
- package/cypress/pages/itemPreviewPage.js +1 -0
- package/cypress/pages/multipleSelectionPage.js +32 -0
- package/cypress/pages/singleSelectionPage.js +17 -0
- package/cypress/support/helpers/utilities.js +16 -0
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +47 -53
- package/service.yaml +2 -2
|
@@ -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 selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
|
|
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 selection",\n "question_xml": "Random XML",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
|
|
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 selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
|
|
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 selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}');
|
|
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 selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n },\n {\n "reference": "${unique_reference_id_2}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n {\n "score": 4,\n "values": [\n "ChoiceA",\n "ChoiceE"\n ]\n },\n {\n "score": 4,\n "values": [\n "ChoiceB",\n "ChoiceD"\n ]\n }\n ]\n }\n }\n ]\n}`);
|
|
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 selection",\n "reference": "${unique_reference_id_1}"\n },\n {\n "type": "multiple selection",\n "reference": "${unique_reference_id_2}"\n }\n ]\n}\n`);
|
|
148
148
|
});
|
|
149
149
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import utilities from "../support/helpers/utilities"
|
|
2
|
-
import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, studentViewSettingsLabelComponent, layoutSectionComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
|
|
2
|
+
import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, studentViewSettingsLabelComponent, layoutSectionComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, showAlternativeAnswersComponent } from "./components";
|
|
3
3
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
|
4
4
|
import { createItemPage } from "./createItemPage";
|
|
5
5
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
@@ -20,6 +20,7 @@ const selectors = {
|
|
|
20
20
|
...selectQuestionResourceToolPage,
|
|
21
21
|
...autoScoredScoringSectionMultiResponseType,
|
|
22
22
|
...chartsCommonComponent,
|
|
23
|
+
...showAlternativeAnswersComponent,
|
|
23
24
|
|
|
24
25
|
barDragHandle: () => cy.get('.bar-drag-handle'),
|
|
25
26
|
bar: () => cy.get('.ngie-chart-point'),
|
|
@@ -93,6 +94,7 @@ const steps = {
|
|
|
93
94
|
...selectQuestionResourceToolPage.steps,
|
|
94
95
|
...commonComponents.steps,
|
|
95
96
|
...createItemPage.steps,
|
|
97
|
+
...showAlternativeAnswersComponent.steps,
|
|
96
98
|
|
|
97
99
|
/**
|
|
98
100
|
* @description set the bar height/value in the select chart type section chart
|
|
@@ -726,6 +728,47 @@ const steps = {
|
|
|
726
728
|
});
|
|
727
729
|
},
|
|
728
730
|
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Verify that a bar has the expected value and also has a tick icon in a specific answer section
|
|
734
|
+
* @param {Object} barProperties - The properties of the bar to verify
|
|
735
|
+
* @param {number} barProperties.barIndex - Index of the bar
|
|
736
|
+
* @param {number} barProperties.barValue - Expected value/height of the bar
|
|
737
|
+
* @param {number} barProperties.range - Maximum value of the axis
|
|
738
|
+
* @param {number} barProperties.sectionIndex - Index of the chart section (1 for correct, 2 for alternative)
|
|
739
|
+
* @example verifyBarValueAndTickIconInSpecificSection({ barIndex: 0, barValue: 4, range: 10, sectionIndex: 2 })
|
|
740
|
+
*/
|
|
741
|
+
verifyBarValueAndTickIconInSpecificSection: ({ barIndex, barValue, range, sectionIndex }) => {
|
|
742
|
+
const expectedHeight = barValue / range;
|
|
743
|
+
|
|
744
|
+
chartsBarPage.previewTabChartWrapper()
|
|
745
|
+
.eq(sectionIndex)
|
|
746
|
+
.within(() => {
|
|
747
|
+
utilities.getNthElement(chartsBarPage.bar(), barIndex)
|
|
748
|
+
.should('have.attr', 'height', expectedHeight)
|
|
749
|
+
.within(() => {
|
|
750
|
+
chartsBarPage.tickIconWrapper()
|
|
751
|
+
.should('be.visible')
|
|
752
|
+
.and('have.class', 'correct-option-icon');
|
|
753
|
+
});
|
|
754
|
+
});
|
|
755
|
+
},
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Verify that all bars have the expected values and tick icons in a specific answer section
|
|
759
|
+
* @param {Object[]} barsData - Array of bar properties objects
|
|
760
|
+
* @param {number} barsData[].barIndex - Index of the bar
|
|
761
|
+
* @param {number} barsData[].barValue - Expected value/height of the bar
|
|
762
|
+
* @param {number} barsData[].range - Maximum value of the axis
|
|
763
|
+
* @param {number} sectionIndex - Index of the chart section (1 for correct, 2 for alternative)
|
|
764
|
+
* @example verifyAllBarsValueAndTickIconInSpecificSection(barsData, 2)
|
|
765
|
+
*/
|
|
766
|
+
verifyAllBarsValueAndTickIconInSpecificSection: (barsData, sectionIndex) => {
|
|
767
|
+
barsData.forEach(({ barIndex, barValue, range }) => {
|
|
768
|
+
chartsBarPage.steps.verifyBarValueAndTickIconInSpecificSection({ barIndex, barValue, range, sectionIndex });
|
|
769
|
+
});
|
|
770
|
+
},
|
|
771
|
+
|
|
729
772
|
/**
|
|
730
773
|
* Verify the correct/incorrect icon not exists for bar in preview tab
|
|
731
774
|
* @param {number} barIndex index of the bar
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import utilities from "../support/helpers/utilities"
|
|
2
|
-
import { createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, chartsCommonComponent, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, layoutSectionComponent, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, studentViewSettingsLabelComponent } from "./components";
|
|
2
|
+
import { createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, chartsCommonComponent, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, layoutSectionComponent, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, studentViewSettingsLabelComponent, showAlternativeAnswersComponent } from "./components";
|
|
3
3
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
|
4
4
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
5
5
|
import { createItemPage } from "./createItemPage";
|
|
@@ -96,6 +96,8 @@ const selectors = {
|
|
|
96
96
|
//Correct answer section
|
|
97
97
|
correctAnswersLabel: () => cy.get('[class*="CorrectAnswerHeader"]:visible'),
|
|
98
98
|
dotPlotChartCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__ChartWrapper"]').eq(1),
|
|
99
|
+
//alternate answer section
|
|
100
|
+
dotPlotChartAlternateAnswerSection: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__ChartWrapper"]').eq(2),
|
|
99
101
|
dotColumnCorrectAnswerSection: () => cy.get('.ngie-chart-point'),
|
|
100
102
|
dotIconCorrectAnswerSection: () => cy.get('.dot-icon'),
|
|
101
103
|
numberLineAxisCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .number-line-wrapper').eq(0),
|
|
@@ -119,6 +121,7 @@ const steps = {
|
|
|
119
121
|
...dialogBoxBase.steps,
|
|
120
122
|
...commonComponents.steps,
|
|
121
123
|
...createItemPage.steps,
|
|
124
|
+
...showAlternativeAnswersComponent.steps,
|
|
122
125
|
|
|
123
126
|
//select chart type
|
|
124
127
|
selectDotPlot: () => {
|
|
@@ -1425,6 +1428,22 @@ const steps = {
|
|
|
1425
1428
|
}
|
|
1426
1429
|
},
|
|
1427
1430
|
|
|
1431
|
+
verifyCorrectDotColumnAlternateAnswerSection: ({ point, min, interval, defaultDots = null }) => {
|
|
1432
|
+
const index = Math.round((point - min) / interval);
|
|
1433
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1434
|
+
.within(() => {
|
|
1435
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1436
|
+
.eq(index)
|
|
1437
|
+
.should('have.class', 'correct-bar-indicator')
|
|
1438
|
+
.should('have.css', 'background-color', css.color.correctAnswerLabelBg)
|
|
1439
|
+
.find('.icon-correct')
|
|
1440
|
+
.should('exist');
|
|
1441
|
+
});
|
|
1442
|
+
if (defaultDots === null) {
|
|
1443
|
+
steps.verifyCorrectDotAlternateAnswerSection({ point, min, interval });
|
|
1444
|
+
}
|
|
1445
|
+
},
|
|
1446
|
+
|
|
1428
1447
|
/**
|
|
1429
1448
|
* Verifies that the empty dot column
|
|
1430
1449
|
* @param {object} options - The options object containing point, min, and interval.
|
|
@@ -1454,6 +1473,28 @@ const steps = {
|
|
|
1454
1473
|
});
|
|
1455
1474
|
},
|
|
1456
1475
|
|
|
1476
|
+
verifyEmptyDotColumnAlternateAnswerSection: ({ point, min, interval }) => {
|
|
1477
|
+
const index = Math.round((point - min) / interval);
|
|
1478
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1479
|
+
.within(() => {
|
|
1480
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1481
|
+
.eq(index)
|
|
1482
|
+
.should('have.not.class', 'correct-bar-indicator')
|
|
1483
|
+
.should('have.css', 'background-color', css.color.transparent)
|
|
1484
|
+
.find('.icon-correct')
|
|
1485
|
+
.should('not.exist');
|
|
1486
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1487
|
+
.eq(index)
|
|
1488
|
+
.should('not.have.class', 'inCorrect-bar-indicator')
|
|
1489
|
+
.find('.icon-incorrect')
|
|
1490
|
+
.should('not.exist');
|
|
1491
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1492
|
+
.eq(index)
|
|
1493
|
+
.find('.dot-icon')
|
|
1494
|
+
.should('not.exist');
|
|
1495
|
+
});
|
|
1496
|
+
},
|
|
1497
|
+
|
|
1457
1498
|
/**
|
|
1458
1499
|
* Verifies that the correct dot exists in the specified column
|
|
1459
1500
|
* @param {object} options - The options object containing point, min, and interval.
|
|
@@ -1477,6 +1518,22 @@ const steps = {
|
|
|
1477
1518
|
});
|
|
1478
1519
|
},
|
|
1479
1520
|
|
|
1521
|
+
verifyCorrectDotAlternateAnswerSection: ({ point, min, interval }) => {
|
|
1522
|
+
const index = Math.round((point - min) / interval);
|
|
1523
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1524
|
+
.within(() => {
|
|
1525
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1526
|
+
.eq(index)
|
|
1527
|
+
.within(() => {
|
|
1528
|
+
chartsDotPlotPage.dotIconCorrectAnswerSection()
|
|
1529
|
+
.each((el) => {
|
|
1530
|
+
cy.wrap(el)
|
|
1531
|
+
.should('have.css', 'background-color', css.color.correctAnswer)
|
|
1532
|
+
});
|
|
1533
|
+
});
|
|
1534
|
+
});
|
|
1535
|
+
},
|
|
1536
|
+
|
|
1480
1537
|
/**
|
|
1481
1538
|
* Verifies that the default dot exists in the specified column
|
|
1482
1539
|
* @param {object} options - The options object containing point, min, and interval.
|
|
@@ -1500,6 +1557,22 @@ const steps = {
|
|
|
1500
1557
|
});
|
|
1501
1558
|
},
|
|
1502
1559
|
|
|
1560
|
+
verifyDefaultDotAlternateAnswerSection: ({ point, min, interval }) => {
|
|
1561
|
+
const index = Math.round((point - min) / interval);
|
|
1562
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1563
|
+
.within(() => {
|
|
1564
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1565
|
+
.eq(index)
|
|
1566
|
+
.within(() => {
|
|
1567
|
+
chartsDotPlotPage.dotIconCorrectAnswerSection()
|
|
1568
|
+
.each((el) => {
|
|
1569
|
+
cy.wrap(el)
|
|
1570
|
+
.should('have.css', 'background-color', css.color.activeButtons)
|
|
1571
|
+
});
|
|
1572
|
+
});
|
|
1573
|
+
});
|
|
1574
|
+
},
|
|
1575
|
+
|
|
1503
1576
|
/**
|
|
1504
1577
|
* Verify the dot column is locked in preview tab
|
|
1505
1578
|
* @param {number} index index of the dot column
|
|
@@ -1514,6 +1587,16 @@ const steps = {
|
|
|
1514
1587
|
});
|
|
1515
1588
|
},
|
|
1516
1589
|
|
|
1590
|
+
verifyDotColumnIsLockedInAlternateAnswerSection: ({ point, min, interval }) => {
|
|
1591
|
+
const index = Math.round((point - min) / interval);
|
|
1592
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1593
|
+
.within(() => {
|
|
1594
|
+
utilities.getNthElement(chartsDotPlotPage.dotColumnCorrectAnswerSection(), index)
|
|
1595
|
+
.find('[class*="LockIconWrapper"]')
|
|
1596
|
+
.should('exist');
|
|
1597
|
+
});
|
|
1598
|
+
},
|
|
1599
|
+
|
|
1517
1600
|
/**
|
|
1518
1601
|
* Verifies the expected number of dots
|
|
1519
1602
|
* @param {number} expectedDotCount - The expected number of dots.
|
|
@@ -1594,6 +1677,21 @@ const steps = {
|
|
|
1594
1677
|
steps.verifyDefaultDotCorrectAnswerSection({ point, min, interval });
|
|
1595
1678
|
},
|
|
1596
1679
|
|
|
1680
|
+
verifyLockedDotColumnAlternateAnswerSection: ({ point, min, interval }) => {
|
|
1681
|
+
const index = Math.round((point - min) / interval);
|
|
1682
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1683
|
+
.within(() => {
|
|
1684
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1685
|
+
.eq(index)
|
|
1686
|
+
.should('not.have.class', 'correct-bar-indicator')
|
|
1687
|
+
.and('not.have.class', 'inCorrect-bar-indicator')
|
|
1688
|
+
.and('not.have.css', 'background-color', css.color.correctAnswerLabelBg)
|
|
1689
|
+
.and('not.have.css', 'background-color', css.color.correctAnswerLabelBg)
|
|
1690
|
+
});
|
|
1691
|
+
steps.verifyDotColumnIsLockedInAlternateAnswerSection({ point, min, interval });
|
|
1692
|
+
steps.verifyDefaultDotAlternateAnswerSection({ point, min, interval });
|
|
1693
|
+
},
|
|
1694
|
+
|
|
1597
1695
|
/**
|
|
1598
1696
|
* @param {number} points - The points to be allotted.
|
|
1599
1697
|
* @description - Allots points in the scoring section.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import utilities from "../support/helpers/utilities";
|
|
2
|
-
import { additionalSettingsAccessibilitySectionComponent, additionalSettingsPanel, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, barAndLineChartComponent, chartsCommonComponent, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, layoutSectionComponent } from "./components";
|
|
2
|
+
import { additionalSettingsAccessibilitySectionComponent, additionalSettingsPanel, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, barAndLineChartComponent, chartsCommonComponent, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, layoutSectionComponent, showAlternativeAnswersComponent } from "./components";
|
|
3
3
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
4
4
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
|
5
5
|
import { createItemPage } from "./createItemPage";
|
|
@@ -17,6 +17,7 @@ const selectors = {
|
|
|
17
17
|
...chartsCommonComponent,
|
|
18
18
|
...layoutSectionComponent,
|
|
19
19
|
...autoScoredSpecifyCorrectAnswerSection,
|
|
20
|
+
...showAlternativeAnswersComponent,
|
|
20
21
|
point: () => cy.get('.ngie-chart-point'),
|
|
21
22
|
selectChartTypePoint: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] .ngie-chart-point'),
|
|
22
23
|
pointLockIcon: () => cy.get('[class*="ChartGridstyle__LineLockIconWrapper"]'),
|
|
@@ -54,6 +55,7 @@ const steps = {
|
|
|
54
55
|
...commonComponents.steps,
|
|
55
56
|
...createItemPage.steps,
|
|
56
57
|
...layoutSectionComponent.steps,
|
|
58
|
+
...showAlternativeAnswersComponent.steps,
|
|
57
59
|
|
|
58
60
|
/**
|
|
59
61
|
* @description set the point height/value in the select chart type section chart
|
|
@@ -345,6 +347,23 @@ const steps = {
|
|
|
345
347
|
});
|
|
346
348
|
},
|
|
347
349
|
|
|
350
|
+
/**
|
|
351
|
+
* Verify the point value in correct answer section tab
|
|
352
|
+
* @param {Object} pointProperties - The properties of the point
|
|
353
|
+
* @param {number} pointProperties.pointIndex index of the point
|
|
354
|
+
* @param {number} pointProperties.value Height of the point as per the axis
|
|
355
|
+
* @param {number} pointProperties.range Maximum value of the axis on which point value is determined
|
|
356
|
+
*/
|
|
357
|
+
verifyPointValueInAlternativeAnswerSection: ({ pointIndex, value, range }) => {
|
|
358
|
+
let pointValue = value / range
|
|
359
|
+
chartsLinePage.previewTabChartWrapper()
|
|
360
|
+
.eq(2)
|
|
361
|
+
.within(() => {
|
|
362
|
+
utilities.getNthElement(chartsLinePage.point(), pointIndex)
|
|
363
|
+
.should('have.attr', 'height', pointValue);
|
|
364
|
+
});
|
|
365
|
+
},
|
|
366
|
+
|
|
348
367
|
/**
|
|
349
368
|
* Verify the correct/incorrect icon of point in correct answer section
|
|
350
369
|
* @param {number} pointIndex index of the point
|
|
@@ -379,6 +398,17 @@ const steps = {
|
|
|
379
398
|
});
|
|
380
399
|
},
|
|
381
400
|
|
|
401
|
+
verifyPointCorrectIncorrectIconNotExistsInAlternativeAnswerSection: (pointIndex) => {
|
|
402
|
+
chartsLinePage.previewTabChartWrapper()
|
|
403
|
+
.eq(2)
|
|
404
|
+
.within(() => {
|
|
405
|
+
utilities.getNthElement(chartsLinePage.point(), pointIndex)
|
|
406
|
+
.within(() => {
|
|
407
|
+
utilities.verifyElementVisibilityState(chartsLinePage.tickIconWrapper(), 'notExist');
|
|
408
|
+
});
|
|
409
|
+
});
|
|
410
|
+
},
|
|
411
|
+
|
|
382
412
|
/**
|
|
383
413
|
* Verify the correct/incorrect icon of point in preview tab
|
|
384
414
|
* @param {number} pointIndex index of the point
|
|
@@ -431,6 +461,12 @@ const steps = {
|
|
|
431
461
|
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInCorrectAnswerSection(pointIndex);
|
|
432
462
|
},
|
|
433
463
|
|
|
464
|
+
verifyLockedPointInAlternativeAnswerSection: ({ pointIndex, value, range }) => {
|
|
465
|
+
chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: pointIndex, value: value, range: range });
|
|
466
|
+
chartsLinePage.steps.verifyPointIsLockedInAlternativeAnswerSection(pointIndex);
|
|
467
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInAlternativeAnswerSection(pointIndex);
|
|
468
|
+
},
|
|
469
|
+
|
|
434
470
|
/**
|
|
435
471
|
* Verify the point is locked in correct answer section
|
|
436
472
|
* @param {number} pointIndex index of the point
|
|
@@ -446,6 +482,17 @@ const steps = {
|
|
|
446
482
|
});
|
|
447
483
|
},
|
|
448
484
|
|
|
485
|
+
verifyPointIsLockedInAlternativeAnswerSection: (pointIndex) => {
|
|
486
|
+
chartsLinePage.previewTabChartWrapper()
|
|
487
|
+
.eq(2)
|
|
488
|
+
.within(() => {
|
|
489
|
+
utilities.getNthElement(chartsLinePage.point(), pointIndex)
|
|
490
|
+
.within(() => {
|
|
491
|
+
utilities.verifyElementVisibilityState(chartsLinePage.pointLockIcon(), 'visible');
|
|
492
|
+
});
|
|
493
|
+
});
|
|
494
|
+
},
|
|
495
|
+
|
|
449
496
|
|
|
450
497
|
/**
|
|
451
498
|
* verify the displayed penalty points for each incorrect point
|
|
@@ -39,6 +39,15 @@ const steps = {
|
|
|
39
39
|
.should('have.attr', 'aria-expanded', 'true');
|
|
40
40
|
},
|
|
41
41
|
|
|
42
|
+
collapsedAdditionalSettings: () => {
|
|
43
|
+
additionalSettingsPanel.additionalSettingsPanel()
|
|
44
|
+
.click();
|
|
45
|
+
cy.log('Need this wait in order for the font size dropdown to render properly');
|
|
46
|
+
cy.wait(2000);
|
|
47
|
+
additionalSettingsPanel.additionalSettingsPanel()
|
|
48
|
+
.should('have.attr', 'aria-expanded', 'false');
|
|
49
|
+
},
|
|
50
|
+
|
|
42
51
|
//V3 - Need to be updated in all files
|
|
43
52
|
selectFontSizeOptionFromFontSizeDropdown: (dropdownOption) => {
|
|
44
53
|
additionalSettingsPanel.steps.expandFontSizeDropdown();
|
|
@@ -147,7 +147,7 @@ const tests = {
|
|
|
147
147
|
.trigger('mouseover');
|
|
148
148
|
utilities.verifyCSS(commonComponents.tooltipText(), {
|
|
149
149
|
'color': css.color.whiteText,
|
|
150
|
-
'font-size': css.fontSize.
|
|
150
|
+
'font-size': css.fontSize.small,
|
|
151
151
|
'font-weight': css.fontWeight.regular,
|
|
152
152
|
'background-color': css.color.tooltipBg
|
|
153
153
|
});
|
|
@@ -23,7 +23,7 @@ const selectors = {
|
|
|
23
23
|
opacityLabel: () => cy.get('[class*="ColorPickerstyles__SliderWrapper"]'),
|
|
24
24
|
//Need to update when feedback scale is available
|
|
25
25
|
opacitySlider: () => cy.get('[class*="ColorPickerstyles__SliderWrapper"] .color-slider'),
|
|
26
|
-
opacityInputField: () => cy.get('.opacity-wrapper [aria-label="Opacity"]'),
|
|
26
|
+
opacityInputField: () => cy.get('.opacity-wrapper [aria-label="Opacity"],.opacity-wrapper input[type*="Text"]'),
|
|
27
27
|
recommendedColorsLabel: () => cy.get('.color-picker-footer-wrapper'),
|
|
28
28
|
recommendedColorBlock: () => cy.get('[class*="ColorPickerstyles__ColorBlockWrapper"] .color-picker-block'),
|
|
29
29
|
recommendedColorBlockSelectedIcon: () => cy.get('.selected-button-icon'),
|