itemengine-cypress-automation 1.0.212-3JulyUpdates-c1934bd.0 → 1.0.213-5julyupdates-29d3df5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +5 -5
  2. package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +6 -6
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +3 -1
  4. package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +146 -0
  5. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -1
  6. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +2 -1
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +2 -1
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomization.js +700 -0
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomizationDraggableOptionsPanel.js +127 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCutomizationDraggableOptionProperties.js +253 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +2 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -1
  13. package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +2 -1
  14. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +2 -1
  15. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +2 -2
  16. package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +2 -2
  17. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +3 -6
  18. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +3 -1
  19. package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +261 -0
  20. package/cypress/e2e/ILC/MatchingDropdown/previewContentsForAllViews.smoke.js +124 -0
  21. package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +3 -1
  22. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +3 -1
  23. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +3 -2
  24. package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +2 -2
  25. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  26. package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -1
  27. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +1 -1
  28. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
  29. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
  30. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +7 -7
  31. package/cypress/pages/chartsDotPlotPage.js +22 -0
  32. package/cypress/pages/chartsLinePage.js +1 -0
  33. package/cypress/pages/essayResponsePage.js +73 -1
  34. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +550 -3
  35. package/cypress/pages/graphingPage.js +4 -0
  36. package/cypress/pages/matchingPage.js +189 -1
  37. package/package.json +1 -1
@@ -104,7 +104,7 @@ describe('Create item page - Charts - Bar: All or nothing ', () => {
104
104
  });
105
105
  };
106
106
 
107
- it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and your answer is incorrect status message should be displayed', () => {
107
+ it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and correct/incorrect status message should not be displayed', () => {
108
108
  if (view === 'Grading view') {
109
109
  studentViewPage.steps.submitResponse();
110
110
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -114,11 +114,11 @@ describe('Create item page - Charts - Bar: All or nothing ', () => {
114
114
  chartsBarPage.steps.switchToGradingView();
115
115
  chartsBarPage.steps.verifyPreviewScore(0, 20);
116
116
  }
117
- chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
117
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(0);
118
118
  chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
119
- chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
120
- chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
121
- chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
119
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(2);
120
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(3);
121
+ chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
122
122
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
123
123
  chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
124
124
  chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
@@ -102,7 +102,7 @@ describe('Create item page - Charts - Line: All or nothing ', () => {
102
102
  });
103
103
  };
104
104
 
105
- it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and your answer is incorrect status message should be displayed', () => {
105
+ it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and correct/incorrect status message should not be displayed', () => {
106
106
  if (view === 'Grading view') {
107
107
  studentViewPage.steps.submitResponse();
108
108
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -112,12 +112,12 @@ describe('Create item page - Charts - Line: All or nothing ', () => {
112
112
  chartsLinePage.steps.switchToGradingView();
113
113
  chartsLinePage.steps.verifyPreviewScore(0, 20);
114
114
  }
115
- chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
115
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(0);
116
116
  chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
117
- chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
118
- chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
119
- chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
120
- chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
117
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(2);
118
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(3);
119
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(4);
120
+ chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
121
121
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
122
122
  chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
123
123
  chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 6, range: 10 });
@@ -94,7 +94,7 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
94
94
  });
95
95
  };
96
96
 
97
- it('When the user selects \'Grading\' view without attempting the question, cell numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective cell numeration', () => {
97
+ it('When the user selects \'Grading\' view without attempting the question, cell numeration should be displayed, correct answers section should be displayed with correct answers, correct/incorrect status message should not be displayed and respective cell numeration', () => {
98
98
  if (view === 'Grading view') {
99
99
  studentViewPage.steps.submitResponse();
100
100
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -108,6 +108,8 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
108
108
  };
109
109
  dragAndDropIntoCategoriesPage.steps.verifyDropzoneCellNumeration(['1', '2', '3', '4', '5', '6']);
110
110
  utilities.verifyInnerText(dragAndDropIntoCategoriesPage.correctAnswersLabel(), 'Correct answers');
111
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
112
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsNotExist();
111
113
  dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale']], ['1', '2', '3', '4', '5']);
112
114
  });
113
115
 
@@ -0,0 +1,146 @@
1
+ import { essayResponsePage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('Create Item page - Short text response : Student view settings', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Student view settings : Edit tab contents, css and functionality', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ cy.log('Navigating to short text response question type');
15
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
16
+ cy.barsPreLoaderWait();
17
+ });
18
+
19
+ essayResponsePage.tests.verifyStudentViewSettingsLabelAndCSS();
20
+
21
+ essayResponsePage.tests.verifyAllowStudentsToCheckAnswerNotExist();
22
+
23
+ it('\'Display character count\' and \'Display word count\' label and checkboxes should be displayed and by default both checkboxes should be unchecked', () => {
24
+ utilities.verifyInnerText(essayResponsePage.displayCharacterCountLabel(), 'Display character count');
25
+ utilities.verifyElementVisibilityState(essayResponsePage.displayCharacterCountLabel(), 'visible');
26
+ utilities.verifyInnerText(essayResponsePage.displayWordCountLabel(), 'Display word count');
27
+ utilities.verifyElementVisibilityState(essayResponsePage.displayWordCountLabel(), 'visible');
28
+ utilities.verifyElementVisibilityState(essayResponsePage.displayWordCountCheckbox(), 'exist');
29
+ utilities.verifyElementVisibilityState(essayResponsePage.displayCharacterCountCheckbox(), 'exist');
30
+ essayResponsePage.steps.verifyDisplayWordCountCheckboxUnchecked();
31
+ essayResponsePage.steps.verifyDisplayCharacterCountCheckboxUnchecked();
32
+ });
33
+
34
+ it('\'Spell check\' functionality label and checkbox should be displayed and by default it should be checked', () => {
35
+ utilities.verifyInnerText(essayResponsePage.spellCheckLabel(), 'Spell check');
36
+ utilities.verifyElementVisibilityState(essayResponsePage.spellCheckLabel(), 'visible');
37
+ utilities.verifyElementVisibilityState(essayResponsePage.spellCheckCheckbox(), 'exist');
38
+ essayResponsePage.steps.verifySpellCheckCheckboxChecked();
39
+ });
40
+
41
+ it('When \'Word\' is selected in set limit section by default, then \'Display character count\' should be disabled and \'Display word count\' should be enabled', () => {
42
+ essayResponsePage.steps.verifyWordRadioButtonChecked();
43
+ utilities.verifyElementNotDisabled(essayResponsePage.displayWordCountLabel());
44
+ utilities.verifyElementDisabledClass(essayResponsePage.displayCharacterCountLabel());
45
+ });
46
+
47
+ it('User should be able to check \'Display word count\' checkbox', () => {
48
+ essayResponsePage.steps.checkDisplayWordCountCheckbox();
49
+ });
50
+
51
+ it('When \'Character\' is selected in set limit section by default, then \'Display character count\' should be enabled and \'Display word count\' should be disabled', () => {
52
+ essayResponsePage.steps.checkCharacterRadioButton();
53
+ utilities.verifyElementNotDisabled(essayResponsePage.displayCharacterCountLabel());
54
+ utilities.verifyElementDisabledClass(essayResponsePage.displayWordCountLabel());
55
+ });
56
+
57
+ it('User should be able to check \'Display character count\' checkbox', () => {
58
+ essayResponsePage.steps.checkDisplayCharacterCountCheckbox();
59
+ });
60
+
61
+ it('CSS of student view settings checkboxes in edit tab', { tags: 'css' }, () => {
62
+ utilities.verifyCSS(essayResponsePage.displayWordCountLabel(), {
63
+ 'color': css.color.labelText,
64
+ 'font-size': css.fontSize.normal,
65
+ 'font-weight': css.fontWeight.regular
66
+ });
67
+ utilities.verifyCSS(essayResponsePage.displayCharacterCountLabel(), {
68
+ 'color': css.color.labelText,
69
+ 'font-size': css.fontSize.normal,
70
+ 'font-weight': css.fontWeight.regular
71
+ });
72
+ utilities.verifyCSS(essayResponsePage.spellCheckLabel(), {
73
+ 'color': css.color.labelText,
74
+ 'font-size': css.fontSize.normal,
75
+ 'font-weight': css.fontWeight.regular
76
+ });
77
+ });
78
+
79
+ it('Accessibility of student view settings checkboxes', { tags: 'a11y' }, () => {
80
+ cy.checkAccessibility(essayResponsePage.displayWordCountLabel().parents('[class*="StudentOptionstyles__CheckBoxGroupWrapper"]'));
81
+ });
82
+ });
83
+
84
+ describe('Student view settings : Display character count, Display word count - Preview tab functionality', () => {
85
+ abortEarlySetup();
86
+ before(() => {
87
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
88
+ cy.barsPreLoaderWait();
89
+ essayResponsePage.steps.checkCharacterRadioButton();
90
+ });
91
+
92
+ it('When \'Display character count\' checkbox is unchecked, then \'Character\' label and count should not be displayed in preview tab', () => {
93
+ essayResponsePage.steps.verifyDisplayCharacterCountCheckboxUnchecked();
94
+ essayResponsePage.steps.switchToPreviewTab();
95
+ utilities.verifyElementVisibilityState(essayResponsePage.characterWordCountLabelPreviewTab(), 'notExist');
96
+ });
97
+
98
+ it('When \'Display character count\' checkbox is checked, then on switching to preview tab \'Character\' label and count should be displayed and count should be zero by default', () => {
99
+ essayResponsePage.steps.switchToEditTab();
100
+ essayResponsePage.steps.checkDisplayCharacterCountCheckbox();
101
+ essayResponsePage.steps.switchToPreviewTab();
102
+ utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Characters: 0');
103
+ utilities.verifyElementVisibilityState(essayResponsePage.characterWordCountLabelPreviewTab(), 'visible');
104
+ });
105
+
106
+ it('When user enters text in response field, then character count should be updated', () => {
107
+ essayResponsePage.steps.enterTextInResponseField('Flowers are blooming');
108
+ utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Characters: 18');
109
+ });
110
+
111
+ it('When user selects word in set limit section and checks \'Display word count\' checkbox , then \'Word\' label and count should be displayed in preview tab', () => {
112
+ essayResponsePage.steps.switchToEditTab();
113
+ essayResponsePage.steps.selectWordRadioButton();
114
+ essayResponsePage.steps.checkDisplayWordCountCheckbox();
115
+ essayResponsePage.steps.switchToPreviewTab();
116
+ utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Words: 0');
117
+ utilities.verifyElementVisibilityState(essayResponsePage.characterWordCountLabelPreviewTab(), 'visible');
118
+ });
119
+
120
+ it('When user enters text in response field, then character count should be updated', () => {
121
+ essayResponsePage.steps.enterTextInResponseField('Flowers are blooming');
122
+ utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Words: 3');
123
+ });
124
+ });
125
+
126
+ describe('Student view settings : Spell check - Preview tab functionality', () => {
127
+ abortEarlySetup();
128
+ before(() => {
129
+ essayResponsePage.steps.navigateToCreateQuestion('essay response');
130
+ cy.barsPreLoaderWait();
131
+ essayResponsePage.steps.uncheckSpellCheckCheckbox()
132
+ essayResponsePage.steps.switchToPreviewTab();
133
+ });
134
+
135
+ it('When the \'Spell check\' checkbox is unchecked, the response field should have \'spellcheck\' attribute set as \'false\' in preview tab', () => {
136
+ essayResponsePage.steps.verifySpellCheckOfResponseFieldPreviewTabDisabled();
137
+ });
138
+
139
+ it('When the \'Spell check\' checkbox is checked, the response field should have \'spellcheck\' attribute set as \'true\' in the preview tab', () => {
140
+ essayResponsePage.steps.switchToEditTab();
141
+ essayResponsePage.steps.checkSpellCheckCheckbox();
142
+ essayResponsePage.steps.switchToPreviewTab();
143
+ essayResponsePage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled();
144
+ });
145
+ });
146
+ });
@@ -94,7 +94,7 @@ describe('Create item page - Fill in the gaps - drag and drop: All or nothing ',
94
94
  });
95
95
  };
96
96
 
97
- it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
97
+ it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed and respective option numeration', () => {
98
98
  if (view === 'Grading view') {
99
99
  studentViewPage.steps.submitResponse();
100
100
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -108,6 +108,7 @@ describe('Create item page - Fill in the gaps - drag and drop: All or nothing ',
108
108
  };
109
109
  fillInTheGapsDragAndDropPage.steps.verifyDropzoneNumeration();
110
110
  utilities.verifyInnerText(fillInTheGapsDragAndDropPage.correctAnswersLabel(), 'Correct answers');
111
+ fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
111
112
  fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
112
113
  });
113
114
 
@@ -94,7 +94,7 @@ describe('Create item page - Fill in the gaps with dropdown: All or nothing ', (
94
94
  });
95
95
  };
96
96
 
97
- it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
97
+ it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
98
98
  if (view === 'Grading view') {
99
99
  studentViewPage.steps.submitResponse();
100
100
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -108,6 +108,7 @@ describe('Create item page - Fill in the gaps with dropdown: All or nothing ', (
108
108
  };
109
109
  fillInTheGapsDropdownPage.steps.verifyDropdownNumerationPreviewTab();
110
110
  utilities.verifyInnerText(fillInTheGapsDropdownPage.correctAnswersLabel(), 'Correct answers');
111
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
111
112
  fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
112
113
  });
113
114
 
@@ -102,7 +102,7 @@ describe('Create item page - Fill in the gaps over image - drag and drop: All or
102
102
  });
103
103
  };
104
104
 
105
- it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
105
+ it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
106
106
  if (view === 'Grading view') {
107
107
  studentViewPage.steps.submitResponse();
108
108
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -116,6 +116,7 @@ describe('Create item page - Fill in the gaps over image - drag and drop: All or
116
116
  };
117
117
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneNumeration();
118
118
  utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.correctAnswersLabel(), 'Correct answers');
119
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
119
120
  fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
120
121
  });
121
122