itemengine-cypress-automation 1.0.247-06SeptUpdates-b1623d7.0 → 1.0.247
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +349 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +348 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +415 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingPenaltyScoring.js +54 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightBasic.js +254 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightBasic.js +255 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +3 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +2 -0
- package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +2 -0
- package/cypress/e2e/ILC/ImageHighlight/toolsFunctionalityEditTab.js +2 -2
- package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +270 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsBasic.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +236 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialEqualWeightsBasic.js +150 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/setPointsPopup.js +88 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +97 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/studentViewSettings.js +134 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/additionalSettings.js +131 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabBasicSection.js +167 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +202 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/headerSection.js +76 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/manuallyAndNonScoredEditTab.js +72 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/minimumScoringPenaltyPointsAndRoundingDropdown.js +197 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/optionsOrientationSection.js +180 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/studentViewSettings.js +130 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionsPanel.js +121 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneConnectorStyle.js +68 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionAlignment.js +71 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionPlacement.js +64 -0
- package/cypress/e2e/ILC/MatchingDropdown/styleAndLayoutCustomization.js +270 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +272 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +6 -6
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/pages/audioPlayerPage.js +4 -4
- package/cypress/pages/audioResponsePage.js +9 -1
- package/cypress/pages/chartsBarPage.js +3 -3
- package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +51 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/pages/components/index.js +1 -10
- package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +604 -0
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -6
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
- package/cypress/pages/essayResponseBasicPage.js +4 -4
- package/cypress/pages/essayResponseMathPage.js +4 -4
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
- package/cypress/pages/index.js +0 -1
- package/cypress/pages/itemPreviewPage.js +1 -2
- package/cypress/pages/itemPreviewSettingsPage.js +3 -3
- package/cypress/pages/listOrderingPage.js +384 -10
- package/cypress/pages/matchingPage.js +512 -13
- package/cypress/pages/multipleSelectionPage.js +2 -2
- package/cypress/pages/numberLineLabelPage.js +3 -3
- package/cypress/pages/shortTextResponsePage.js +0 -37
- package/cypress/pages/singleSelectionPage.js +2 -2
- package/cypress/pages/textEntryMathPage.js +41 -9
- package/cypress/pages/textSelectionPage.js +2 -2
- package/cypress/pages/uploadResponsePage.js +2 -3
- package/cypress/pages/videoResponsePage.js +9 -2
- package/package.json +1 -1
- package/cypress/fixtures/specialAndMathCharacters.js +0 -120
- package/cypress/pages/components/autoScoredAdditionalSettings.js +0 -183
- package/cypress/pages/components/autoScoredPreviewBase.js +0 -92
- package/cypress/pages/components/autoScoredScoringSection.js +0 -199
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +0 -377
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +0 -297
- package/cypress/pages/components/autoScoredStudentViewSettingsForPredefinedOptions.js +0 -84
- package/cypress/pages/components/listSortingAndOrderingBase.js +0 -401
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +0 -91
- package/cypress/pages/components/scoringSectionBase.js +0 -354
- package/cypress/pages/components/specialAndCustomSpecialCharactersComponent.js +0 -80
- package/cypress/pages/components/specialCharactersFlyoutComponent.js +0 -59
- package/cypress/pages/listSortingPage.js +0 -1198
@@ -0,0 +1,272 @@
|
|
1
|
+
import { textEntryMathPage, gradingViewPage, itemPreviewPage, studentViewPage, dialogBoxBase } from "../../../pages";
|
2
|
+
import { equationEditorFlyout } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const grepTags = Cypress.env('grepTags');
|
6
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
7
|
+
const views = utilities.getViews(correctAnswerViews);
|
8
|
+
var itemReferenceID = "";
|
9
|
+
|
10
|
+
describe('Create Item page - Text entry math: All or nothing ', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
views.forEach((view) => {
|
16
|
+
describe(`Text entry math: all or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
|
17
|
+
abortEarlySetup();
|
18
|
+
before(() => {
|
19
|
+
switch (view) {
|
20
|
+
case 'Question preview':
|
21
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
22
|
+
cy.barsPreLoaderWait();
|
23
|
+
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
24
|
+
textEntryMathPage.steps.addResponseArea();
|
25
|
+
textEntryMathPage.steps.addResponseArea();
|
26
|
+
textEntryMathPage.steps.addResponseArea();
|
27
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
28
|
+
textEntryMathPage.steps.allotPoints(20);
|
29
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
30
|
+
equationEditorFlyout.steps.clearAll();
|
31
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
32
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
33
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
34
|
+
textEntryMathPage.steps.focusInLayoutInputField();
|
35
|
+
textEntryMathPage.steps.addResponseContainer();
|
36
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
37
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(0);
|
38
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
39
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
40
|
+
equationEditorFlyout.steps.enterQuadraticEquation();
|
41
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
42
|
+
textEntryMathPage.steps.focusInLayoutInputField();
|
43
|
+
textEntryMathPage.steps.addResponseContainer();
|
44
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'intermediate', symbolName: ['x', 'square', 'y', 'square'] }]);
|
45
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['add'] }]);
|
46
|
+
textEntryMathPage.steps.addResponseContainer();
|
47
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'intermediate', symbolName: ['x', 'y'] }]);
|
48
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['add'] }]);
|
49
|
+
textEntryMathPage.steps.addResponseContainer();
|
50
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
51
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(1);
|
52
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
|
53
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
|
54
|
+
equationEditorFlyout.steps.enterEquationUsingPiSymbol();
|
55
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
56
|
+
textEntryMathPage.steps.focusInLayoutInputField();
|
57
|
+
textEntryMathPage.steps.addResponseContainer();
|
58
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['multiply'] }, { categoryName: 'intermediate', symbolName: ['pi'] }]);
|
59
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
60
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(2);
|
61
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
62
|
+
//The following is not present on staging
|
63
|
+
// textEntryMathPage.steps.selectModalVisibilityTypeButton();
|
64
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
65
|
+
break;
|
66
|
+
case 'Item preview':
|
67
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
68
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
69
|
+
break;
|
70
|
+
case 'Grading view':
|
71
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
72
|
+
break;
|
73
|
+
}
|
74
|
+
});
|
75
|
+
|
76
|
+
beforeEach(() => {
|
77
|
+
switch (view) {
|
78
|
+
case 'Question preview':
|
79
|
+
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
80
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
81
|
+
break;
|
82
|
+
case 'Item preview':
|
83
|
+
itemPreviewPage.steps.switchToStudentView();
|
84
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
85
|
+
break;
|
86
|
+
case 'Grading view':
|
87
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
88
|
+
break;
|
89
|
+
}
|
90
|
+
});
|
91
|
+
|
92
|
+
if (view === 'Question preview') {
|
93
|
+
after(() => {
|
94
|
+
textEntryMathPage.steps.clickOnSaveQuestionButton();
|
95
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
96
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
97
|
+
});
|
98
|
+
};
|
99
|
+
|
100
|
+
it('When the user selects \'Grading\' view without attempting the question, correct/incorrect icons should not be displayed correct answers section should be displayed with the correct answers, correct answer label and border should not be displayed', () => {
|
101
|
+
if (view === 'Grading view') {
|
102
|
+
studentViewPage.steps.submitResponse();
|
103
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
104
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
105
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
106
|
+
}
|
107
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
108
|
+
textEntryMathPage.steps.switchToGradingView();
|
109
|
+
textEntryMathPage.steps.verifyPreviewScore(0, 20);
|
110
|
+
}
|
111
|
+
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
112
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['𝐶𝑜𝑟𝑟𝑒𝑐𝑡1', '2𝑥2𝑦2+4𝑥𝑦+4', '6×𝜋']);
|
113
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
114
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
115
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
116
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
117
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
118
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
119
|
+
});
|
120
|
+
|
121
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, and \'Your answer is incorrect\' label should be displayed', () => {
|
122
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
123
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 1');
|
124
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
125
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
126
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 2');
|
127
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
128
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
129
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 3');
|
130
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
131
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(3);
|
132
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 4');
|
133
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
134
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(4);
|
135
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 5');
|
136
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
137
|
+
if (view === 'Grading view') {
|
138
|
+
studentViewPage.steps.submitResponse();
|
139
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
140
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
141
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
142
|
+
}
|
143
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
144
|
+
textEntryMathPage.steps.verifyPreviewScore(0, 20);
|
145
|
+
textEntryMathPage.steps.switchToGradingView();
|
146
|
+
}
|
147
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
148
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
|
149
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
150
|
+
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
151
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['𝐶𝑜𝑟𝑟𝑒𝑐𝑡1', '2𝑥2𝑦2+4𝑥𝑦+4', '6×𝜋']);
|
152
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
153
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
154
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
155
|
+
});
|
156
|
+
|
157
|
+
it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icons should be displayed besides the correct responses, incorrect icons should be displayed beside the incorrect responses, and \'Your answer is incorrect\' label should be displayed', () => {
|
158
|
+
if (view === 'Grading view') {
|
159
|
+
studentViewPage.steps.clearResponses();
|
160
|
+
}
|
161
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
162
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
163
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
164
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
165
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('2');
|
166
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
167
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
168
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('4');
|
169
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
170
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(3);
|
171
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('4');
|
172
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
173
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(4);
|
174
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('1');
|
175
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
176
|
+
if (view === 'Grading view') {
|
177
|
+
studentViewPage.steps.submitResponse();
|
178
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
179
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
180
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
181
|
+
}
|
182
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
183
|
+
textEntryMathPage.steps.verifyPreviewScore(0, 20);
|
184
|
+
textEntryMathPage.steps.switchToGradingView();
|
185
|
+
}
|
186
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
187
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
188
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
189
|
+
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
190
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['𝐶𝑜𝑟𝑟𝑒𝑐𝑡1', '2𝑥2𝑦2+4𝑥𝑦+4', '6×𝜋']);
|
191
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
192
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
193
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
194
|
+
});
|
195
|
+
|
196
|
+
it('When the user attempts the question partially correct with a incomplete response, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icons should be displayed besides the correct responses and unattempted correct options, no icon should be displayed beside unattempted response, \'Your answer is incorrect\' should be displayed', () => {
|
197
|
+
if (view === 'Grading view') {
|
198
|
+
studentViewPage.steps.clearResponses();
|
199
|
+
}
|
200
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
201
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
202
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
203
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
204
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('2');
|
205
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
206
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
207
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('4');
|
208
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
209
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(3);
|
210
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('4');
|
211
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
212
|
+
if (view === 'Grading view') {
|
213
|
+
studentViewPage.steps.submitResponse();
|
214
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
215
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
216
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
217
|
+
}
|
218
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
219
|
+
textEntryMathPage.steps.verifyPreviewScore(0, 20);
|
220
|
+
textEntryMathPage.steps.switchToGradingView();
|
221
|
+
}
|
222
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
223
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
224
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
225
|
+
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
226
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['𝐶𝑜𝑟𝑟𝑒𝑐𝑡1', '2𝑥2𝑦2+4𝑥𝑦+4', '6×𝜋']);
|
227
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
228
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
229
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
230
|
+
});
|
231
|
+
|
232
|
+
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, and \'Your answer is correct\' should be displayed', () => {
|
233
|
+
if (view === 'Grading view') {
|
234
|
+
studentViewPage.steps.clearResponses();
|
235
|
+
}
|
236
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
237
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
238
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
239
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
240
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('2');
|
241
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
242
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
243
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('4');
|
244
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
245
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(3);
|
246
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('4');
|
247
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
248
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(4);
|
249
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('6');
|
250
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
251
|
+
if (view === 'Grading view') {
|
252
|
+
cy.wait(1000);
|
253
|
+
studentViewPage.steps.submitResponse();
|
254
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
255
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
256
|
+
cy.wait(1000);
|
257
|
+
gradingViewPage.steps.verifyGradingViewScore(20, 20);
|
258
|
+
}
|
259
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
260
|
+
textEntryMathPage.steps.verifyPreviewScore(20, 20);
|
261
|
+
textEntryMathPage.steps.switchToGradingView();
|
262
|
+
}
|
263
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
264
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
265
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(2);
|
266
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
267
|
+
textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
|
268
|
+
});
|
269
|
+
});
|
270
|
+
});
|
271
|
+
|
272
|
+
});
|
@@ -52,14 +52,14 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
|
|
52
52
|
// textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
53
53
|
});
|
54
54
|
|
55
|
-
it('When the user attempts the question using two inequalities then it should be treated as
|
55
|
+
it('When the user attempts the question using two inequalities then it should be treated as incorrect', () => {
|
56
56
|
textEntryMathPage.steps.resetQuestionPreview();
|
57
57
|
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
58
58
|
equationEditorFlyout.steps.enterTextInPreviewInputField('4+1>4<6');
|
59
59
|
equationEditorFlyout.steps.clickOnOkButton();
|
60
60
|
textEntryMathPage.steps.switchToGradingView();
|
61
|
-
textEntryMathPage.steps.
|
62
|
-
// textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('
|
61
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
62
|
+
// textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
63
63
|
});
|
64
64
|
|
65
65
|
it('When the user attempts the question using incorrect comparison of decimals then it should be treated as incorrect', () => {
|
@@ -689,7 +689,7 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
|
|
689
689
|
// textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
690
690
|
});
|
691
691
|
|
692
|
-
it('When the user attempts the question using mixed fractions then it should be treated as
|
692
|
+
it('When the user attempts the question using mixed fractions then it should be treated as incorrect if denominator is less than numerator', () => {
|
693
693
|
textEntryMathPage.steps.resetQuestionPreview();
|
694
694
|
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
695
695
|
equationEditorFlyout.steps.enterTextInPreviewInputField('1');
|
@@ -697,8 +697,8 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
|
|
697
697
|
equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3', '2']);
|
698
698
|
equationEditorFlyout.steps.clickOnOkButton();
|
699
699
|
textEntryMathPage.steps.switchToGradingView();
|
700
|
-
textEntryMathPage.steps.
|
701
|
-
// textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('
|
700
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
701
|
+
// textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
702
702
|
});
|
703
703
|
|
704
704
|
it('When the user attempts the question using polynomial expressions then it should be treated as correct', () => {
|
package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js
CHANGED
@@ -32,8 +32,8 @@ export const drawingToolbarOptionsAndAdditionalOptions = {
|
|
32
32
|
toolType: 'dialog'
|
33
33
|
},
|
34
34
|
{
|
35
|
-
displayName: '
|
36
|
-
tooltipText: 'The \'
|
35
|
+
displayName: 'Upload image ',
|
36
|
+
tooltipText: 'The \'Upload image \' tool uploads an image.',
|
37
37
|
toolType: 'dialog'
|
38
38
|
},
|
39
39
|
{
|
@@ -788,14 +788,14 @@ const steps = {
|
|
788
788
|
audioPlayerPage.audioOverviewInputField()
|
789
789
|
.find('[data-widget="ngie_equation"]')
|
790
790
|
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
791
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
791
|
+
// .contains(constants.CKEditorInputFieldEnteredEquationText); ;
|
792
792
|
},
|
793
793
|
|
794
794
|
verifyEquationInAudioOverviewPreviewTab: () => {
|
795
795
|
audioPlayerPage.audioOverviewPreviewTab()
|
796
796
|
.find('[role="math"]')
|
797
797
|
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
798
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
798
|
+
// .contains(constants.CKEditorInputFieldEnteredEquationText); ;
|
799
799
|
},
|
800
800
|
|
801
801
|
verifyLinkInAudioOverviewInputField: () => {
|
@@ -897,14 +897,14 @@ const steps = {
|
|
897
897
|
audioPlayerPage.transcriptInputField()
|
898
898
|
.find('[data-widget="ngie_equation"]')
|
899
899
|
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
900
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
900
|
+
// .contains(constants.CKEditorInputFieldEnteredEquationText); ;
|
901
901
|
},
|
902
902
|
|
903
903
|
verifyEquationInTranscriptPreviewTab: () => {
|
904
904
|
audioPlayerPage.transcriptContentPreviewTab()
|
905
905
|
.find('[role="math"]')
|
906
906
|
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
907
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
907
|
+
// .contains(constants.CKEditorInputFieldEnteredEquationText); ;
|
908
908
|
},
|
909
909
|
|
910
910
|
verifyLinkInTranscriptInputField: () => {
|
@@ -799,7 +799,15 @@ const steps = {
|
|
799
799
|
|
800
800
|
verifyResponseIsRecordedHelpText: () => {
|
801
801
|
utilities.verifyInnerText(audioResponsePage.recordedResponseHelpText(), 'Your response has been recorded.');
|
802
|
-
}
|
802
|
+
},
|
803
|
+
|
804
|
+
//Need to remove this once https://redmine.zeuslearning.com/issues/577356 is resolved
|
805
|
+
switchToEditTab: () => {
|
806
|
+
createQuestionBasePage.editTab()
|
807
|
+
.click()
|
808
|
+
.should('have.attr', 'aria-selected', 'true');
|
809
|
+
audioResponsePage.steps.expandCustomizePlaybackControlsAccordion();
|
810
|
+
},
|
803
811
|
}
|
804
812
|
|
805
813
|
const tests = {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import utilities from "../support/helpers/utilities"
|
2
2
|
import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, studentViewSettingsLabelComponent, layoutSectionComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
|
3
|
-
import { dialogBoxBase } from "./dialogBoxBase";
|
4
3
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
4
|
+
import { dialogBoxBase } from "./dialogBoxBase";
|
5
5
|
const css = Cypress.env('css');
|
6
6
|
|
7
7
|
const selectors = {
|
@@ -605,12 +605,12 @@ const steps = {
|
|
605
605
|
}
|
606
606
|
},
|
607
607
|
|
608
|
-
|
608
|
+
/*
|
609
609
|
* Decreases the bar value at the specified index in the preview tab using the down arrow key.
|
610
610
|
* @param {number} barIndex - Index of the bar to decrease.
|
611
611
|
* @param {('vertical'|'horizontal')} orientation orientation of the chart
|
612
612
|
*/
|
613
|
-
decreaseBarValueUsingDownArrowInPreviewTab: (barIndex, orientation='vertical') => {
|
613
|
+
decreaseBarValueUsingDownArrowInPreviewTab: (barIndex, orientation = 'vertical') => {
|
614
614
|
if (orientation === 'vertical') {
|
615
615
|
utilities.getNthElement(chartsBarPage.previewTabBarDragHandle(), barIndex)
|
616
616
|
.focus()
|
@@ -7,6 +7,7 @@ const selectors = {
|
|
7
7
|
noneEndPointShapeButton: () => cy.get('button[aria-label="none connector end point shape"]'),
|
8
8
|
connectorEndPointShapeLabel: () => cy.get('[class*="__SubSectionLabel"]').eq(2),
|
9
9
|
connectorEndPointShapeOptions: (shapeOption) => cy.get(`.dropzone-connector-option button[aria-label*="${shapeOption}"]`),
|
10
|
+
connectorLineTypeOptionsWrapper: () => cy.get('.dropzone-connector-option button'),
|
10
11
|
}
|
11
12
|
|
12
13
|
const steps = {
|
@@ -68,6 +69,56 @@ const steps = {
|
|
68
69
|
connectorStyleStyleAndLayoutCustomizationComponent.connectorEndPointShapeOptions(optionLabel)
|
69
70
|
.should('have.attr', 'aria-pressed', 'true');
|
70
71
|
},
|
72
|
+
|
73
|
+
selectConnectorLineType: (button) => {
|
74
|
+
switch (button) {
|
75
|
+
case 'simpleLink':
|
76
|
+
connectorStyleStyleAndLayoutCustomizationComponent.connectorLineTypeOptionsWrapper()
|
77
|
+
.eq(0)
|
78
|
+
.click()
|
79
|
+
.should('have.class', 'Mui-selected');
|
80
|
+
break;
|
81
|
+
case 'mingleLink':
|
82
|
+
connectorStyleStyleAndLayoutCustomizationComponent.connectorLineTypeOptionsWrapper()
|
83
|
+
.eq(1)
|
84
|
+
.click()
|
85
|
+
.should('have.class', 'Mui-selected');
|
86
|
+
break;
|
87
|
+
case 'leftArrow':
|
88
|
+
connectorStyleStyleAndLayoutCustomizationComponent.connectorLineTypeOptionsWrapper()
|
89
|
+
.eq(2)
|
90
|
+
.click()
|
91
|
+
.should('have.class', 'Mui-selected');
|
92
|
+
break;
|
93
|
+
case 'rightArrow':
|
94
|
+
connectorStyleStyleAndLayoutCustomizationComponent.connectorLineTypeOptionsWrapper()
|
95
|
+
.eq(3)
|
96
|
+
.click()
|
97
|
+
.should('have.class', 'Mui-selected');
|
98
|
+
break;
|
99
|
+
case 'doubleArrow':
|
100
|
+
connectorStyleStyleAndLayoutCustomizationComponent.connectorLineTypeOptionsWrapper()
|
101
|
+
.eq(4)
|
102
|
+
.click()
|
103
|
+
.should('have.class', 'Mui-selected');
|
104
|
+
break;
|
105
|
+
case 'line':
|
106
|
+
connectorStyleStyleAndLayoutCustomizationComponent.connectorLineTypeOptionsWrapper()
|
107
|
+
.eq(5)
|
108
|
+
.click()
|
109
|
+
.should('have.class', 'Mui-selected');
|
110
|
+
break;
|
111
|
+
case 'dashed':
|
112
|
+
connectorStyleStyleAndLayoutCustomizationComponent.connectorLineTypeOptionsWrapper()
|
113
|
+
.eq(6)
|
114
|
+
.click()
|
115
|
+
.should('have.class', 'Mui-selected');
|
116
|
+
break;
|
117
|
+
default:
|
118
|
+
throw new Error('Invalid connector line type');
|
119
|
+
}
|
120
|
+
},
|
121
|
+
|
71
122
|
}
|
72
123
|
|
73
124
|
|
@@ -485,7 +485,7 @@ const steps = {
|
|
485
485
|
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
|
486
486
|
.find('[role="math"]')
|
487
487
|
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
488
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
488
|
+
// .contains(constants.CKEditorInputFieldEnteredEquationText); ;
|
489
489
|
});
|
490
490
|
});
|
491
491
|
},
|
@@ -4,17 +4,8 @@ export * from './additionalSettingsPanel';
|
|
4
4
|
export * from './mcqAdditionalSettingsBase';
|
5
5
|
export * from './questionInstructionsComponent';
|
6
6
|
export * from './ckEditorToolbar';
|
7
|
-
export * from './autoScoredPreviewBase';
|
8
|
-
export * from './scoringSectionBase';
|
9
7
|
export * from './essayResponseCommonComponents';
|
10
|
-
export * from './autoScoredAdditionalSettings';
|
11
|
-
export * from './autoScoredSetCorrectAnswerSection';
|
12
|
-
export * from './autoScoredScoringSectionMultipleResponsesType';
|
13
|
-
export * from './autoScoredScoringSection';
|
14
8
|
export * from './optionsWrapperComponent';
|
15
|
-
export * from './specialCharactersFlyoutComponent';
|
16
|
-
export * from './specialAndCustomSpecialCharactersComponent';
|
17
|
-
export * from './previewScoringAndShowCorrectAnswerComponent';
|
18
9
|
export * from './equationEditorFlyout';
|
19
10
|
export * from './answerNumerationComponent';
|
20
11
|
export * from './studentResponseAreaAndLayoutComponent';
|
@@ -76,4 +67,4 @@ export * from './figCommonStyleAndLayoutComponent'
|
|
76
67
|
export * from './showAvailableOptionsToStudents';
|
77
68
|
export * from './showStudentMaximumNumberOfPossibleSelections';
|
78
69
|
export * from './draggableOptionsStyleAndLayoutComponent';
|
79
|
-
export * from './connectorStyleStyleAndLayoutCustomizationComponent'
|
70
|
+
export * from './connectorStyleStyleAndLayoutCustomizationComponent'
|