itemengine-cypress-automation 1.0.145-equationAndCheckAnswerSeelctorUpdate-b61f46e.0 → 1.0.145
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingPenaltyScoring.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/manuallyAndNonScoredScoring.js +0 -2
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -12
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +0 -2
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +1 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/specifyCorrectAnswerSection.js +0 -1
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +0 -1
- package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +8 -8
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +256 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +252 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +335 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingPenaltyScoring.js +60 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +157 -0
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +497 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +200 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +280 -0
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +281 -0
- package/cypress/e2e/ILC/Matching/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
- package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +146 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingPenaltyScoring.js +55 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsBasic.js +116 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +307 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +163 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -3
- package/cypress/e2e/ILC/MultipleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -5
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +11 -10
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +6 -9
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +12 -5
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +1 -2
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -0
- package/cypress/pages/components/desmosToolComponent.js +1 -1
- package/cypress/pages/components/gridQuestionCommonComponent.js +28 -4
- package/cypress/pages/components/index.js +1 -0
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +132 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +3 -113
- package/cypress/pages/geoGebraToolsPage.js +1 -1
- package/cypress/pages/graphingPage.js +6 -0
- package/cypress/pages/gridFillPage.js +67 -12
- package/cypress/pages/index.js +2 -1
- package/cypress/pages/matchingPage.js +433 -0
- package/cypress/pages/multipleSelectionGridPage.js +11 -3
- package/cypress/pages/singleSelectionGridPage.js +2 -1
- package/cypress/pages/textEntryMathPage.js +5 -0
- package/cypress/pages/textEntryMathWithImagePage.js +6 -1
- package/package.json +2 -2
@@ -0,0 +1,128 @@
|
|
1
|
+
import { multipleSelectionGridPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
var itemReferenceID = "";
|
5
|
+
const checkAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
6
|
+
const views = utilities.getViews(checkAnswerViews);
|
7
|
+
|
8
|
+
describe('Create item page - Multiple selection grid - Check answer functionality', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
views.forEach((view) => {
|
14
|
+
//Note: Remove after https://redmine.zeuslearning.com/issues/549542 is fixed
|
15
|
+
const checkAnswer = (view) => {
|
16
|
+
switch (view) {
|
17
|
+
case 'Question preview':
|
18
|
+
case 'Item preview':
|
19
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
20
|
+
break;
|
21
|
+
case 'Student view':
|
22
|
+
studentViewPage.steps.checkAnswer();
|
23
|
+
break;
|
24
|
+
default:
|
25
|
+
throw new Error(`Unsupported page identifier: ${view}`);
|
26
|
+
}
|
27
|
+
};
|
28
|
+
describe(`${view} - Check answer functionality`, { tags: 'smoke' }, () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
switch (view) {
|
32
|
+
case 'Question preview':
|
33
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
34
|
+
cy.barsPreLoaderWait();
|
35
|
+
multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
|
36
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
37
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
38
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
39
|
+
multipleSelectionGridPage.steps.allotPoints(20);
|
40
|
+
multipleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
41
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
42
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
43
|
+
break;
|
44
|
+
case 'Item preview':
|
45
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
46
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
47
|
+
break;
|
48
|
+
case 'Student view':
|
49
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
50
|
+
break;
|
51
|
+
}
|
52
|
+
});
|
53
|
+
|
54
|
+
beforeEach(() => {
|
55
|
+
switch (view) {
|
56
|
+
case 'Question preview':
|
57
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
58
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
59
|
+
break;
|
60
|
+
case 'Item preview':
|
61
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
62
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
63
|
+
break;
|
64
|
+
case 'Student view':
|
65
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
66
|
+
break;
|
67
|
+
}
|
68
|
+
});
|
69
|
+
|
70
|
+
if (view === 'Question preview') {
|
71
|
+
after(() => {
|
72
|
+
multipleSelectionGridPage.steps.clickOnSaveQuestionButton();
|
73
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
74
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
75
|
+
});
|
76
|
+
};
|
77
|
+
|
78
|
+
it('When the user selects \'Check answer\' button without attempting the question, then correct/incorrect icons, correct/incorrect answer status message and correct answer section should not be displayed', () => {
|
79
|
+
checkAnswer(view);
|
80
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconsNotExist();
|
81
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
82
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
83
|
+
});
|
84
|
+
|
85
|
+
it('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
86
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
|
87
|
+
checkAnswer(view);
|
88
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
89
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
90
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
91
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
92
|
+
});
|
93
|
+
|
94
|
+
it('When the user attempts the question partially correct with incorrect responses and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, correct icons should be displayed besides correct responses, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
95
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 1 }, { row: 4, column: 0 }]);
|
96
|
+
checkAnswer(view);
|
97
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
98
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
99
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
100
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
101
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
102
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
103
|
+
});
|
104
|
+
|
105
|
+
it('When the user attempts the question partially correct with incomplete responses and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, correct icons should be displayed besides correct responses, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
106
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }]);
|
107
|
+
checkAnswer(view);
|
108
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
109
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
110
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
|
111
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 0 });
|
112
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
113
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
114
|
+
});
|
115
|
+
|
116
|
+
it('When user attempts the question correctly, and clicks on \'Check answer\' button, then correct icons should be displayed besides correct responses, a status message with text \'Your answer is correct\' should be displayed. Correct answer section should not be displayed', () => {
|
117
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
118
|
+
checkAnswer(view);
|
119
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
120
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
121
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
122
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
123
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
124
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
125
|
+
});
|
126
|
+
});
|
127
|
+
});
|
128
|
+
});
|
@@ -122,6 +122,9 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
122
122
|
});
|
123
123
|
|
124
124
|
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icon should be displayed beside the correct response, correct answer border around response field should be displayed the question preview', () => {
|
125
|
+
if (view === 'Grading view') {
|
126
|
+
studentViewPage.steps.clearResponses();
|
127
|
+
};
|
125
128
|
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Buildings');
|
126
129
|
if (view === 'Grading view') {
|
127
130
|
studentViewPage.steps.submitResponse();
|
@@ -0,0 +1,128 @@
|
|
1
|
+
import { singleSelectionGridPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
var itemReferenceID = "";
|
5
|
+
const checkAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
6
|
+
const views = utilities.getViews(checkAnswerViews);
|
7
|
+
|
8
|
+
describe('Create item page - Single selection grid - Check answer functionality', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
views.forEach((view) => {
|
14
|
+
//Note: Remove after https://redmine.zeuslearning.com/issues/549542 is fixed
|
15
|
+
const checkAnswer = (view) => {
|
16
|
+
switch (view) {
|
17
|
+
case 'Question preview':
|
18
|
+
case 'Item preview':
|
19
|
+
singleSelectionGridPage.steps.checkAnswer();
|
20
|
+
break;
|
21
|
+
case 'Student view':
|
22
|
+
studentViewPage.steps.checkAnswer();
|
23
|
+
break;
|
24
|
+
default:
|
25
|
+
throw new Error(`Unsupported page identifier: ${view}`);
|
26
|
+
}
|
27
|
+
};
|
28
|
+
describe(`${view} - Check answer functionality`, { tags: 'smoke' }, () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
switch (view) {
|
32
|
+
case 'Question preview':
|
33
|
+
singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
|
34
|
+
cy.barsPreLoaderWait();
|
35
|
+
singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
|
36
|
+
singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
37
|
+
singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
38
|
+
singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
39
|
+
singleSelectionGridPage.steps.allotPoints(20);
|
40
|
+
singleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
41
|
+
singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
42
|
+
singleSelectionGridPage.steps.switchToPreviewTab();
|
43
|
+
break;
|
44
|
+
case 'Item preview':
|
45
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
46
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
47
|
+
break;
|
48
|
+
case 'Student view':
|
49
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
50
|
+
break;
|
51
|
+
}
|
52
|
+
});
|
53
|
+
|
54
|
+
beforeEach(() => {
|
55
|
+
switch (view) {
|
56
|
+
case 'Question preview':
|
57
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
58
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
59
|
+
break;
|
60
|
+
case 'Item preview':
|
61
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
62
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
63
|
+
break;
|
64
|
+
case 'Student view':
|
65
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
66
|
+
break;
|
67
|
+
}
|
68
|
+
});
|
69
|
+
|
70
|
+
if (view === 'Question preview') {
|
71
|
+
after(() => {
|
72
|
+
singleSelectionGridPage.steps.clickOnSaveQuestionButton();
|
73
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
74
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
75
|
+
});
|
76
|
+
};
|
77
|
+
|
78
|
+
it('When the user selects \'Check answer\' button without attempting the question, then correct/incorrect icons, correct/incorrect answer status message and correct answer section should not be displayed', () => {
|
79
|
+
checkAnswer(view);
|
80
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconsNotExist();
|
81
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
82
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
83
|
+
});
|
84
|
+
|
85
|
+
it('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
86
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
|
87
|
+
checkAnswer(view);
|
88
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
89
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
90
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
91
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
92
|
+
});
|
93
|
+
|
94
|
+
it('When the user attempts the question partially correct with incorrect responses and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, correct icons should be displayed besides correct responses, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
95
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 1 }, { row: 4, column: 0 }]);
|
96
|
+
checkAnswer(view);
|
97
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
98
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
99
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
100
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
101
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
102
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
103
|
+
});
|
104
|
+
|
105
|
+
it('When the user attempts the question partially correct with incomplete responses and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, correct icons should be displayed besides correct responses, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
106
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }]);
|
107
|
+
checkAnswer(view);
|
108
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
109
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
110
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
|
111
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 0 });
|
112
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
113
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
114
|
+
});
|
115
|
+
|
116
|
+
it('When user attempts the question correctly, and clicks on \'Check answer\' button, then correct icons should be displayed besides correct responses, a status message with text \'Your answer is correct\' should be displayed. Correct answer section should not be displayed', () => {
|
117
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
118
|
+
checkAnswer(view);
|
119
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
120
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
121
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
122
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
123
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
124
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
125
|
+
});
|
126
|
+
});
|
127
|
+
});
|
128
|
+
});
|
@@ -83,17 +83,15 @@ describe('Create item page - Text entry math: Preview contents', () => {
|
|
83
83
|
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
84
84
|
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
85
85
|
equationEditorFlyout.steps.clickOnOkButton();
|
86
|
-
textEntryMathPage.steps.
|
86
|
+
textEntryMathPage.steps.verifyResponseAreaContainsTextPreviewTab(0, 'Correct1');
|
87
87
|
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
88
88
|
equationEditorFlyout.steps.enterQuadraticEquation();
|
89
|
-
textEntryMathPage.steps.
|
90
|
-
textEntryMathPage.steps.verifyResponseFieldEquationAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
89
|
+
textEntryMathPage.steps.verifyResponseAreaContainsTextPreviewTab(1, '2x2y2+4xy+4');
|
91
90
|
});
|
92
91
|
} else if (view === 'Grading view') {
|
93
92
|
it(`The response fields should be filled with the submitted responses and user should not be able to edit them`, () => {
|
94
93
|
textEntryMathPage.steps.verifyResponseAreaTextContentPreviewTab(0, 'Correct1');
|
95
94
|
textEntryMathPage.steps.verifyResponseAreaTextContentPreviewTab(1, '2x2y2+4xy+4');
|
96
|
-
textEntryMathPage.steps.verifyResponseFieldEquationAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
97
95
|
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
98
96
|
utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBox(), 'notExist');
|
99
97
|
});
|
@@ -101,7 +99,6 @@ describe('Create item page - Text entry math: Preview contents', () => {
|
|
101
99
|
it(`The response input fields should be displayed filled with correct answers`, () => {
|
102
100
|
textEntryMathPage.steps.verifyResponseAreaTextContentPreviewTab(0, 'Correct1');
|
103
101
|
textEntryMathPage.steps.verifyResponseAreaTextContentPreviewTab(1, '2x2y2+4xy+4');
|
104
|
-
textEntryMathPage.steps.verifyResponseFieldEquationAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
105
102
|
});
|
106
103
|
}
|
107
104
|
|
@@ -59,7 +59,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
59
59
|
|
60
60
|
//Failing due to https://redmine.zeuslearning.com/issues/561708, https://redmine.zeuslearning.com/issues/561177
|
61
61
|
views.forEach((view) => {
|
62
|
-
describe(`Text entry math: all or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
|
62
|
+
describe.only(`Text entry math: all or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
|
63
63
|
abortEarlySetup();
|
64
64
|
before(() => {
|
65
65
|
switch (view) {
|
@@ -76,7 +76,8 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
76
76
|
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
77
77
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
78
78
|
equationEditorFlyout.steps.clearAll();
|
79
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('
|
79
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
80
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
80
81
|
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
81
82
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
82
83
|
equationEditorFlyout.steps.enterQuadraticEquation();
|
@@ -132,7 +133,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
132
133
|
textEntryMathWithImagePage.steps.verifyPreviewScore(0, 20);
|
133
134
|
}
|
134
135
|
textEntryMathWithImagePage.steps.verifyResponseFieldNumerationPreviewTab();
|
135
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['
|
136
|
+
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct1', '2x2y2+4xy+4', '6×π']);
|
136
137
|
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
137
138
|
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
138
139
|
textEntryMathWithImagePage.steps.verifyCorrectIncorrectIconNotExist(0);
|
@@ -165,7 +166,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
165
166
|
textEntryMathWithImagePage.steps.verifyIncorrectResponseIcon(1);
|
166
167
|
textEntryMathWithImagePage.steps.verifyIncorrectResponseIcon(2);
|
167
168
|
textEntryMathWithImagePage.steps.verifyResponseFieldNumerationPreviewTab();
|
168
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['
|
169
|
+
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct1', '2x2y2+4xy+4', '6×π']);
|
169
170
|
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
170
171
|
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
171
172
|
textEntryMathWithImagePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
@@ -176,7 +177,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
176
177
|
studentViewPage.steps.clearResponses();
|
177
178
|
}
|
178
179
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
179
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('
|
180
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
180
181
|
equationEditorFlyout.steps.clickOnOkButton();
|
181
182
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
182
183
|
equationEditorFlyout.steps.enterQuadraticEquation();
|
@@ -197,7 +198,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
197
198
|
textEntryMathWithImagePage.steps.verifyCorrectResponseIcon(1);
|
198
199
|
textEntryMathWithImagePage.steps.verifyIncorrectResponseIcon(2);
|
199
200
|
textEntryMathWithImagePage.steps.verifyResponseFieldNumerationPreviewTab();
|
200
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['
|
201
|
+
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct1', '2x2y2+4xy+4', '6×π']);
|
201
202
|
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
202
203
|
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
203
204
|
textEntryMathWithImagePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
@@ -208,7 +209,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
208
209
|
studentViewPage.steps.clearResponses();
|
209
210
|
}
|
210
211
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
211
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('
|
212
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
212
213
|
equationEditorFlyout.steps.clickOnOkButton();
|
213
214
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
214
215
|
equationEditorFlyout.steps.enterQuadraticEquation();
|
@@ -226,7 +227,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
226
227
|
textEntryMathWithImagePage.steps.verifyCorrectResponseIcon(1);
|
227
228
|
textEntryMathWithImagePage.steps.verifyCorrectIncorrectIconNotExist(2);
|
228
229
|
textEntryMathWithImagePage.steps.verifyResponseFieldNumerationPreviewTab();
|
229
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['
|
230
|
+
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct1', '2x2y2+4xy+4', '6×π']);
|
230
231
|
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
231
232
|
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
232
233
|
textEntryMathWithImagePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
@@ -237,7 +238,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
237
238
|
studentViewPage.steps.clearResponses();
|
238
239
|
}
|
239
240
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
240
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('
|
241
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
241
242
|
equationEditorFlyout.steps.clickOnOkButton();
|
242
243
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
243
244
|
equationEditorFlyout.steps.enterQuadraticEquation();
|
@@ -278,7 +279,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
278
279
|
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
279
280
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
280
281
|
equationEditorFlyout.steps.clearAll();
|
281
|
-
textEntryMathWithImagePage.steps.enterTextInPreviewInputField('
|
282
|
+
textEntryMathWithImagePage.steps.enterTextInPreviewInputField('Correct1');
|
282
283
|
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
283
284
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
284
285
|
equationEditorFlyout.steps.enterQuadraticEquation();
|
@@ -30,7 +30,7 @@ describe('Create item page - Text entry math: Preview contents', () => {
|
|
30
30
|
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
31
31
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
32
32
|
equationEditorFlyout.steps.clearAll();
|
33
|
-
textEntryMathWithImagePage.steps.enterTextInPreviewInputField('
|
33
|
+
textEntryMathWithImagePage.steps.enterTextInPreviewInputField('Correct1');
|
34
34
|
equationEditorFlyout.steps.clickOnOkButton();
|
35
35
|
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
36
36
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
@@ -94,27 +94,24 @@ describe('Create item page - Text entry math: Preview contents', () => {
|
|
94
94
|
|
95
95
|
it(`User should able to enter answers in the response fields for ${view}`, () => {
|
96
96
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
97
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('
|
97
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
98
98
|
equationEditorFlyout.steps.clickOnOkButton();
|
99
|
-
textEntryMathWithImagePage.steps.
|
99
|
+
textEntryMathWithImagePage.steps.verifyResponseAreaContainsTextPreviewTab(0, 'Correct1');
|
100
100
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
101
101
|
equationEditorFlyout.steps.enterQuadraticEquation();
|
102
|
-
textEntryMathWithImagePage.steps.
|
103
|
-
textEntryMathWithImagePage.steps.verifyResponseFieldEquationAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
102
|
+
textEntryMathWithImagePage.steps.verifyResponseAreaContainsTextPreviewTab(1, '2x2y2+4xy+4');
|
104
103
|
});
|
105
104
|
} else if (view === 'Grading view') {
|
106
105
|
it(`The response fields should be filled with the submitted responses and user should not be able to edit them`, () => {
|
107
|
-
textEntryMathWithImagePage.steps.verifyResponseAreaTextContentPreviewTab(0, '
|
106
|
+
textEntryMathWithImagePage.steps.verifyResponseAreaTextContentPreviewTab(0, 'Correct1');
|
108
107
|
textEntryMathWithImagePage.steps.verifyResponseAreaTextContentPreviewTab(1, '2x2y2+4xy+4');
|
109
|
-
textEntryMathWithImagePage.steps.verifyResponseFieldEquationAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
110
108
|
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
111
109
|
utilities.verifyElementVisibilityState(equationEditorFlyout.dialogBox(), 'notExist');
|
112
110
|
});
|
113
111
|
} else {
|
114
112
|
it(`The response input fields should be displayed filled with correct answers`, () => {
|
115
|
-
textEntryMathWithImagePage.steps.verifyResponseAreaTextContentPreviewTab(0, '
|
113
|
+
textEntryMathWithImagePage.steps.verifyResponseAreaTextContentPreviewTab(0, 'Correct1');
|
116
114
|
textEntryMathWithImagePage.steps.verifyResponseAreaTextContentPreviewTab(1, '2x2y2+4xy+4');
|
117
|
-
textEntryMathWithImagePage.steps.verifyResponseFieldEquationAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
118
115
|
});
|
119
116
|
}
|
120
117
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { itemPreviewPage, studentViewPage, multipleSelectionPage, protractorPage } from "../../../pages";
|
2
2
|
import { rulerPage } from "../../../pages";
|
3
3
|
import { createQuestionBasePage, toolSettingsComponent, commonComponents } from "../../../pages/components";
|
4
|
+
import { dialogBoxBase } from "../../../pages";
|
4
5
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
5
6
|
import utilities from "../../../support/helpers/utilities";
|
6
7
|
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
@@ -29,7 +30,9 @@ describe('Tool settings content for all views', () => {
|
|
29
30
|
multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
|
30
31
|
multipleSelectionPage.steps.allotPoints(20);
|
31
32
|
toolSettingsComponent.steps.expandToolSettingsAccordion();
|
32
|
-
toolSettingsComponent.steps.
|
33
|
+
toolSettingsComponent.steps.clickOnToolEditIcon(0);
|
34
|
+
rulerPage.steps.checkAddShowHideButtonCheckbox();
|
35
|
+
dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
|
33
36
|
createQuestionBasePage.steps.switchToPreviewTab();
|
34
37
|
utilities.verifyElementVisibilityState(commonComponents.previewTabQuestionWrapper(), 'visible');
|
35
38
|
break;
|
@@ -98,7 +101,7 @@ describe('Tool settings content for all views', () => {
|
|
98
101
|
});
|
99
102
|
});
|
100
103
|
|
101
|
-
describe(`Preview tab contents : Multiple tools selected - ${view}`, { tags: 'smoke' }, () => {
|
104
|
+
describe.only(`Preview tab contents : Multiple tools selected - ${view}`, { tags: 'smoke' }, () => {
|
102
105
|
abortEarlySetup();
|
103
106
|
before(() => {
|
104
107
|
switch (view) {
|
@@ -112,8 +115,12 @@ describe('Tool settings content for all views', () => {
|
|
112
115
|
multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
|
113
116
|
multipleSelectionPage.steps.allotPoints(20);
|
114
117
|
toolSettingsComponent.steps.expandToolSettingsAccordion();
|
115
|
-
toolSettingsComponent.steps.
|
116
|
-
|
118
|
+
toolSettingsComponent.steps.clickOnToolEditIcon(0);
|
119
|
+
rulerPage.steps.checkAddShowHideButtonCheckbox();
|
120
|
+
dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
|
121
|
+
toolSettingsComponent.steps.clickOnToolEditIcon(1);
|
122
|
+
rulerPage.steps.checkAddShowHideButtonCheckbox();
|
123
|
+
dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
|
117
124
|
createQuestionBasePage.steps.switchToPreviewTab();
|
118
125
|
break;
|
119
126
|
case 'Item view':
|
@@ -191,7 +198,7 @@ describe('Tool settings content for all views', () => {
|
|
191
198
|
});
|
192
199
|
|
193
200
|
//Failed due to https://redmine.zeuslearning.com/issues/557552
|
194
|
-
it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
|
201
|
+
it.skip('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
|
195
202
|
cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
|
196
203
|
});
|
197
204
|
|
@@ -77,7 +77,7 @@ export const equationEditorCategoriesAndSymbols = {
|
|
77
77
|
add: {
|
78
78
|
title: 'Addition',
|
79
79
|
textElement: null,
|
80
|
-
ariaLabel: 'Plus',
|
80
|
+
ariaLabel: 'Plus 6',
|
81
81
|
displayText: '+'
|
82
82
|
},
|
83
83
|
subtract: {
|
@@ -98,7 +98,6 @@ export const equationEditorCategoriesAndSymbols = {
|
|
98
98
|
ariaLabel: 'Division',
|
99
99
|
displayText: '÷'
|
100
100
|
},
|
101
|
-
//TODO: Need to update when https://redmine.zeuslearning.com/issues/525382 is resolved
|
102
101
|
equalTo: {
|
103
102
|
title: 'Equal To',
|
104
103
|
textElement: null,
|
@@ -5,6 +5,7 @@ const css = Cypress.env('css');
|
|
5
5
|
//Note: We need to work on this file, as disablePreviousIncorrectOptionLabel is not present for all auto scored question types, need to create different component files allowStudentsToCheckAnswerComponent, disablePreviousOptionComponent
|
6
6
|
const selectors = {
|
7
7
|
allowStudentToCheckAnswerLabel: () => cy.get('[data-ngie-testid="allow-student-to-check-answer-checkbox"] .MuiFormControlLabel-label'),
|
8
|
+
//Note: update after https://redmine.zeuslearning.com/issues/565666 gets resolved
|
8
9
|
allowStudentToCheckAnswerCheckbox: () => cy.get('[data-ngie-testid="allow-students-to-check-answer-checkbox"] input'),
|
9
10
|
maximumCheckAnswerAttemptsDropdownLabel: () => cy.get('#Maximum-check-answer-attempts-dropdown-label'),
|
10
11
|
maximumCheckAnswerAttemptsDropdown: () => cy.get('#Maximum-check-answer-attempts-select'),
|
@@ -18,7 +18,8 @@ const selectors = {
|
|
18
18
|
tableCell: () => cy.get('[class*="CellContainer"]'),
|
19
19
|
correctAnswerGrid: () => cy.get('.selection-grid-wrapper').last(),
|
20
20
|
tableRow: () => cy.get('[class*="wrapper-row"]'),
|
21
|
-
correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="CorrectAnswerHeader"]')
|
21
|
+
correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="CorrectAnswerHeader"]'),
|
22
|
+
penaltyPointsForEachIncorrectRowInputField: () => cy.get('input[aria-label="Penalty points for each incorrect row"]'),
|
22
23
|
}
|
23
24
|
|
24
25
|
const steps = {
|
@@ -74,6 +75,7 @@ const steps = {
|
|
74
75
|
utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyRow(), row).within(() => {
|
75
76
|
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column).within(() => {
|
76
77
|
gridQuestionCommonComponent.cellPropertyInputField()
|
78
|
+
.clear()
|
77
79
|
.type(text)
|
78
80
|
.blur();
|
79
81
|
});
|
@@ -361,7 +363,7 @@ const steps = {
|
|
361
363
|
verifyCorrectAnswerSectionNotExists: () => {
|
362
364
|
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.correctAnswersLabel(), 'notExist');
|
363
365
|
},
|
364
|
-
|
366
|
+
|
365
367
|
/**
|
366
368
|
* Verifies that the correct and incorrect icons do not exist and the background color of the option button is transparent in the preview tab.
|
367
369
|
* @param {Object} position - The position of the option button.
|
@@ -376,12 +378,34 @@ const steps = {
|
|
376
378
|
'background-color': css.color.transparent,
|
377
379
|
});
|
378
380
|
utilities.getNthElement(gridQuestionCommonComponent.optionsButton(), column).within(() => {
|
379
|
-
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), '
|
381
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'notExist');
|
380
382
|
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'notExist');
|
381
383
|
});
|
382
384
|
});
|
383
385
|
});
|
384
|
-
}
|
386
|
+
},
|
387
|
+
|
388
|
+
setQuestionGridLayoutForScoringFunctionalityTest: () => {
|
389
|
+
gridQuestionCommonComponent.steps.enterTextInCellPropertyInputField({ row: 0, column: 1 }, 'Is mammal');
|
390
|
+
gridQuestionCommonComponent.steps.enterTextInCellPropertyInputField({ row: 0, column: 2 }, 'Lays eggs');
|
391
|
+
gridQuestionCommonComponent.steps.enterTextInCellPropertyInputField({ row: 0, column: 3 }, 'Can fly');
|
392
|
+
gridQuestionCommonComponent.steps.enterTextInCellPropertyInputField({ row: 1, column: 0 }, 'Bat');
|
393
|
+
gridQuestionCommonComponent.steps.enterTextInCellPropertyInputField({ row: 2, column: 0 }, 'Ostrich');
|
394
|
+
gridQuestionCommonComponent.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Platypus');
|
395
|
+
gridQuestionCommonComponent.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Eagle');
|
396
|
+
},
|
397
|
+
|
398
|
+
/**
|
399
|
+
* @description Allots penalty points for each incorrect text container
|
400
|
+
* @param {number} points - The penalty points to be allotted for each text container.
|
401
|
+
*/
|
402
|
+
allotPenaltyPointsForEachIncorrectRow: (points) => {
|
403
|
+
gridQuestionCommonComponent.penaltyPointsForEachIncorrectRowInputField()
|
404
|
+
.clear()
|
405
|
+
.type(`${points}`)
|
406
|
+
.should('have.value', points)
|
407
|
+
.blur();
|
408
|
+
},
|
385
409
|
}
|
386
410
|
|
387
411
|
export const gridQuestionCommonComponent = {
|
@@ -59,3 +59,4 @@ export * from './gradingViewEnumerationComponent';
|
|
59
59
|
export * from './ariaLabelSectionComponent';
|
60
60
|
export * from './placeholderTextSectionComponent';
|
61
61
|
export * from './additionalSettingsAccessibilitySectionComponent';
|
62
|
+
export * from './specifyRowsAndColumnsComponent'
|