itemengine-cypress-automation 1.0.579-IEI-7178-6f40615.0 → 1.0.579-IEI-7193-1dd98c9.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.
Files changed (28) hide show
  1. package/cypress/config-files/ilprod.json +2 -1
  2. package/cypress/config-files/ilqa.json +2 -1
  3. package/cypress/config-files/ilstage.json +2 -1
  4. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +17 -0
  5. package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +18 -0
  6. package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +19 -0
  7. package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +18 -0
  8. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +2 -11
  9. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +2 -11
  10. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -11
  11. package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingWeightsBasic.js +7 -7
  12. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -3
  13. package/cypress/e2e/ILC/SingleSelection/previewContents.smoke.js +18 -0
  14. package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +19 -0
  15. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +17 -0
  16. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +16 -0
  17. package/cypress/e2e/ILC/dataApi/fetchQuestion.js +150 -111
  18. package/cypress/e2e/ILC/dataApi/saveQuestions.js +53 -0
  19. package/cypress/pages/components/ckEditorToolbar.js +20 -0
  20. package/cypress/pages/components/draggableOptionContainer.js +14 -0
  21. package/cypress/pages/components/gridQuestionCommonComponent.js +17 -1
  22. package/cypress/pages/components/optionsWrapperComponent.js +33 -2
  23. package/cypress/pages/components/questionInputFieldComponent.js +18 -2
  24. package/cypress/pages/matchingPage.js +18 -0
  25. package/cypress/pages/numberLineLabelPage.js +1 -0
  26. package/cypress/pages/shortTextResponsePage.js +7 -35
  27. package/cypress/pages/textSelectionPage.js +17 -1
  28. package/package.json +1 -1
@@ -134,30 +134,30 @@ describe('Get Question Data API cases', () => {
134
134
 
135
135
  it('All the questions of the entered item reference should be returned in the response with status code 200', () => {
136
136
  cy.get('pre[class="microlight"]')
137
- .eq(1)
138
- .invoke('text')
139
- .then((text) => {
140
- // Parse the JSON from the DOM
141
- const actualResponse = JSON.parse(text);
142
-
143
- // Extract dynamic values from the parsed object
144
- const { records, timestamp, next_token } = actualResponse.meta;
145
- const test1Data = actualResponse.data.DataApiGetQuestionTest1[0];
146
- const { dt_created, dt_updated, reference: ref1 } = test1Data;
147
- const test2Data = actualResponse.data.DataApiGetQuestionTest2[0];
148
- const { reference: ref2 } = test2Data;
149
- questionRef1 = ref1;
150
- questionRef2 = ref2;
151
-
152
- // First, assert the status code is 200
153
- cy.get('td[class="response-col_status"]')
154
- .eq(0)
155
- .should('have.text', '200');
156
- cy.get('pre[class="microlight"]')
157
- .eq(1)
158
- .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
159
- });
160
- });
137
+ .eq(1)
138
+ .invoke('text')
139
+ .then((text) => {
140
+ // Parse the JSON from the DOM
141
+ const actualResponse = JSON.parse(text);
142
+
143
+ // Extract dynamic values from the parsed object
144
+ const { records, timestamp, next_token } = actualResponse.meta;
145
+ const test1Data = actualResponse.data.DataApiGetQuestionTest1[0];
146
+ const { dt_created, dt_updated, reference: ref1 } = test1Data;
147
+ const test2Data = actualResponse.data.DataApiGetQuestionTest2[0];
148
+ const { reference: ref2 } = test2Data;
149
+ questionRef1 = ref1;
150
+ questionRef2 = ref2;
151
+
152
+ // First, assert the status code is 200
153
+ cy.get('td[class="response-col_status"]')
154
+ .eq(0)
155
+ .should('have.text', '200');
156
+ cy.get('pre[class="microlight"]')
157
+ .eq(1)
158
+ .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
159
+ });
160
+ });
161
161
 
162
162
  it('Entering the request with multiple item references, filtered by type', () => {
163
163
  cy.get('textarea[class="body-param__text"]')
@@ -172,29 +172,29 @@ describe('Get Question Data API cases', () => {
172
172
 
173
173
  it('All the questions of the entered item reference, filtered by the entered type should be returned in the response, with a status code 200', () => {
174
174
  cy.get('pre[class="microlight"]')
175
- .eq(1)
176
- .invoke('text')
177
- .then((text) => {
178
- // Parse the JSON from the DOM
179
- const actualResponse = JSON.parse(text);
180
-
181
- // Extract dynamic values from the parsed object
182
- const { records, timestamp, next_token } = actualResponse.meta;
183
- const test1Data = actualResponse.data.DataApiGetQuestionTest1[0];
184
- const { dt_created, dt_updated, reference: ref1 } = test1Data;
185
- const test2Data = actualResponse.data.DataApiGetQuestionTest2[0];
186
- const { reference: ref2 } = test2Data;
187
- questionRef1 = ref1;
188
- questionRef2 = ref2;
189
-
190
- // First, assert the status code is 200
191
- cy.get('td[class="response-col_status"]')
192
- .eq(0)
193
- .should('have.text', '200');
194
- cy.get('pre[class="microlight"]')
195
- .eq(1)
196
- .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
197
- });
175
+ .eq(1)
176
+ .invoke('text')
177
+ .then((text) => {
178
+ // Parse the JSON from the DOM
179
+ const actualResponse = JSON.parse(text);
180
+
181
+ // Extract dynamic values from the parsed object
182
+ const { records, timestamp, next_token } = actualResponse.meta;
183
+ const test1Data = actualResponse.data.DataApiGetQuestionTest1[0];
184
+ const { dt_created, dt_updated, reference: ref1 } = test1Data;
185
+ const test2Data = actualResponse.data.DataApiGetQuestionTest2[0];
186
+ const { reference: ref2 } = test2Data;
187
+ questionRef1 = ref1;
188
+ questionRef2 = ref2;
189
+
190
+ // First, assert the status code is 200
191
+ cy.get('td[class="response-col_status"]')
192
+ .eq(0)
193
+ .should('have.text', '200');
194
+ cy.get('pre[class="microlight"]')
195
+ .eq(1)
196
+ .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
197
+ });
198
198
  });
199
199
 
200
200
  it('Entering the request with multiple item references, filtered by type and sorted by item name ascending', () => {
@@ -210,29 +210,29 @@ describe('Get Question Data API cases', () => {
210
210
 
211
211
  it('All the questions of the entered item reference, filtered by the entered type should be returned in the response sorted by item name ascending', () => {
212
212
  cy.get('pre[class="microlight"]')
213
- .eq(1)
214
- .invoke('text')
215
- .then((text) => {
216
- // Parse the JSON from the DOM
217
- const actualResponse = JSON.parse(text);
218
-
219
- // Extract dynamic values from the parsed object
220
- const { records, timestamp, next_token } = actualResponse.meta;
221
- const test1Data = actualResponse.data.DataApiGetQuestionTest1[0];
222
- const { dt_created, dt_updated, reference: ref1 } = test1Data;
223
- const test2Data = actualResponse.data.DataApiGetQuestionTest2[0];
224
- const { reference: ref2 } = test2Data;
225
- questionRef1 = ref1;
226
- questionRef2 = ref2;
227
-
228
- // First, assert the status code is 200
229
- cy.get('td[class="response-col_status"]')
230
- .eq(0)
231
- .should('have.text', '200');
232
- cy.get('pre[class="microlight"]')
233
213
  .eq(1)
234
- .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
235
- });
214
+ .invoke('text')
215
+ .then((text) => {
216
+ // Parse the JSON from the DOM
217
+ const actualResponse = JSON.parse(text);
218
+
219
+ // Extract dynamic values from the parsed object
220
+ const { records, timestamp, next_token } = actualResponse.meta;
221
+ const test1Data = actualResponse.data.DataApiGetQuestionTest1[0];
222
+ const { dt_created, dt_updated, reference: ref1 } = test1Data;
223
+ const test2Data = actualResponse.data.DataApiGetQuestionTest2[0];
224
+ const { reference: ref2 } = test2Data;
225
+ questionRef1 = ref1;
226
+ questionRef2 = ref2;
227
+
228
+ // First, assert the status code is 200
229
+ cy.get('td[class="response-col_status"]')
230
+ .eq(0)
231
+ .should('have.text', '200');
232
+ cy.get('pre[class="microlight"]')
233
+ .eq(1)
234
+ .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
235
+ });
236
236
  });
237
237
 
238
238
  it('Entering the request with multiple item references, filtered by type and question reference id', () => {
@@ -257,25 +257,25 @@ describe('Get Question Data API cases', () => {
257
257
 
258
258
  it('All the questions of the entered item reference, filtered by the entered type and question reference should be returned in the response, with a status code 200', () => {
259
259
  cy.get('pre[class="microlight"]')
260
- .eq(1)
261
- .invoke('text')
262
- .then((text) => {
263
- // Parse the JSON from the DOM
264
- const actualResponse = JSON.parse(text);
265
-
266
- // Extract dynamic values from the parsed object
267
- const { records, timestamp, next_token } = actualResponse.meta;
268
- const test1Data = actualResponse.data.DataApiGetQuestionTest1[0];
269
- const { dt_created, dt_updated, reference: ref1 } = test1Data;
270
- const test2Data = actualResponse.data.DataApiGetQuestionTest2[0];
271
- const { reference: ref2 } = test2Data;
272
- cy.get('td[class="response-col_status"]')
273
- .eq(0)
274
- .should('have.text', '200');
275
- cy.get('pre[class="microlight"]')
276
- .eq(1)
277
- .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
278
- });
260
+ .eq(1)
261
+ .invoke('text')
262
+ .then((text) => {
263
+ // Parse the JSON from the DOM
264
+ const actualResponse = JSON.parse(text);
265
+
266
+ // Extract dynamic values from the parsed object
267
+ const { records, timestamp, next_token } = actualResponse.meta;
268
+ const test1Data = actualResponse.data.DataApiGetQuestionTest1[0];
269
+ const { dt_created, dt_updated, reference: ref1 } = test1Data;
270
+ const test2Data = actualResponse.data.DataApiGetQuestionTest2[0];
271
+ const { reference: ref2 } = test2Data;
272
+ cy.get('td[class="response-col_status"]')
273
+ .eq(0)
274
+ .should('have.text', '200');
275
+ cy.get('pre[class="microlight"]')
276
+ .eq(1)
277
+ .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
278
+ });
279
279
  });
280
280
 
281
281
  it('Entering request with an invalid question type', () => {
@@ -349,29 +349,29 @@ describe('Get Question Data API cases', () => {
349
349
 
350
350
  it('The question as per the entered question reference, should be returned in the response, with a status code 200', () => {
351
351
  cy.get('pre[class="microlight"]')
352
- .eq(1)
353
- .invoke('text')
354
- .then((text) => {
355
- // Parse the JSON from the DOM
356
- const actualResponse = JSON.parse(text);
357
-
358
- // Extract dynamic values from the parsed object
359
- const { records, timestamp, next_token } = actualResponse.meta;
360
- const test1Data = actualResponse.data.DataApiGetQuestionTest1[0];
361
- const { dt_created, dt_updated, reference: ref1 } = test1Data;
362
- const test2Data = actualResponse.data.DataApiGetQuestionTest2[0];
363
- const { reference: ref2 } = test2Data;
364
- questionRef1 = ref1;
365
- questionRef2 = ref2;
366
-
367
- // First, assert the status code is 200
368
- cy.get('td[class="response-col_status"]')
369
- .eq(0)
370
- .should('have.text', '200');
371
- cy.get('pre[class="microlight"]')
372
- .eq(1)
373
- .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
374
- });
352
+ .eq(1)
353
+ .invoke('text')
354
+ .then((text) => {
355
+ // Parse the JSON from the DOM
356
+ const actualResponse = JSON.parse(text);
357
+
358
+ // Extract dynamic values from the parsed object
359
+ const { records, timestamp, next_token } = actualResponse.meta;
360
+ const test1Data = actualResponse.data.DataApiGetQuestionTest1[0];
361
+ const { dt_created, dt_updated, reference: ref1 } = test1Data;
362
+ const test2Data = actualResponse.data.DataApiGetQuestionTest2[0];
363
+ const { reference: ref2 } = test2Data;
364
+ questionRef1 = ref1;
365
+ questionRef2 = ref2;
366
+
367
+ // First, assert the status code is 200
368
+ cy.get('td[class="response-col_status"]')
369
+ .eq(0)
370
+ .should('have.text', '200');
371
+ cy.get('pre[class="microlight"]')
372
+ .eq(1)
373
+ .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 2,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"<assessmentItem xmlns=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\\" identifier=\\\"choiceMultiple\\\" title=\\\"Welcome to Biodome\\\" timeDependent=\\\"false\\\"><responseDeclaration identifier=\\\"RESPONSE\\\" cardinality=\\\"multiple\\\" baseType=\\\"identifier\\\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\\\"SCORE\\\" cardinality=\\\"single\\\" baseType=\\\"float\\\"/><itemBody><choiceInteraction responseIdentifier=\\\"RESPONSE\\\" orientation=\\\"horizontal\\\"><prompt></prompt><simpleChoice identifier=\\\"ChoiceA\\\">1</simpleChoice><simpleChoice identifier=\\\"ChoiceB\\\">2</simpleChoice><simpleChoice identifier=\\\"ChoiceC\\\">3</simpleChoice><simpleChoice identifier=\\\"ChoiceD\\\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\\"/></assessmentItem>\"\n }\n ]\n }\n}\n`);
374
+ });
375
375
  });
376
376
 
377
377
  it('Entering request with an invalid combination of item and question reference', () => {
@@ -402,4 +402,43 @@ describe('Get Question Data API cases', () => {
402
402
  .eq(1)
403
403
  .should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": 0,\n \"next_token\": null,\n \"timestamp\": ${timestamp}\n },\n \"data\": []\n}\n`);
404
404
  });
405
+
406
+ it('Entering a request for a text selection question type', () => {
407
+ cy.get('textarea[class="body-param__text"]')
408
+ .clear()
409
+ .fill(`{\n "item_references": [],\n "references": [],\n "types": ["text selection"],\n "limit": 1,\n "sort_field": "created",\n "sort": "desc"\n}\n`);
410
+ cy.get('.execute')
411
+ .click();
412
+ cy.wait(2000);
413
+ cy.get('.loading-container')
414
+ .should('not.exist');
415
+ cy.get('td[class="response-col_status"]')
416
+ .eq(0)
417
+ .should('have.text', '200');
418
+ cy.get('td.response-col_description')
419
+ .find('code.language-json')
420
+ .eq(0)
421
+ .invoke('text')
422
+ .then((text) => {
423
+ const jsonResponse = JSON.parse(text);
424
+ expect(jsonResponse.data[0]).to.include.keys(
425
+ 'reference',
426
+ 'type',
427
+ 'content',
428
+ 'correct_answer',
429
+ 'scoring',
430
+ 'settings',
431
+ );
432
+
433
+ expect(jsonResponse.data[0].settings).to.include.keys(
434
+ 'additional_settings',
435
+ 'print_layout_settings',
436
+ 'student_view_settings',
437
+ 'style_and_layout_customize_settings',
438
+ 'tool_settings',
439
+ );
440
+
441
+ expect(jsonResponse.data[0].type).to.equal('text selection');
442
+ });
443
+ });
405
444
  });
@@ -235,4 +235,57 @@ describe('Set Question Data API cases', () => {
235
235
  .eq(7)
236
236
  .should('have.text',"true");
237
237
  });
238
+
239
+ it('Creating text selection question and resource from save API', () => {
240
+ unique_reference_id_1 = uuid();
241
+ unique_reference_id_2 = uuid();
242
+ cy.visit('/item-engine/data-api/item-bank/save-questions')
243
+ cy.get('.try-out__btn')
244
+ .click();
245
+ cy.get('textarea[class="body-param__text"]')
246
+ .clear()
247
+ .fill(`{"questions":[{"reference":"${unique_reference_id_1}","type":"text selection","content":{"instruction":"test","acknowledgements":"Acknowledgements and references","sampleAnswer":"Sample Answer","question":"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>","highlightedText":"<p><span class='word-span highlight_option highlighted' role='checkbox' aria-checked='true' id='token0'>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </span></p><p><span class='word-span highlight_option' role='checkbox' aria-checked='false' id='token1'>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </span></p><p><span class='word-span highlight_option highlighted' role='checkbox' aria-checked='true' id='token2'>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </span></p>"},"correctAnswer":[{"totalPoints":5,"answers":[{"answer":"optiontoken0","points":5}]},{"totalPoints":10,"answers":[{"answer":"optiontoken2","points":10}]},{"totalPoints":3,"answers":[{"answer":"optiontoken0","points":3}]}],"scoring":{"points":10,"scoringType":"auto-scored","subScoringType":"allOrNothing","penaltyPoints":null,"penaltyPointType":"noPenalty","penaltyPointsForEach":null,"minScoreType":"noMinScore","minScorePoints":null,"isRoundingEnabled":true,"roundingType":"none","isNegativeRounded":true,"scoringGuidance":""},"settings":{"studentViewSettings":{"outerBorder":true,"showAvailableSelections":false,"maxNumAnswers":"noLimit","showMaxSelectionLimit":false,"highlightSelectionType":"multipleSelection"},"styleAndLayoutCustomizeSettings":{"borderStyle":"solid","isFontColorWhite":true,"textSelection":"custom","textSelectionStyle":"filledIn","selectionStyleColors":[{"color":"rgba(82, 0, 255, 1)","isSelected":true},{"color":"rgba(0, 112, 128, 1)","isSelected":false},{"color":"rgba(128, 102, 69, 1)","isSelected":false},{"color":"rgba(102, 102, 102, 1)","isSelected":false},{"color":"rgba(0, 0, 0, 1)","isSelected":false}]},"additionalSettings":{"fontSize":"default","nonAccessible":false},"printLayoutSettings":{"excludeFromPrint":false,"printInstruction":"Question instructions for print"},"toolSettings":[{"resource":"ruler","enabled":true},{"resource":"protractor","enabled":true},{"resource":"readingRuler","enabled":false},{"resource":"simpleCalculator","enabled":false},{"resource":"scientificCalculator","enabled":false},{"resource":"compass","enabled":false}]}}]}`);
248
+ cy.get('.execute')
249
+ .click();
250
+ cy.wait(2000);
251
+ cy.get('.loading-container')
252
+ .should('not.exist');
253
+ cy.visit('/item-engine/data-api/item-bank/save-resources')
254
+ cy.get('.try-out__btn')
255
+ .click();
256
+ cy.get('textarea[class="body-param__text"]')
257
+ .clear()
258
+ .fill(`{\n "resources": [\n {\n "type": 1,\n "data": {\n "type": "Passage",\n "heading": "Passage created via save resources data API",\n "content": "This is content of the passage"\n },\n "reference": "${unique_reference_id_2}"\n }\n ],\n "organisation_id": "${Cypress.env('organisation_id')}",\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}\n`);
259
+ cy.get('.execute')
260
+ .click();
261
+ cy.wait(2000);
262
+ cy.get('.loading-container')
263
+ .should('not.exist');
264
+ });
265
+
266
+ it('Throw validation error while creating text selection question', () => {
267
+ unique_reference_id_1 = uuid();
268
+ cy.visit('/item-engine/data-api/item-bank/save-questions')
269
+ cy.get('.try-out__btn')
270
+ .click();
271
+ cy.get('textarea[class="body-param__text"]')
272
+ .clear()
273
+ .fill(`{"questions":[{"reference":"${unique_reference_id_1}","type":"text selection","content":{"instruction":"test","acknowledgements":"Acknowledgements and references","sampleAnswer":"Sample Answer","question":"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p><p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>","highlightedText":"<p><span class='word-span highlight_option highlighted' role='checkbox' aria-checked='true' id='token0'>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </span></p><p><span class='word-span highlight_option' role='checkbox' aria-checked='false' id='token1'>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </span></p><p><span class='word-span highlight_option highlighted' role='checkbox' aria-checked='true' id='token2'>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </span></p>"},"correctAnswer":[{"totalPoints":5,"answers":[{"answer":"optiontoken0","points":5}]},{"totalPoints":10,"answers":[{"answer":"optiontoken2","points":10}]},{"totalPoints":3,"answers":[{"answer":"optiontoken6","points":3}]}],"scoring":{"points":10,"scoringType":"auto-scored","subScoringType":"allOrNothing","penaltyPoints":null,"penaltyPointType":"noPenalty","penaltyPointsForEach":null,"minScoreType":"noMinScore","minScorePoints":null,"isRoundingEnabled":true,"roundingType":"none","isNegativeRounded":true,"scoringGuidance":""},"settings":{"studentViewSettings":{"outerBorder":true,"showAvailableSelections":false,"maxNumAnswers":"noLimit","showMaxSelectionLimit":false,"highlightSelectionType":"multipleSelection"},"styleAndLayoutCustomizeSettings":{"borderStyle":"solid","isFontColorWhite":true,"textSelection":"custom","textSelectionStyle":"filledIn","selectionStyleColors":[{"color":"rgba(82, 0, 255, 1)","isSelected":true},{"color":"rgba(0, 112, 128, 1)","isSelected":false},{"color":"rgba(128, 102, 69, 1)","isSelected":false},{"color":"rgba(102, 102, 102, 1)","isSelected":false},{"color":"rgba(0, 0, 0, 1)","isSelected":false}]},"additionalSettings":{"fontSize":"default","nonAccessible":false},"printLayoutSettings":{"excludeFromPrint":false,"printInstruction":"Question instructions for print"},"toolSettings":[{"resource":"ruler","enabled":true},{"resource":"protractor","enabled":true},{"resource":"readingRuler","enabled":false},{"resource":"simpleCalculator","enabled":false},{"resource":"scientificCalculator","enabled":false},{"resource":"compass","enabled":false}]}}]}`);
274
+ cy.get('.execute')
275
+ .click();
276
+ cy.wait(2000);
277
+ cy.get('.loading-container')
278
+ .should('not.exist');
279
+ cy.get('td[class="response-col_status"]')
280
+ .eq(0)
281
+ .should('have.text', '200');
282
+ cy.get('td.response-col_description')
283
+ .find('code.language-json')
284
+ .eq(0)
285
+ .invoke('text')
286
+ .then((text) => {
287
+ const jsonResponse = JSON.parse(text);
288
+ expect(jsonResponse.meta.message).to.equal('Invalid answer "optiontoken6" in question 1. Must match one of the token IDs.');
289
+ });
290
+ });
238
291
  });
@@ -1,4 +1,5 @@
1
1
  import constants from "../../fixtures/constants";
2
+ import utilities from "../../support/helpers/utilities";
2
3
 
3
4
  const selectors = {
4
5
  imageIcon: () => cy.get('a[title="Insert Image"]:visible'),
@@ -26,9 +27,28 @@ const selectors = {
26
27
  linkDialogboxURLInputField: () => cy.get('input[class*="cke_dialog_ui_input_text"]:visible').eq(1),
27
28
  sourceIcon: () => cy.get('a[title="Source"]:visible'),
28
29
  sourceTextArea: () => cy.get('textarea.cke_source'),
30
+ expandIconButton: () => cy.get('.expand-image-btn'),
31
+ closeImagePopup: () => cy.get('.close-popup-btn'),
29
32
  }
30
33
 
31
34
  const steps = {
35
+ verifyExpandIconInImage: () => {
36
+ utilities.verifyElementVisibilityState(ckEditorToolbar.expandIconButton(), 'visible');
37
+ },
38
+
39
+ clickExpandIconInImage: () => {
40
+ ckEditorToolbar.expandIconButton()
41
+ .first()
42
+ .scrollIntoView()
43
+ .realClick();
44
+ },
45
+
46
+ closeImagePopup: () => {
47
+ ckEditorToolbar.closeImagePopup()
48
+ .click();
49
+ },
50
+
51
+
32
52
  selectBoldOptionFromCKEditorToolbar: () => {
33
53
  ckEditorToolbar.boldIcon()
34
54
  .click();
@@ -3,6 +3,7 @@ import { commonComponents } from "./commonComponents";
3
3
  import { createQuestionBasePage } from "./createQuestionBasePage";
4
4
  import { draggableOptionsSectionComponent } from "./draggableOptionsSectionComponent";
5
5
  import { optionsWrapperComponent } from "./optionsWrapperComponent";
6
+ import { ckEditorToolbar } from "./ckEditorToolbar";
6
7
  const css = Cypress.env('css');
7
8
  const options = ['option 1', 'option 2'];
8
9
  const threeOptions = ['option 1', 'option 2', 'option 3'];
@@ -453,6 +454,19 @@ const tests = {
453
454
  createQuestionBasePage.steps.switchToPreviewTab();
454
455
  draggableOptionContainer.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(optionsAfterDeleting);
455
456
  });
457
+ it('When user add large image in option, the option container should have expand icon', () => {
458
+ createQuestionBasePage.steps.switchToEditTab();
459
+ optionsWrapperComponent.steps.addOption();
460
+ optionsWrapperComponent.steps.focusInOptionsInputField(2)
461
+ ckEditorToolbar.steps.selectImageOptionFromCKEditorToolbar()
462
+ ckEditorToolbar.steps.addImageToInputField();
463
+ createQuestionBasePage.steps.switchToPreviewTab();
464
+ optionsWrapperComponent.steps.verifyExpandIconInImage();
465
+ optionsWrapperComponent.steps.clickExpandIconInImage();
466
+ utilities.verifyInnerText(optionsWrapperComponent.closeImagePopup(), 'Close');
467
+ optionsWrapperComponent.steps.closeImagePopup();
468
+ optionsWrapperComponent.steps.verifyExpandIconInImage();
469
+ });
456
470
  },
457
471
 
458
472
  verifyDraggableOptionsForGroupedLayoutInSpecifyCorrectAnswerSection: () => {
@@ -158,10 +158,26 @@ const selectors = {
158
158
  colorBlock: () => cy.get('.color-grid-wrapper .color-picker-block'),
159
159
  editColorButton: () => cy.get('button[aria-label="edit color"]'),
160
160
  colorBlockSelectedIcon: () => cy.get('[class*="BtnSelectionWrapper"] svg'),
161
- optionsInputFieldInQuestionPreviewTab: () => cy.get('.cell-content-text')
161
+ optionsInputFieldInQuestionPreviewTab: () => cy.get('.cell-content-text'),
162
+ expandIconButton: () => cy.get('.expand-image-btn'),
163
+ closeImagePopup: () => cy.get('.close-popup-btn')
162
164
  }
163
165
 
164
166
  const steps = {
167
+ verifyExpandIconInImage: () => {
168
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.expandIconButton(), 'visible');
169
+ },
170
+
171
+ clickExpandIconInImage: () => {
172
+ gridQuestionCommonComponent.expandIconButton()
173
+ .click();
174
+ },
175
+
176
+ closeImagePopup: () => {
177
+ gridQuestionCommonComponent.closeImagePopup()
178
+ .click();
179
+ },
180
+
165
181
  /**
166
182
  * Modifies the property of a table cell at the specified row and column.
167
183
  * @param {Object} position - The position of the table cell to modify.