itemengine-cypress-automation 1.0.580-IEI-7178-01aa1cc.0 → 1.0.580-ITEM-1388-9c911b1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +2 -11
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +2 -11
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -11
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingWeightsBasic.js +7 -7
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/dataApi/fetchItems.js +16 -0
- package/cypress/e2e/ILC/dataApi/fetchQuestion.js +17 -7
- package/cypress/e2e/ILC/dataApi/fetchResourcesAndTools.js +7 -1
- package/cypress/e2e/ILC/dataApi/saveItems.js +16 -6
- package/cypress/e2e/ILC/dataApi/saveQuestions.js +3 -41
- package/cypress/e2e/ILC/dataApi/saveQuestionsMCQAlternateAnswers.js +14 -15
- package/cypress/e2e/ILC/dataApi/saveResourcesAndTools.js +0 -11
- package/cypress/pages/shortTextResponsePage.js +7 -35
- package/cypress/support/helpers/createItem.js +44 -13
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
const css = Cypress.env('css');
|
|
4
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
5
4
|
|
|
6
5
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
7
6
|
before(() => {
|
|
@@ -25,11 +24,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
25
24
|
it('When the user selects \'Grading\' view without attempting the question, correct/incorrect icons should not be displayed and answer input field should have incorrect answer border and correct answer section should be displayed below response input field', () => {
|
|
26
25
|
shortTextResponsePage.steps.switchToGradingView();
|
|
27
26
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
28
|
-
|
|
29
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Fossil fuel combustion', 20, 'Buildings', 10);
|
|
30
|
-
} else {
|
|
31
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
32
|
-
}
|
|
27
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
33
28
|
shortTextResponsePage.steps.switchToStudentView();
|
|
34
29
|
});
|
|
35
30
|
|
|
@@ -61,11 +56,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
61
56
|
shortTextResponsePage.steps.switchToGradingView();
|
|
62
57
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
63
58
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
64
|
-
|
|
65
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Fossil fuel combustion', 20, 'Buildings', 10);
|
|
66
|
-
} else {
|
|
67
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
68
|
-
}
|
|
59
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
69
60
|
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
70
61
|
});
|
|
71
62
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
const css = Cypress.env('css');
|
|
4
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
5
4
|
|
|
6
5
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
7
6
|
before(() => {
|
|
@@ -25,11 +24,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
25
24
|
it('When the user switches to \'Grading\' view without attempting the question, then incorrect border and correct answer section should be displayed', () => {
|
|
26
25
|
shortTextResponsePage.steps.switchToGradingView();
|
|
27
26
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
28
|
-
|
|
29
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 20);
|
|
30
|
-
} else {
|
|
31
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
32
|
-
}
|
|
27
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
33
28
|
shortTextResponsePage.steps.switchToStudentView();
|
|
34
29
|
});
|
|
35
30
|
|
|
@@ -61,11 +56,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
61
56
|
shortTextResponsePage.steps.switchToGradingView();
|
|
62
57
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
63
58
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
64
|
-
|
|
65
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 20);
|
|
66
|
-
} else {
|
|
67
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
68
|
-
}
|
|
59
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
69
60
|
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
70
61
|
});
|
|
71
62
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
2
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
3
|
const css = Cypress.env('css');
|
|
4
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
5
4
|
|
|
6
5
|
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
7
6
|
before(() => {
|
|
@@ -26,11 +25,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
26
25
|
shortTextResponsePage.steps.switchToGradingView();
|
|
27
26
|
shortTextResponsePage.steps.verifyCorrectIncorrectIconNotVisibleGradingView();
|
|
28
27
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
29
|
-
|
|
30
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 10);
|
|
31
|
-
} else {
|
|
32
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
33
|
-
}
|
|
28
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
34
29
|
shortTextResponsePage.steps.switchToStudentView();
|
|
35
30
|
});
|
|
36
31
|
|
|
@@ -66,11 +61,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
66
61
|
shortTextResponsePage.steps.switchToGradingView();
|
|
67
62
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
68
63
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
69
|
-
|
|
70
|
-
shortTextResponsePage.steps.verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper('Buildings', 20, 'Fossil fuel combustion', 10);
|
|
71
|
-
} else {
|
|
72
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
73
|
-
}
|
|
64
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
74
65
|
});
|
|
75
66
|
|
|
76
67
|
shortTextResponsePage.tests.verifyIncorrectAnswerLabelAndBorderCSSAndA11y('short text response');
|
|
@@ -21,7 +21,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
21
21
|
it('When the user switches to \'Grading\' view without attempting the question, then incorrect border and correct answer section should not be displayed', () => {
|
|
22
22
|
shortTextResponsePage.steps.switchToGradingView();
|
|
23
23
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
24
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings'
|
|
24
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
25
25
|
shortTextResponsePage.steps.switchToStudentView();
|
|
26
26
|
});
|
|
27
27
|
|
|
@@ -42,7 +42,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
42
42
|
shortTextResponsePage.steps.switchToGradingView();
|
|
43
43
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
44
44
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
45
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings'
|
|
45
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
46
46
|
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
47
47
|
});
|
|
48
48
|
});
|
|
@@ -67,7 +67,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
67
67
|
shortTextResponsePage.steps.switchToGradingView();
|
|
68
68
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
69
69
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
70
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings'
|
|
70
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
71
71
|
|
|
72
72
|
});
|
|
73
73
|
|
|
@@ -80,7 +80,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
80
80
|
shortTextResponsePage.steps.switchToGradingView();
|
|
81
81
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
82
82
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
83
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings'
|
|
83
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
it('When the user attempts the question correctly, then the user should be awarded 20 points and on switching to \'Grading\' view, correct icon should be displayed beside response input field, correct answer border should be displayed in question preview', () => {
|
|
@@ -112,7 +112,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
112
112
|
shortTextResponsePage.steps.verifyPreviewScore(5, 20);
|
|
113
113
|
shortTextResponsePage.steps.switchToGradingView();
|
|
114
114
|
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
115
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings'
|
|
115
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
it('When the user sets minimum scoring to \'Award minimum score\', allots minimum points and attempts the question incorrectly, then the user should be awarded with minimum points', () => {
|
|
@@ -121,7 +121,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
121
121
|
shortTextResponsePage.steps.switchToGradingView();
|
|
122
122
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
123
123
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
124
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings'
|
|
124
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
it('When the user sets minimum scoring to \'Award minimum score\', allots minimum points and attempts the question correctly, then the user should be awarded with 20 points', () => {
|
|
@@ -149,7 +149,7 @@ describe('Create item page - Short text response: All or nothing with alternativ
|
|
|
149
149
|
shortTextResponsePage.steps.switchToGradingView();
|
|
150
150
|
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
151
151
|
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
152
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings'
|
|
152
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
it('When the user sets minimum scoring to \'Award minimum score only if attempted\', allots minimum points and attempts the question correctly, then the user should be awarded with 20 points', () => {
|
|
@@ -7,7 +7,6 @@ let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
|
|
7
7
|
const views = utilities.getViews(correctAnswerViews);
|
|
8
8
|
const css = Cypress.env('css');
|
|
9
9
|
var itemReferenceID = "";
|
|
10
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
11
10
|
|
|
12
11
|
describe('Create item page - Short text response: All or nothing', () => {
|
|
13
12
|
before(() => {
|
|
@@ -111,7 +110,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
111
110
|
}
|
|
112
111
|
//Need to remove comment once https://redmine.zeuslearning.com/issues/576511 is resolved
|
|
113
112
|
// shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
114
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings'
|
|
113
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
115
114
|
});
|
|
116
115
|
|
|
117
116
|
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides incorrect response, incorrect answer border around response field and correct answer should be displayed in the question preview', () => {
|
|
@@ -121,7 +120,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
121
120
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
122
121
|
studentViewPage.steps.clickOnGoToGradingViewButton()
|
|
123
122
|
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
124
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings'
|
|
123
|
+
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
125
124
|
}
|
|
126
125
|
if (view === 'Question preview' || view === 'Item preview') {
|
|
127
126
|
shortTextResponsePage.steps.switchToGradingView();
|
|
@@ -282,6 +281,7 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
|
282
281
|
shortTextResponsePage.steps.checkNonScoredScoringLabel();
|
|
283
282
|
shortTextResponsePage.steps.switchToGradingView();
|
|
284
283
|
};
|
|
284
|
+
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'Correct answer:');
|
|
285
285
|
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Urbanization');
|
|
286
286
|
});
|
|
287
287
|
|
|
@@ -8,6 +8,14 @@ describe('Get Item Data API cases', () => {
|
|
|
8
8
|
var dt_updated;
|
|
9
9
|
before(() => {
|
|
10
10
|
cy.loginAs('admin');
|
|
11
|
+
cy.deleteItem('dataAPIFetchItem123');
|
|
12
|
+
cy.wait(5000);
|
|
13
|
+
cy.deleteItem('dataAPIFetchItem234');
|
|
14
|
+
cy.wait(5000);
|
|
15
|
+
cy.deleteThinkSphereItem('dataAPIFetchThinkSphereItem123');
|
|
16
|
+
cy.wait(5000);
|
|
17
|
+
cy.deleteThinkSphereItem('dataAPIFetchThinkSphereItem234');
|
|
18
|
+
cy.wait(5000);
|
|
11
19
|
cy.createItem('dataAPIFetchItem123');
|
|
12
20
|
cy.wait(5000);
|
|
13
21
|
cy.createItem('dataAPIFetchItem234');
|
|
@@ -15,13 +23,21 @@ describe('Get Item Data API cases', () => {
|
|
|
15
23
|
cy.createThinkSphereItem('dataAPIFetchThinkSphereItem123');
|
|
16
24
|
cy.wait(5000);
|
|
17
25
|
cy.createThinkSphereItem('dataAPIFetchThinkSphereItem234');
|
|
26
|
+
cy.wait(5000);
|
|
18
27
|
cy.visit(`${Cypress.env('itemEngineHomePage')}`);
|
|
19
28
|
});
|
|
20
29
|
|
|
21
30
|
after(() => {
|
|
22
31
|
cy.deleteItem('dataAPIFetchItem123');
|
|
32
|
+
cy.wait(5000);
|
|
33
|
+
cy.deleteItem('dataAPIFetchItem234');
|
|
34
|
+
cy.wait(5000);
|
|
23
35
|
cy.deleteThinkSphereItem('dataAPIFetchThinkSphereItem123');
|
|
36
|
+
cy.wait(5000);
|
|
37
|
+
cy.deleteThinkSphereItem('dataAPIFetchThinkSphereItem234');
|
|
38
|
+
cy.wait(5000);
|
|
24
39
|
cy.deleteItems();
|
|
40
|
+
cy.wait(5000);
|
|
25
41
|
cy.logout();
|
|
26
42
|
});
|
|
27
43
|
|
|
@@ -7,14 +7,24 @@ describe('Get Question Data API cases', () => {
|
|
|
7
7
|
|
|
8
8
|
before(() => {
|
|
9
9
|
cy.loginAs('admin');
|
|
10
|
+
cy.deleteItem('DataApiGetQuestionTest1');
|
|
11
|
+
cy.wait(5000);
|
|
12
|
+
cy.deleteItem('DataApiGetQuestionTest2');
|
|
13
|
+
cy.wait(5000);
|
|
10
14
|
cy.createItem('DataApiGetQuestionTest1');
|
|
11
|
-
cy.wait(5000)
|
|
15
|
+
cy.wait(5000);
|
|
12
16
|
cy.createItem('DataApiGetQuestionTest2');
|
|
17
|
+
cy.wait(5000);
|
|
13
18
|
cy.visit(`${Cypress.env('itemEngineHomePage')}`);
|
|
14
19
|
});
|
|
15
20
|
|
|
16
21
|
after(() => {
|
|
22
|
+
cy.deleteItem('DataApiGetQuestionTest1');
|
|
23
|
+
cy.wait(5000);
|
|
24
|
+
cy.deleteItem('DataApiGetQuestionTest2');
|
|
25
|
+
cy.wait(5000);
|
|
17
26
|
cy.deleteItems();
|
|
27
|
+
cy.wait(5000);
|
|
18
28
|
cy.logout();
|
|
19
29
|
});
|
|
20
30
|
|
|
@@ -155,7 +165,7 @@ describe('Get Question Data API cases', () => {
|
|
|
155
165
|
.should('have.text', '200');
|
|
156
166
|
cy.get('pre[class="microlight"]')
|
|
157
167
|
.eq(1)
|
|
158
|
-
.should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\":
|
|
168
|
+
.should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ]\n }\n}\n`);
|
|
159
169
|
});
|
|
160
170
|
});
|
|
161
171
|
|
|
@@ -193,7 +203,7 @@ describe('Get Question Data API cases', () => {
|
|
|
193
203
|
.should('have.text', '200');
|
|
194
204
|
cy.get('pre[class="microlight"]')
|
|
195
205
|
.eq(1)
|
|
196
|
-
.should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\":
|
|
206
|
+
.should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ]\n }\n}\n`);
|
|
197
207
|
});
|
|
198
208
|
});
|
|
199
209
|
|
|
@@ -231,7 +241,7 @@ describe('Get Question Data API cases', () => {
|
|
|
231
241
|
.should('have.text', '200');
|
|
232
242
|
cy.get('pre[class="microlight"]')
|
|
233
243
|
.eq(1)
|
|
234
|
-
.should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\":
|
|
244
|
+
.should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ]\n }\n}\n`);
|
|
235
245
|
});
|
|
236
246
|
});
|
|
237
247
|
|
|
@@ -274,7 +284,7 @@ describe('Get Question Data API cases', () => {
|
|
|
274
284
|
.should('have.text', '200');
|
|
275
285
|
cy.get('pre[class="microlight"]')
|
|
276
286
|
.eq(1)
|
|
277
|
-
.should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\":
|
|
287
|
+
.should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ]\n }\n}\n`);
|
|
278
288
|
});
|
|
279
289
|
});
|
|
280
290
|
|
|
@@ -370,14 +380,14 @@ describe('Get Question Data API cases', () => {
|
|
|
370
380
|
.should('have.text', '200');
|
|
371
381
|
cy.get('pre[class="microlight"]')
|
|
372
382
|
.eq(1)
|
|
373
|
-
.should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\":
|
|
383
|
+
.should('have.text', `{\n \"meta\": {\n \"status\": true,\n \"records\": ${records},\n \"next_token\": ${next_token ? `[\n ${next_token[0]},\n \"${next_token[1]}\"\n ]` : null},\n \"timestamp\": ${timestamp}\n },\n \"data\": {\n \"DataApiGetQuestionTest1\": [\n {\n \"reference\": \"${ref1}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ],\n \"DataApiGetQuestionTest2\": [\n {\n \"reference\": \"${ref2}\",\n \"type\": \"multiple selection\",\n \"dt_created\": \"${dt_created}\",\n \"dt_updated\": \"${dt_updated}\",\n \"scoring_type\": \"Auto-scored\",\n \"points\": 10,\n \"penalty_points\": null,\n \"min_score_if_attempted\": null,\n \"min_score_type\": 1,\n \"penalty_point_type\": 1,\n \"is_auto_penalty_setting\": false,\n \"is_negative_rounded\": true,\n \"specific_penalty_type\": 1,\n \"penalty_points_for_each\": null,\n \"scoring_guidance\": \"\",\n \"sample_response\": \"\",\n \"data\": \"\",\n \"content\": {\n \"instruction\": \"test\",\n \"acknowledgements\": \"\",\n \"sample_answer\": \"\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"4\",\n \"locked\": false\n }\n ],\n \"correct_answer\": [\n {\n \"total_points\": 10,\n \"answers\": [\n {\n \"answer\": \"ChoiceA\",\n \"points\": 10,\n \"is_case_sensitive\": false\n }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoring_type\": \"auto-scored\",\n \"sub_scoring_type\": \"allOrNothing\",\n \"penalty_points\": null,\n \"penalty_point_type\": \"noPenalty\",\n \"penalty_points_for_each\": null,\n \"min_score_type\": \"noMinScore\",\n \"min_score_points\": null,\n \"is_rounding_enabled\": true,\n \"rounding_type\": \"none\",\n \"is_negative_rounded\": true,\n \"scoring_guidance\": \"\"\n },\n \"settings\": {\n \"student_view_settings\": {\n \"shuffle_option\": false,\n \"position_lock\": false,\n \"allow_setting_min_or_max_num_of_answers\": false,\n \"min_num_answers\": null,\n \"max_num_answers\": null,\n \"allow_check_answer\": false,\n \"max_attempts_to_check_answer\": 0\n },\n \"additional_settings\": {\n \"orientation\": \"horizontal\",\n \"multiple_columns\": false,\n \"num_of_option_columns\": 1,\n \"font_size\": \"default\",\n \"alignment\": \"left\",\n \"multiple_selection\": true,\n \"option_style_type\": \"blockWithCheckBox\",\n \"option_numeration\": \"default\",\n \"non_accessible\": false\n },\n \"print_layout_settings\": {\n \"exclude_from_print\": false,\n \"print_instruction\": \"\"\n },\n \"tool_settings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": false\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": false\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n }\n ]\n }\n}\n`);
|
|
374
384
|
});
|
|
375
385
|
});
|
|
376
386
|
|
|
377
387
|
it('Entering request with an invalid combination of item and question reference', () => {
|
|
378
388
|
cy.get('textarea[class="body-param__text"]')
|
|
379
389
|
.clear()
|
|
380
|
-
.fill(`{ \n "item_references": [\n "DataApiGetQuestionTest2"], \n "references": ["${questionAndResourceReferenceIds[0][0]}"], \n "types": [], \n "limit": 50, \n "page": 0, \n "sort_field": "created", \n "sort": "asc"\n }\n`);
|
|
390
|
+
.fill(`{ \n "item_references": [\n "DataApiGetQuestionTest2"], \n "references": ["${questionAndResourceReferenceIds[0]?.[0] || '1234567-1234-1234-1234-123456789012'}"], \n "types": [], \n "limit": 50, \n "page": 0, \n "sort_field": "created", \n "sort": "asc"\n }\n`);
|
|
381
391
|
cy.get('.execute')
|
|
382
392
|
.click();
|
|
383
393
|
cy.wait(2000);
|
|
@@ -4,9 +4,14 @@ describe('Fetch Resources and tools Data API cases', () => {
|
|
|
4
4
|
var timestamp;
|
|
5
5
|
before(() => {
|
|
6
6
|
cy.loginAs('admin');
|
|
7
|
+
cy.deleteItem('DataApiGetResourcesTest1');
|
|
8
|
+
cy.wait(5000);
|
|
9
|
+
cy.deleteItem('DataApiGetResourcesTest2');
|
|
10
|
+
cy.wait(5000);
|
|
7
11
|
cy.createItem('DataApiGetResourcesTest1');
|
|
8
|
-
cy.wait(5000)
|
|
12
|
+
cy.wait(5000);
|
|
9
13
|
cy.createItem('DataApiGetResourcesTest2');
|
|
14
|
+
cy.wait(5000);
|
|
10
15
|
cy.visit(`${Cypress.env('itemEngineHomePage')}`);
|
|
11
16
|
});
|
|
12
17
|
|
|
@@ -15,6 +20,7 @@ describe('Fetch Resources and tools Data API cases', () => {
|
|
|
15
20
|
return false
|
|
16
21
|
});
|
|
17
22
|
cy.deleteItems();
|
|
23
|
+
cy.wait(5000);
|
|
18
24
|
cy.logout();
|
|
19
25
|
});
|
|
20
26
|
|
|
@@ -6,23 +6,36 @@ var dataApiQuestionAndResourceIds = [];
|
|
|
6
6
|
for (var i = 0; i < 2; i++) {
|
|
7
7
|
dataApiQuestionAndResourceIds.push(uuid());
|
|
8
8
|
};
|
|
9
|
-
//93f228f9-d4f7-8c36-effd-cd6b6e87b329
|
|
10
|
-
//36e2967e-4260-a739-97e4-33ece5b39b3b
|
|
11
9
|
var timestamp
|
|
12
10
|
|
|
13
11
|
|
|
14
12
|
describe('Save Item Data API cases', () => {
|
|
15
13
|
before(() => {
|
|
16
14
|
cy.loginAs('admin');
|
|
15
|
+
cy.deleteItem('DataAPITest11');
|
|
16
|
+
cy.wait(5000);
|
|
17
|
+
cy.deleteItem('DataAPITest22');
|
|
18
|
+
cy.wait(5000);
|
|
19
|
+
cy.deleteItem('ItemCreatedWithSetItemDataAPI');
|
|
20
|
+
cy.wait(5000);
|
|
17
21
|
cy.createItem('DataAPITest11');
|
|
22
|
+
cy.wait(5000);
|
|
18
23
|
cy.createItem('DataAPITest22');
|
|
24
|
+
cy.wait(5000);
|
|
19
25
|
cy.createItem('ItemCreatedWithSetItemDataAPI');
|
|
26
|
+
cy.wait(5000);
|
|
20
27
|
cy.visit(`${Cypress.env('itemEngineHomePage')}`);
|
|
21
28
|
});
|
|
22
29
|
|
|
23
30
|
after(() => {
|
|
31
|
+
cy.deleteItem('DataAPITest11');
|
|
32
|
+
cy.wait(5000);
|
|
33
|
+
cy.deleteItem('DataAPITest22');
|
|
34
|
+
cy.wait(5000);
|
|
24
35
|
cy.deleteItem('ItemCreatedWithSetItemDataAPI');
|
|
36
|
+
cy.wait(5000);
|
|
25
37
|
cy.deleteItems();
|
|
38
|
+
cy.wait(5000);
|
|
26
39
|
cy.logout();
|
|
27
40
|
});
|
|
28
41
|
|
|
@@ -32,7 +45,7 @@ describe('Save Item Data API cases', () => {
|
|
|
32
45
|
.click();
|
|
33
46
|
cy.get('textarea[class="body-param__text"]')
|
|
34
47
|
.clear()
|
|
35
|
-
.fill(`{"questions":[{"reference":'${dataApiQuestionAndResourceIds[0]}',"instruction":"question instructions","points":20,"is_auto_scored":false,"type":"essay response","question_xml":"
|
|
48
|
+
.fill(`{"questions":[{"reference":'${dataApiQuestionAndResourceIds[0]}',"instruction":"question instructions","points":20,"is_auto_scored":false,"type":"essay response","question_xml":"","scoring_type_id":2,"teacher_guideline":"guidelines for this questions if any","penalty_points":"0","min_score_if_attempted":"0","min_score_type":1,"penalty_point_type":1,"is_auto_penalty_setting":false,"is_negative_rounded":true,"specific_penalty_type":1,"penalty_points_for_each":"0"}]}'`);
|
|
36
49
|
cy.get('.execute')
|
|
37
50
|
.click();
|
|
38
51
|
cy.wait(2000);
|
|
@@ -129,9 +142,6 @@ describe('Save Item Data API cases', () => {
|
|
|
129
142
|
.find('span')
|
|
130
143
|
.eq(0)
|
|
131
144
|
.should('have.text', '<!DOCTYPE ');
|
|
132
|
-
// cy.get('pre[class="microlight"]')
|
|
133
|
-
// .eq(0)
|
|
134
|
-
// .should('have.text', '{\n "message": "\\"items[0].reference\\" is not allowed to be empty",\n "success": false\n}\n');
|
|
135
145
|
});
|
|
136
146
|
|
|
137
147
|
it('Entering request with a question/resource reference id which does not exist', () => {
|
|
@@ -94,7 +94,7 @@ describe('Set Question Data API cases', () => {
|
|
|
94
94
|
.click();
|
|
95
95
|
cy.get('textarea[class="body-param__text"]')
|
|
96
96
|
.clear()
|
|
97
|
-
.fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "
|
|
97
|
+
.fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ],\n "meta": {\n "user": {\n "id": "dfbb6366-d88d-416d-9d9c-7ee6420817b3",\n "first_name": "fname",\n "last_name": "lname",\n "email": "user@demo.com"\n }\n }\n}`);
|
|
98
98
|
cy.get('.execute')
|
|
99
99
|
.click();
|
|
100
100
|
cy.wait(2000);
|
|
@@ -113,34 +113,6 @@ describe('Set Question Data API cases', () => {
|
|
|
113
113
|
.should('have.text', "\"\\\"questions[0].reference\\\" is required\"");
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
-
it('Entering request with incorrect question_XML', () => {
|
|
117
|
-
cy.get('textarea[class="body-param__text"]')
|
|
118
|
-
.clear()
|
|
119
|
-
.fill(`{\n "questions": [\n {\n "reference": "uniq ques ref 002",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "Random XML",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ],\n "meta": {\n "user": {\n "id": "f8888c-f3fe-4642-440a-a32d47cd20be",\n "first_name": "fname",\n "last_name": "lname",\n "email": "user@demo.com"\n }\n }\n}`);
|
|
120
|
-
cy.get('.execute')
|
|
121
|
-
.click();
|
|
122
|
-
cy.wait(2000);
|
|
123
|
-
cy.get('.loading-container')
|
|
124
|
-
.should('not.exist');
|
|
125
|
-
cy.get('pre[class="microlight"]')
|
|
126
|
-
.eq(1)
|
|
127
|
-
.within(() => {
|
|
128
|
-
cy.contains('timestamp')
|
|
129
|
-
.next().next().then((currTimestamp) => {
|
|
130
|
-
timestamp = currTimestamp[0].innerText
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
it('Invalid XML message should be received in the response, with status code 200', () => {
|
|
136
|
-
cy.get('td[class="response-col_status"]')
|
|
137
|
-
.eq(0)
|
|
138
|
-
.should('have.text', '200');
|
|
139
|
-
cy.get('pre[class="microlight"]')
|
|
140
|
-
.eq(1)
|
|
141
|
-
.should('have.text', `{\n \"meta\": {\n \"message\": \"Error occurred while saving data\",\n \"timestamp\": ${timestamp},\n \"status\": false\n },\n \"data\": []\n}\n`);
|
|
142
|
-
});
|
|
143
|
-
|
|
144
116
|
it('Entering request with empty question_XML', () => {
|
|
145
117
|
cy.get('textarea[class="body-param__text"]')
|
|
146
118
|
.clear()
|
|
@@ -166,7 +138,7 @@ describe('Set Question Data API cases', () => {
|
|
|
166
138
|
it('Entering request with already existing question reference', () => {
|
|
167
139
|
cy.get('textarea[class="body-param__text"]')
|
|
168
140
|
.clear()
|
|
169
|
-
.fill('{\n "questions": [\n {\n "reference": "uniq ques ref 001",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "
|
|
141
|
+
.fill('{\n "questions": [\n {\n "reference": "uniq ques ref 001",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ]\n}\n');
|
|
170
142
|
cy.get('.execute')
|
|
171
143
|
.click();
|
|
172
144
|
cy.wait(2000);
|
|
@@ -174,22 +146,12 @@ describe('Set Question Data API cases', () => {
|
|
|
174
146
|
.should('not.exist');
|
|
175
147
|
});
|
|
176
148
|
|
|
177
|
-
it('Reference id already exists message should be received in the response, with status code 200', () => {
|
|
178
|
-
cy.get('pre[class="microlight"]')
|
|
179
|
-
.eq(1)
|
|
180
|
-
cy.get('pre[class="microlight"]')
|
|
181
|
-
.eq(1)
|
|
182
|
-
.find('span')
|
|
183
|
-
.eq(7)
|
|
184
|
-
.should('have.text',"\"Key (reference_id, organisation_id)=(uniq ques ref 001, 7e15466c-30cb-4fdf-b160-6e6fc3660d0e) already exists.\"");
|
|
185
|
-
});
|
|
186
|
-
|
|
187
149
|
it('Entering request to create 2 questions with valid reference ids', () => {
|
|
188
150
|
unique_reference_id_1 = uuid();
|
|
189
151
|
unique_reference_id_2 = uuid();
|
|
190
152
|
cy.get('textarea[class="body-param__text"]')
|
|
191
153
|
.clear()
|
|
192
|
-
.fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "
|
|
154
|
+
.fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n },\n {\n "reference": "${unique_reference_id_2}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ]\n}\n`);
|
|
193
155
|
cy.get('.execute')
|
|
194
156
|
.click();
|
|
195
157
|
cy.wait(2000);
|
|
@@ -28,7 +28,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
|
|
|
28
28
|
.click();
|
|
29
29
|
cy.get('textarea[class="body-param__text"]')
|
|
30
30
|
.clear()
|
|
31
|
-
.fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "
|
|
31
|
+
.fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
|
|
32
32
|
cy.get('.execute')
|
|
33
33
|
.click();
|
|
34
34
|
cy.wait(2000);
|
|
@@ -50,7 +50,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
|
|
|
50
50
|
it('Entering request with incorrect question_XML', () => {
|
|
51
51
|
cy.get('textarea[class="body-param__text"]')
|
|
52
52
|
.clear()
|
|
53
|
-
.fill(`{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "
|
|
53
|
+
.fill(`{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
|
|
54
54
|
cy.get('.execute')
|
|
55
55
|
.click();
|
|
56
56
|
cy.wait(2000);
|
|
@@ -66,15 +66,6 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
|
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
it('\'Error occurred while saving data\' message should be received in the response, with status code 500', () => {
|
|
70
|
-
cy.get('td[class="response-col_status"]')
|
|
71
|
-
.eq(0)
|
|
72
|
-
.should('have.text', '200');
|
|
73
|
-
cy.get('pre[class="microlight"]')
|
|
74
|
-
.eq(1)
|
|
75
|
-
.should('have.text', `{\n \"meta\": {\n \"message\": \"Key (reference_id, organisation_id)=(1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest, 7e15466c-30cb-4fdf-b160-6e6fc3660d0e) already exists.\",\n \"timestamp\": ${timestamp},\n \"status\": false\n },\n \"data\": []\n}\n`);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
69
|
it('Entering request with empty question_XML', () => {
|
|
79
70
|
cy.get('textarea[class="body-param__text"]')
|
|
80
71
|
.clear()
|
|
@@ -100,20 +91,28 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
|
|
|
100
91
|
it('Entering request with already existing question reference', () => {
|
|
101
92
|
cy.get('textarea[class="body-param__text"]')
|
|
102
93
|
.clear()
|
|
103
|
-
.fill('{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "
|
|
94
|
+
.fill('{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}');
|
|
104
95
|
cy.get('.execute')
|
|
105
96
|
.click();
|
|
106
97
|
cy.wait(2000);
|
|
107
98
|
cy.get('.loading-container')
|
|
108
99
|
.should('not.exist');
|
|
100
|
+
cy.get('pre[class="microlight"]')
|
|
101
|
+
.eq(1)
|
|
102
|
+
.within(() => {
|
|
103
|
+
cy.contains('timestamp')
|
|
104
|
+
.next().next().then((currTimestamp) => {
|
|
105
|
+
timestamp = currTimestamp[0].innerText
|
|
106
|
+
});
|
|
107
|
+
});
|
|
109
108
|
});
|
|
110
109
|
|
|
111
|
-
it('Reference id already exists
|
|
110
|
+
it('if Reference id already exists then it should update the existing question', () => {
|
|
112
111
|
cy.get('pre[class="microlight"]')
|
|
113
112
|
.eq(1)
|
|
114
113
|
.find('span')
|
|
115
114
|
.eq(7)
|
|
116
|
-
.should('have.text',
|
|
115
|
+
.should('have.text', 'true');
|
|
117
116
|
});
|
|
118
117
|
|
|
119
118
|
it('Entering request to create 2 questions with valid reference ids', () => {
|
|
@@ -121,7 +120,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
|
|
|
121
120
|
unique_reference_id_2 = uuid();
|
|
122
121
|
cy.get('textarea[class="body-param__text"]')
|
|
123
122
|
.clear()
|
|
124
|
-
.fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "
|
|
123
|
+
.fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n },\n {\n "reference": "${unique_reference_id_2}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n {\n "score": 4,\n "values": [\n "ChoiceA",\n "ChoiceE"\n ]\n },\n {\n "score": 4,\n "values": [\n "ChoiceB",\n "ChoiceD"\n ]\n }\n ]\n }\n }\n ]\n}`);
|
|
125
124
|
cy.get('.execute')
|
|
126
125
|
.click();
|
|
127
126
|
cy.wait(2000);
|
|
@@ -144,17 +144,6 @@ describe('Set Resource and tool Data API cases', () => {
|
|
|
144
144
|
.should('not.exist');
|
|
145
145
|
});
|
|
146
146
|
|
|
147
|
-
it('Reference id already exists message should be received in the response, with status code 500', () => {
|
|
148
|
-
cy.get('td[class="response-col_status"]')
|
|
149
|
-
.eq(0)
|
|
150
|
-
.should('have.text', '200');
|
|
151
|
-
cy.get('pre[class="microlight"]')
|
|
152
|
-
.eq(1)
|
|
153
|
-
.find('span')
|
|
154
|
-
.eq(7)
|
|
155
|
-
.should('have.text',"\"Key (reference_id, organisation_id)=(myPassageRef01, 7e15466c-30cb-4fdf-b160-6e6fc3660d0e) already exists.\"");
|
|
156
|
-
});
|
|
157
|
-
|
|
158
147
|
it('Entering request to create multiple resources with valid reference id', () => {
|
|
159
148
|
cy.get('textarea[class="body-param__text"]')
|
|
160
149
|
.clear()
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent, printPreviewComponent
|
|
1
|
+
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent, printPreviewComponent } from "./components/";
|
|
2
2
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
3
3
|
import utilities from "../support/helpers/utilities";
|
|
4
4
|
import { createItemPage } from "./createItemPage";
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
7
6
|
|
|
8
7
|
const selectors = {
|
|
9
8
|
...questionInstructionsComponent,
|
|
@@ -19,7 +18,6 @@ const selectors = {
|
|
|
19
18
|
...createQuestionBasePage,
|
|
20
19
|
...printPreviewComponent,
|
|
21
20
|
...autoScoredScoringSectionMultiResponseType,
|
|
22
|
-
...showAlternativeAnswersComponent,
|
|
23
21
|
|
|
24
22
|
answerLabelSpecifyCorrectAnswerSection: () => cy.get('.answer-label'),
|
|
25
23
|
displayCharacterCountLabel: () => cy.get('[data-ngie-testid="display-character-count-checkbox"] .MuiFormControlLabel-label'),
|
|
@@ -67,13 +65,7 @@ const selectors = {
|
|
|
67
65
|
//Preview tab
|
|
68
66
|
previewTabResponseField: () => cy.get('.input-field input:visible'),
|
|
69
67
|
previewTabResponseFieldWrapper: () => cy.get('.input-wrapper:visible'),
|
|
70
|
-
previewTabCorrectAnswerWrapper: () =>
|
|
71
|
-
if (alternativeAnswerCheck) {
|
|
72
|
-
return cy.get('[class*="CorrectAnswerSectionstyle__CorrectAnswerLabelWrapper"]');
|
|
73
|
-
} else {
|
|
74
|
-
return cy.get('[class*="ShortTextResponsestyles__CorrectAnswerWrapper"]');
|
|
75
|
-
}
|
|
76
|
-
},
|
|
68
|
+
previewTabCorrectAnswerWrapper: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerWrapper"]'),
|
|
77
69
|
previewTabCorrectAnswerLabel: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerLabel"]'),
|
|
78
70
|
previewTabCorrectAnswerResponse: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerValueWrapper"]'),
|
|
79
71
|
responseFieldCountPreviewTab: () => cy.get('[class*="InputLimitLabelWrapper"]'),
|
|
@@ -135,7 +127,6 @@ const steps = {
|
|
|
135
127
|
...createItemPage.steps,
|
|
136
128
|
...printPreviewComponent.steps,
|
|
137
129
|
...autoScoredScoringSectionMultiResponseType.steps,
|
|
138
|
-
...showAlternativeAnswersComponent.steps,
|
|
139
130
|
|
|
140
131
|
verifyCorrectIcon: () => {
|
|
141
132
|
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
|
@@ -158,7 +149,7 @@ const steps = {
|
|
|
158
149
|
|
|
159
150
|
verifyIncorrectAttemptBorder: () => {
|
|
160
151
|
utilities.verifyCSS(shortTextResponsePage.previewTabResponseField().parent().find('fieldset'), {
|
|
161
|
-
'border': `
|
|
152
|
+
'border': `1px solid ${css.color.incorrectAnswer}`
|
|
162
153
|
});
|
|
163
154
|
},
|
|
164
155
|
|
|
@@ -174,33 +165,14 @@ const steps = {
|
|
|
174
165
|
* @param {String} correctAnswer correct answer in correct answer wrapper present in grading view
|
|
175
166
|
* @description function verifies correct answer wrapper in grading view
|
|
176
167
|
*/
|
|
177
|
-
verifyCorrectAnswerResponseInCorrectAnswerWrapper: (correctAnswer
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
} else {
|
|
182
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
183
|
-
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'Correct answer:');
|
|
184
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'visible');
|
|
185
|
-
}
|
|
168
|
+
verifyCorrectAnswerResponseInCorrectAnswerWrapper: (correctAnswer) => {
|
|
169
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
170
|
+
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'Correct answer:');
|
|
171
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'visible');
|
|
186
172
|
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse(), correctAnswer);
|
|
187
173
|
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerResponse(), 'visible');
|
|
188
174
|
},
|
|
189
175
|
|
|
190
|
-
verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper: (correctAnswer, correctAnswerPoints, alternateAnswer, alternateAnswerPoints) => {
|
|
191
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
192
|
-
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(0), correctAnswer);
|
|
193
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(0), 'visible');
|
|
194
|
-
shortTextResponsePage.steps.verifyCorrectAnswersLabelAndPointVisible(`(${correctAnswerPoints} points)`);
|
|
195
|
-
shortTextResponsePage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
196
|
-
shortTextResponsePage.steps.disableShowAlternativeAnswersToggle();
|
|
197
|
-
shortTextResponsePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
198
|
-
shortTextResponsePage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
199
|
-
shortTextResponsePage.steps.clickShowAlternativeAnswersToggle();
|
|
200
|
-
shortTextResponsePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, `(${alternateAnswerPoints} points)`);
|
|
201
|
-
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(1), alternateAnswer);
|
|
202
|
-
},
|
|
203
|
-
|
|
204
176
|
enterTextInShortTextResponseInputField: (correctAnswer) => {
|
|
205
177
|
shortTextResponsePage.setCorrectAnswerResponseField()
|
|
206
178
|
.type(correctAnswer)
|
|
@@ -145,24 +145,18 @@ Cypress.Commands.add('createItem', (itemName) => {
|
|
|
145
145
|
"mappedKey": "ChoiceA",
|
|
146
146
|
"isCaseSensitive": false,
|
|
147
147
|
"answerSetId": 0
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"xmlIdentifier": "RESPONSE",
|
|
151
|
-
"mappedKey": "ChoiceB",
|
|
152
|
-
"isCaseSensitive": false,
|
|
153
|
-
"answerSetId": 0
|
|
154
148
|
}
|
|
155
149
|
],
|
|
156
150
|
"instruction": "",
|
|
157
151
|
"isAutoScored": true,
|
|
158
152
|
"mappedCorrectResponse": [],
|
|
159
153
|
"defaultResponse": [],
|
|
160
|
-
"points":
|
|
154
|
+
"points": 10,
|
|
161
155
|
"scoringTypeId": 1,
|
|
162
|
-
"questionXml": "<assessmentItem xmlns=\"http://www.imsglobal.org/xsd/imsqti_v2p2\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\" identifier=\"choiceMultiple\" title=\"Welcome to Biodome\" timeDependent=\"false\"><responseDeclaration identifier=\"RESPONSE\" cardinality=\"multiple\" baseType=\"identifier\"><correctResponse><value>ChoiceA</value><value>ChoiceB</value></correctResponse></responseDeclaration><outcomeDeclaration identifier=\"SCORE\" cardinality=\"single\" baseType=\"float\"/><itemBody><choiceInteraction responseIdentifier=\"RESPONSE\" orientation=\"horizontal\"><prompt></prompt><simpleChoice identifier=\"ChoiceA\">1</simpleChoice><simpleChoice identifier=\"ChoiceB\">2</simpleChoice><simpleChoice identifier=\"ChoiceC\">3</simpleChoice><simpleChoice identifier=\"ChoiceD\">4</simpleChoice></choiceInteraction></itemBody><responseProcessing template=\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\"/></assessmentItem>",
|
|
163
156
|
"typeId": 5,
|
|
164
157
|
"metadata": {
|
|
165
158
|
"acknowledgements": "",
|
|
159
|
+
"setMinimumOrMaximumNumberOfAnswers": false,
|
|
166
160
|
"sampleAnswer": "",
|
|
167
161
|
"toolSettingsResourcesOrder": [
|
|
168
162
|
{
|
|
@@ -210,23 +204,60 @@ Cypress.Commands.add('createItem', (itemName) => {
|
|
|
210
204
|
"disablePrevIncorrect": false,
|
|
211
205
|
"roundingType": 1,
|
|
212
206
|
"isMultipleColumns": false,
|
|
213
|
-
"optionAlignment": 1
|
|
207
|
+
"optionAlignment": 1,
|
|
208
|
+
"isIncompleteAuthoring": false,
|
|
209
|
+
"showPointsWarning": false,
|
|
210
|
+
"showOptionsWarning": false
|
|
214
211
|
},
|
|
215
212
|
"content": {
|
|
216
213
|
"correctResponses": [
|
|
217
214
|
{
|
|
218
215
|
"answerSetId": 0,
|
|
219
216
|
"correctAnswers": [
|
|
220
|
-
"ChoiceA"
|
|
221
|
-
"ChoiceB"
|
|
217
|
+
"ChoiceA"
|
|
222
218
|
]
|
|
223
219
|
}
|
|
224
220
|
],
|
|
225
221
|
"instructionsForPrint": "",
|
|
222
|
+
"viewMode": "defaultScoring",
|
|
223
|
+
"choices": {
|
|
224
|
+
"responseIdentifier": "RESPONSE",
|
|
225
|
+
"optionsList": [
|
|
226
|
+
{
|
|
227
|
+
"optionNumber": 1,
|
|
228
|
+
"optionIdentifier": "ChoiceA",
|
|
229
|
+
"text": "1"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"optionNumber": 2,
|
|
233
|
+
"optionIdentifier": "ChoiceB",
|
|
234
|
+
"text": "2"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"optionNumber": 3,
|
|
238
|
+
"optionIdentifier": "ChoiceC",
|
|
239
|
+
"text": "3"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"optionNumber": 4,
|
|
243
|
+
"optionIdentifier": "ChoiceD",
|
|
244
|
+
"text": "4"
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
"identifier": "choiceMultiple",
|
|
249
|
+
"questionItemInstruction": "test",
|
|
250
|
+
"resIdentifier": "RESPONSE",
|
|
251
|
+
"responseDeclaration": {
|
|
252
|
+
"mappedCorrectResponses": [],
|
|
253
|
+
"correctResponses": [
|
|
254
|
+
"ChoiceA"
|
|
255
|
+
]
|
|
256
|
+
},
|
|
226
257
|
"answerSets": [
|
|
227
258
|
{
|
|
228
259
|
"id": 0,
|
|
229
|
-
"points":
|
|
260
|
+
"points": 10
|
|
230
261
|
}
|
|
231
262
|
]
|
|
232
263
|
},
|
|
@@ -245,7 +276,7 @@ Cypress.Commands.add('createItem', (itemName) => {
|
|
|
245
276
|
"answerSets": [
|
|
246
277
|
{
|
|
247
278
|
"id": 0,
|
|
248
|
-
"points":
|
|
279
|
+
"points": 10
|
|
249
280
|
}
|
|
250
281
|
]
|
|
251
282
|
}
|