itemengine-cypress-automation 1.0.157 → 1.0.158

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/customizePlaybackControls.js +1 -1
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +49 -1
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -1
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/manuallyAndNonScoredScoring.js +1 -8
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +7 -7
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -4
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettingsForGroupedLayout.js +1 -1
  8. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +11 -8
  9. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +5 -5
  10. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +2 -1
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +1 -1
  12. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +0 -5
  13. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +1 -0
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +10 -10
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/specifyCorrectAnswerSection.js +1 -1
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +0 -5
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +1 -0
  18. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +3 -3
  19. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +4 -4
  20. package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +4 -4
  21. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +1 -0
  22. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +2 -2
  23. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  24. package/cypress/e2e/ILC/Matching/draggableOptions.js +53 -0
  25. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +302 -0
  26. package/cypress/e2e/ILC/MultipleSelectionGridNew/additionalSettingsBasic.js +146 -0
  27. package/cypress/e2e/ILC/MultipleSelectionGridNew/headerSection.js +83 -0
  28. package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +18 -22
  29. package/cypress/e2e/ILC/Ruler/rulerEditTabFunctionality.js +1 -2
  30. package/cypress/e2e/ILC/SingleSelectionGridNew/additionalSettingsBasic.js +146 -0
  31. package/cypress/e2e/ILC/SingleSelectionGridNew/headerSection.js +83 -0
  32. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -1
  33. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +1 -1
  34. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
  35. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +6 -0
  36. package/cypress/fixtures/evaluationMethodsAndCustomSettings.js +1 -1
  37. package/cypress/pages/components/autoScoredScoringPreviewTab.js +6 -0
  38. package/cypress/pages/components/commonComponents.js +2 -1
  39. package/cypress/pages/components/createCustomCategoryFlyout.js +0 -1
  40. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +4 -4
  41. package/cypress/pages/components/gridQuestionCommonComponent.js +29 -1
  42. package/cypress/pages/components/imageCanvasComponent.js +3 -3
  43. package/cypress/pages/components/questionInputFieldComponent.js +1 -1
  44. package/cypress/pages/dragAndDropIntoCategoriesPage.js +3 -4
  45. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +10 -0
  46. package/cypress/pages/graphingPage.js +4 -4
  47. package/cypress/pages/index.js +0 -3
  48. package/cypress/pages/matchingPage.js +166 -10
  49. package/cypress/pages/multipleSelectionGridPage.js +10 -2
  50. package/cypress/pages/rulerPage.js +12 -12
  51. package/cypress/pages/singleSelectionGridPage.js +10 -2
  52. package/cypress/pages/textEntryMathPage.js +2 -1
  53. package/package.json +1 -1
  54. package/cypress/pages/listMatchingPage.js +0 -1514
  55. package/cypress/pages/listMatchingScoring.js +0 -2547
  56. package/cypress/pages/passagePage.js +0 -436
@@ -76,15 +76,14 @@ describe('Create Item page - Ruler: Edit Tab', () => {
76
76
  rulerPage.steps.verifyDropdownIsCollapsed();
77
77
  });
78
78
 
79
- it(`'Length of ruler' label and dropdown should be displayed and by default ${rulerOptions[0].lengthOfRuler[0]} should be selected`, () => {
79
+ it(`'Length of ruler' label and options should be displayed and by default ${rulerOptions[0].lengthOfRuler[0]} should be selected`, () => {
80
80
  utilities.verifyInnerText(rulerPage.lengthOfRulerLabel(), 'Length of ruler');
81
81
  utilities.verifyElementVisibilityState(rulerPage.lengthOfRulerLabel(), 'visible');
82
- rulerPage.steps.verifyInnerTextOfLengthOfRulerDropdown(rulerOptions[0].lengthOfRuler[0]);
83
- utilities.verifyElementVisibilityState(rulerPage.lengthOfRulerDropdown(), 'exist');
82
+ rulerPage.steps.verifySelectedLengthOfRulerOption(rulerOptions[0].lengthOfRuler[0]);
84
83
  });
85
84
 
86
- it(`When user expands the \'Length of ruler\' dropdown then list with three options ${rulerOptions[0].lengthOfRuler} should be displayed`, () => {
87
- rulerPage.steps.verifyLengthOfRulerDropdownListOptions(rulerOptions[0].lengthOfRuler);
85
+ it(`\'Length of ruler\' label with three options ${rulerOptions[0].lengthOfRuler} should be displayed`, () => {
86
+ rulerPage.steps.verifyLengthOfRulerOptions(rulerOptions[0].lengthOfRuler);
88
87
  });
89
88
 
90
89
  it('CSS of \'Length of ruler\' label and dropdown in active state', { tags: 'css' }, () => {
@@ -93,13 +92,13 @@ describe('Create Item page - Ruler: Edit Tab', () => {
93
92
  'font-size': css.fontSize.normal,
94
93
  'font-weight': css.fontWeight.semibold
95
94
  });
96
- utilities.verifyCSS(rulerPage.lengthOfRulerDropdownListOptions(rulerOptions[0].lengthOfRuler[0]), {
95
+ utilities.verifyCSS(rulerPage.lengthOfRulerOptions(rulerOptions[0].lengthOfRuler[0]), {
97
96
  'color': css.color.liText,
98
97
  'font-size': css.fontSize.default,
99
98
  'font-weight': css.fontWeight.regular,
100
99
  'background-color': css.color.liTextSelectedBg
101
100
  });
102
- utilities.verifyCSS(rulerPage.lengthOfRulerDropdownListOptions(rulerOptions[0].lengthOfRuler[1]), {
101
+ utilities.verifyCSS(rulerPage.lengthOfRulerOptions(rulerOptions[0].lengthOfRuler[1]), {
103
102
  'color': css.color.liText,
104
103
  'font-size': css.fontSize.default,
105
104
  'font-weight': css.fontWeight.regular
@@ -107,13 +106,12 @@ describe('Create Item page - Ruler: Edit Tab', () => {
107
106
  });
108
107
 
109
108
  it('Accessibility of\'Length of ruler\' dropdown', { tags: 'a11y' }, () => {
110
- cy.checkAccessibility(rulerPage.lengthOfRulerDropdownListOptions());
109
+ cy.checkAccessibility(rulerPage.lengthOfRulerOptions());
111
110
  });
112
111
 
113
- it('When user selects an option from \'Length of ruler\' dropdown list, then dropdown list should disappear and selected option should be the active selection for the dropdown', () => {
114
- rulerPage.steps.selectOptionFromLengthOfRulerDropdown(rulerOptions[0].lengthOfRuler[0]);
115
- rulerPage.steps.verifyDropdownIsCollapsed();
116
- rulerPage.steps.verifyInnerTextOfLengthOfRulerDropdown(rulerOptions[0].lengthOfRuler[0]);
112
+ it('When user selects an option from \'Length of ruler\' list, then selected option should be the active selection', () => {
113
+ rulerPage.steps.selectOptionFromLengthOfRulerOptions(rulerOptions[0].lengthOfRuler[0]);
114
+ rulerPage.steps.verifySelectedLengthOfRulerOption(rulerOptions[0].lengthOfRuler[0]);
117
115
  });
118
116
 
119
117
  rulerOptions.forEach((rulerOption) => {
@@ -124,19 +122,17 @@ describe('Create Item page - Ruler: Edit Tab', () => {
124
122
  rulerPage.steps.verifyInnerTextOfUnitOfMeasurementDropdown(rulerOption.displayName);
125
123
  });
126
124
 
127
- it(`When ${rulerOption.displayName} is the active selection for 'Unit of measurement' dropdown, then ${rulerOption.lengthOfRuler[0]} should be the active selection for 'Length of ruler' dropdown`, () => {
128
- rulerPage.steps.verifyInnerTextOfLengthOfRulerDropdown(rulerOption.lengthOfRuler[0]);
125
+ it(`When ${rulerOption.displayName} is the active selection for 'Unit of measurement' dropdown, then ${rulerOption.lengthOfRuler[0]} should be the active selection for 'Length of ruler' options list`, () => {
126
+ rulerPage.steps.verifySelectedLengthOfRulerOption(rulerOption.lengthOfRuler[0]);
129
127
  });
130
128
 
131
- it(`When user expands the 'Length of ruler' dropdown, then a list with three options ${rulerOption.lengthOfRuler} should be displayed`, () => {
132
- rulerPage.steps.expandLengthOfRulerDropdown();
133
- rulerPage.steps.verifyLengthOfRulerDropdownListOptions(rulerOption.lengthOfRuler);
129
+ it(`'Length of ruler' list should be displayed with three options ${rulerOption.lengthOfRuler}`, () => {
130
+ rulerPage.steps.verifyLengthOfRulerOptions(rulerOption.lengthOfRuler);
134
131
  });
135
132
 
136
- it(`When user selects an option from 'Length of ruler' dropdown list, then dropdown list should disappear and the selected option should be the active selection for the dropdown`, () => {
137
- rulerPage.steps.selectOptionFromLengthOfRulerDropdown(rulerOption.lengthOfRuler[1]);
138
- rulerPage.steps.verifyDropdownIsCollapsed();
139
- rulerPage.steps.verifyInnerTextOfLengthOfRulerDropdown(rulerOption.lengthOfRuler[1]);
133
+ it(`When user selects an option from 'Length of ruler' list, then selected option should be the active selection for the dropdown`, () => {
134
+ rulerPage.steps.selectOptionFromLengthOfRulerOptions(rulerOption.lengthOfRuler[1]);
135
+ rulerPage.steps.verifySelectedLengthOfRulerOption(rulerOption.lengthOfRuler[1]);
140
136
  });
141
137
  });
142
138
 
@@ -189,7 +185,7 @@ describe('Create Item page - Ruler: Edit Tab', () => {
189
185
 
190
186
  it('\'Length of ruler\' label, \'Length of ruler\' dropdown and \'Allow student to flip ruler\' label with checkbox should disappear', () => {
191
187
  utilities.verifyElementVisibilityState(rulerPage.lengthOfRulerLabel(), 'notExist');
192
- utilities.verifyElementVisibilityState(rulerPage.lengthOfRulerDropdown(), 'notExist');
188
+ utilities.verifyElementVisibilityState(rulerPage.lengthOfRulerOptions(), 'notExist');
193
189
  utilities.verifyElementVisibilityState(rulerPage.allowUserToFlipRulerLabel(), 'notExist');
194
190
  utilities.verifyElementVisibilityState(rulerPage.allowUserToFlipRulerCheckbox(), 'notExist');
195
191
  });
@@ -49,8 +49,7 @@ describe('Ruler: Edit tab functionality', () => {
49
49
  it(`When the user adjusts the ruler length in the 'Length of Ruler' dropdown in the edit tab, then the length of ruler should also change in the preview tab`, () => {
50
50
  cy.log('Switching to Edit Tab');
51
51
  rulerPage.steps.switchToEditTab();
52
- rulerPage.steps.expandLengthOfRulerDropdown();
53
- rulerPage.steps.selectOptionFromLengthOfRulerDropdown(rulerOption.lengthOfRuler[1]);
52
+ rulerPage.steps.selectOptionFromLengthOfRulerOptions(rulerOption.lengthOfRuler[1]);
54
53
  cy.log('Switching to Preview Tab');
55
54
  rulerPage.steps.switchToPreviewTab();
56
55
  rulerPage.steps.verifyRulerVisible();
@@ -0,0 +1,146 @@
1
+ import { singleSelectionGridPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
5
+ const headingFontSizes = { 'Tiny': '13.5px', 'Small': '15.75px', 'Default': '18px', 'Normal': '20.25px', 'Big': '24.75px', 'Huge': '29.25px' };
6
+
7
+ describe('Single selection grid - Additional settings', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Additional settings accordion', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
16
+ cy.barsPreLoaderWait();
17
+ });
18
+
19
+ singleSelectionGridPage.tests.verifyAdditionalSettingsAccordionProperties();
20
+ });
21
+
22
+ describe('Additional settings: Font size - Contents in edit tab', () => {
23
+ abortEarlySetup();
24
+ before(() => {
25
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
26
+ cy.barsPreLoaderWait();
27
+ singleSelectionGridPage.steps.expandAdditionalSettings();
28
+ });
29
+
30
+ singleSelectionGridPage.tests.verifyFontSizeSectionContents();
31
+ });
32
+
33
+ describe('Additional settings: Font size - functionality in edit tab', () => {
34
+ abortEarlySetup();
35
+ before(() => {
36
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
37
+ cy.barsPreLoaderWait();
38
+ singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
39
+ singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
40
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
41
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
42
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
43
+ singleSelectionGridPage.steps.expandAdditionalSettings();
44
+ });
45
+
46
+ Object.keys(fontSizes).forEach((option) => {
47
+ it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the question grid in the specify correct answer section should change to ${fontSizes[option]} accordingly`, () => {
48
+ singleSelectionGridPage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
49
+ utilities.verifyInnerText(singleSelectionGridPage.fontSizeDropdown(), `${option}`);
50
+ singleSelectionGridPage.gridSpecifyCorrectAnswerSection()
51
+ .within(() => {
52
+ utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell(), 3).find('.question-text-wrapper'), {
53
+ 'font-size': headingFontSizes[option]
54
+ });
55
+ utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell(), 6).find('.question-text-wrapper'), {
56
+ 'font-size': fontSizes[option]
57
+ });
58
+ utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell(), 9).find('.question-text-wrapper'), {
59
+ 'font-size': fontSizes[option]
60
+ });
61
+ });
62
+ });
63
+ });
64
+ });
65
+
66
+ describe('Additional settings: Font size - functionality in preview tab', () => {
67
+ abortEarlySetup();
68
+ before(() => {
69
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
70
+ cy.barsPreLoaderWait();
71
+ singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
72
+ singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
73
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
74
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
75
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
76
+ singleSelectionGridPage.steps.expandAdditionalSettings();
77
+ });
78
+
79
+ Object.keys(fontSizes).forEach((option) => {
80
+ it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${fontSizes[option]} accordingly`, () => {
81
+ singleSelectionGridPage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
82
+ utilities.verifyInnerText(singleSelectionGridPage.fontSizeDropdown(), `${option}`);
83
+ singleSelectionGridPage.steps.switchToPreviewTab();
84
+ utilities.verifyCSS(singleSelectionGridPage.questionInstructionsText(), {
85
+ 'font-size': fontSizes[option]
86
+ });
87
+ singleSelectionGridPage.gridPreviewTab()
88
+ .within(() => {
89
+ utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell(), 3).find('.question-text-wrapper'), {
90
+ 'font-size': headingFontSizes[option]
91
+ });
92
+ utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell(), 6).find('.question-text-wrapper'), {
93
+ 'font-size': fontSizes[option]
94
+ });
95
+ utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell(), 9).find('.question-text-wrapper'), {
96
+ 'font-size': fontSizes[option]
97
+ });
98
+ });
99
+ singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }])
100
+ singleSelectionGridPage.steps.switchToGradingView();
101
+ utilities.verifyCSS(singleSelectionGridPage.correctAnswersSectionLabel(), {
102
+ 'font-size': fontSizes[option]
103
+ });
104
+ singleSelectionGridPage.correctAnswerGrid()
105
+ .within(() => {
106
+ utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell(), 3).find('.question-text-wrapper'), {
107
+ 'font-size': headingFontSizes[option]
108
+ });
109
+ utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell(), 6).find('.question-text-wrapper'), {
110
+ 'font-size': fontSizes[option]
111
+ });
112
+ utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell(), 9).find('.question-text-wrapper'), {
113
+ 'font-size': fontSizes[option]
114
+ });
115
+ });
116
+ utilities.verifyCSS(singleSelectionGridPage.correctIncorrectStatusMessageText(), {
117
+ 'font-size': fontSizes[option]
118
+ });
119
+ singleSelectionGridPage.steps.switchToStudentView();
120
+ singleSelectionGridPage.steps.switchToEditTab();
121
+ });
122
+ });
123
+ });
124
+
125
+ describe('Additional settings: Accessibility section', () => {
126
+ abortEarlySetup();
127
+ before(() => {
128
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
129
+ cy.barsPreLoaderWait();
130
+ singleSelectionGridPage.steps.expandAdditionalSettings();
131
+ });
132
+
133
+ singleSelectionGridPage.tests.verifyAdditionalSettingsAccessibilitySection();
134
+ });
135
+
136
+ describe('Additional Settings: Details section', () => {
137
+ abortEarlySetup();
138
+ before(() => {
139
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
140
+ cy.barsPreLoaderWait();
141
+ singleSelectionGridPage.steps.expandAdditionalSettings();
142
+ });
143
+
144
+ singleSelectionGridPage.tests.verifyDetailsSection();
145
+ });
146
+ });
@@ -0,0 +1,83 @@
1
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
2
+ import { dialogBoxBase, singleSelectionGridPage } from "../../../pages";
3
+ import utilities from "../../../support/helpers/utilities";
4
+
5
+ describe('Create item page - Single selection grid: Header section and Saving question', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Header section contents', () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
14
+ });
15
+
16
+ singleSelectionGridPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Single selection grid');
17
+ });
18
+
19
+ describe('Tabs section', () => {
20
+ abortEarlySetup();
21
+ before(() => {
22
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
23
+ });
24
+
25
+ singleSelectionGridPage.tests.verifyTabsSection();
26
+ });
27
+
28
+ describe('Cancel button', () => {
29
+ abortEarlySetup();
30
+ before(() => {
31
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
32
+ });
33
+
34
+ singleSelectionGridPage.tests.verifyCancelButton('single selection grid')
35
+ });
36
+
37
+ describe('Save Question button', () => {
38
+ abortEarlySetup();
39
+ before(() => {
40
+ singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
41
+ cy.barsPreLoaderWait();
42
+ });
43
+
44
+ describe('Validation error messages', () => {
45
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
46
+
47
+ it('Validation error messages should be displayed below required input fields', () => {
48
+ singleSelectionGridPage.steps.verifyQuestionInstructionsErrorMessage();
49
+ utilities.verifyInnerText(utilities.getNthElement(singleSelectionGridPage.errorMessage(), 1), 'Error: Please enter some text.');
50
+ utilities.verifyInnerText(utilities.getNthElement(singleSelectionGridPage.errorMessage(), 2), 'Error: Please enter points.');
51
+ for (let index = 1; index < 4; index++) {
52
+ singleSelectionGridPage.steps.verifyErrorIconInSpecifyColumnsAndRowsGrid(index);
53
+ }
54
+ singleSelectionGridPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
55
+ singleSelectionGridPage.steps.verifySpecifyCorrectAnswerErrorMessage();
56
+ });
57
+
58
+ it('Validation error messages should disappear when required input fields are filled', () => {
59
+ singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
60
+ singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
61
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
62
+ singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
63
+ singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
64
+ singleSelectionGridPage.steps.allotPoints(10);
65
+ for (let index = 1; index < 4; index++) {
66
+ singleSelectionGridPage.steps.verifyErrorIconInSpecifyColumnsAndRowsGridNotExists(index);
67
+ }
68
+ singleSelectionGridPage.steps.verifyErrorMessageIsNotDisplayed();
69
+ singleSelectionGridPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
70
+ });
71
+
72
+ singleSelectionGridPage.tests.verifyCreateItemWrapperContentsA11y();
73
+ });
74
+
75
+ describe('Saving a question', () => {
76
+ it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
77
+ singleSelectionGridPage.steps.saveAQuestionAndVerifySnackbar();
78
+ });
79
+
80
+ singleSelectionGridPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
81
+ });
82
+ });
83
+ });
@@ -243,7 +243,8 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
243
243
  it('When number of answer input fields is reduced to 1, then input field numeration and its delete button should not be displayed', () => {
244
244
  cy.log('Pre-step: Reduce number of answer input fields to 1');
245
245
  textEntryMathPage.steps.clickOnAnswerInputDeleteButton(0);
246
- utilities.verifyElementCount(textEntryMathPage.answersInputField(), 2);
246
+ textEntryMathPage.steps.clickOnAnswerInputDeleteButton(0);
247
+ utilities.verifyElementCount(textEntryMathPage.answersInputField(), 1);
247
248
  textEntryMathPage.steps.verifyAnswerInputFieldNumerationAndDeleteButtonNotExists();
248
249
  });
249
250
  });
@@ -198,7 +198,7 @@ describe('Tool settings content for all views', () => {
198
198
  });
199
199
 
200
200
  //Failed due to https://redmine.zeuslearning.com/issues/557552
201
- it.skip('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
201
+ it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
202
202
  cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
203
203
  });
204
204
 
@@ -32,7 +32,7 @@ export const drawingToolbarOptionsAndAdditionalOptions = {
32
32
  toolType: 'dialog'
33
33
  },
34
34
  {
35
- displayName: 'Upload image',
35
+ displayName: 'Insert image',
36
36
  tooltipText: 'Upload an imageUpload an image from your device',
37
37
  toolType: 'dialog'
38
38
  },
@@ -62,6 +62,12 @@ export const equationEditorCategoriesAndSymbols = {
62
62
  ariaLabel: 'Zero',
63
63
  displayText: '0'
64
64
  },
65
+ percent: {
66
+ title: 'Percentage',
67
+ textElement: null,
68
+ ariaLabel: 'Percentage',
69
+ displayText: '%'
70
+ },
65
71
  dotMultiplier: {
66
72
  title: 'Dot Multiplier',
67
73
  textElement: null,
@@ -1,6 +1,6 @@
1
1
  export const evaluationMethods = [
2
2
  {
3
- name: 'Symbols are equivalent',
3
+ name: 'Symbols are equivalent.',
4
4
  description: 'Response inputted needs to be equivalent to be marked correct',
5
5
  answerInputField: 'true',
6
6
  customSettings: ['Case sensitive', 'Accept interval notation', 'Exclude LaTeX text from validation', 'Check for equality across sides', 'Interpret alphabets as variables', 'Interpret e as Euler\'s number', 'Interpret i as imaginary', 'Decimal separator', 'Thousands separator', 'Decimal places to be compared'],
@@ -263,6 +263,12 @@ const tests = {
263
263
  it('Accessibility of disabled Check Answer button', { tags: 'a11y' }, () => {
264
264
  cy.checkAccessibility(autoScoredScoringPreviewTab.checkAnswerButton());
265
265
  });
266
+ },
267
+
268
+ verifyGradingViewRadioButtonDisabledStateForManuallyScored: () => {
269
+ it('When the scoring type is set to "Manually scored", then the grading view radio button should be in disabled state', () => {
270
+ utilities.verifyElementDisabledClass(autoScoredScoringPreviewTab.gradingViewRadioButton().parents('[class*="RadioOptionContainer"]'));
271
+ })
266
272
  }
267
273
  }
268
274
 
@@ -13,7 +13,8 @@ const selectors = {
13
13
  dropdownList: () => cy.get('.dropdown-list'),
14
14
  dragHandleButton: () => cy.get('.dragicon-button'),
15
15
  deleteButton: () => cy.get('button[aria-label*="Delete option"]'),
16
- tickIconForOptionButtons: () => cy.get('.ngie-toggle-button-tick-icon')
16
+ tickIconForOptionButtons: () => cy.get('.ngie-toggle-button-tick-icon'),
17
+ errorIcon: () => cy.get('[id="Icon_material-error"]'),
17
18
  }
18
19
 
19
20
  const steps = {
@@ -7,7 +7,6 @@ const allCategories = Object.keys(equationEditorCategoriesAndSymbols)
7
7
  const selectors = {
8
8
  ...dialogBoxBase,
9
9
  createCustomCategoryButton: () => cy.get('.equation-editor-wrapper button'),
10
- createCustomCategoryFlyoutTitle: () => cy.get('.custom-category-popup-header'),
11
10
  categoryNameLabel: () => cy.get('.custom-category-flyout-content .input-label').eq(0),
12
11
  categoryIconLabel: () => cy.get('.custom-category-flyout-content .input-label').eq(1),
13
12
  selectedSymbolsLabel: () => cy.get('.custom-category-flyout-content .input-label').eq(2),
@@ -396,16 +396,16 @@ const steps = {
396
396
  },
397
397
 
398
398
  compareDropdownMenuAndDropdownWidthForUserSpecifiedWidth: () => {
399
- let dropdownWidth
399
+ let dropdownWidth;
400
400
  utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection(), 0)
401
401
  .then(($originalDropdownWidth) => {
402
- dropdownWidth = $originalDropdownWidth.css('width'); //Storing original dropdown width
402
+ dropdownWidth = parseFloat($originalDropdownWidth.css('width')); //Storing original dropdown width as a numeric value
403
403
  });
404
404
  fillInTheGapsDropdownCommonComponent.steps.expandDropdownInSpecifyCorrectAnswerSection(0);
405
405
  fillInTheGapsDropdownCommonComponent.dropdownList()
406
406
  .then(($dropdownMenuWidth) => {
407
- let dropdownMenuWidth = $dropdownMenuWidth.css('max-width');
408
- expect(dropdownMenuWidth).to.be.eq(dropdownWidth); //Comparing dropdown menu and dropdown width
407
+ let dropdownMenuWidth = $dropdownMenuWidth[0].offsetWidth;
408
+ expect(dropdownMenuWidth).to.be.closeTo(dropdownWidth, 1); // Comparing dropdown menu and dropdown width with a tolerance of 1px
409
409
  });
410
410
  },
411
411
 
@@ -23,7 +23,7 @@ const selectors = {
23
23
  tableCell: () => cy.get('[class*="CellContainer"]'),
24
24
  correctAnswerGrid: () => cy.get('.correct-ans-selection-grid'),
25
25
  tableRow: () => cy.get('[class*="wrapper-row"]'),
26
- correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="CorrectAnswerHeader"]'),
26
+ correctAnswersSectionLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="CorrectAnswerHeader"]'),
27
27
  penaltyPointsForEachIncorrectRowInputField: () => cy.get('input[aria-label="Penalty points for each incorrect row"]'),
28
28
  pointsPerRowLabel: () => cy.get('.selection-grid-partial-points-per-response-label'),
29
29
  enableRowHeadingLabel: () => cy.get('[data-ngie-testid="enable-row-heading-checkbox"] [class*="label"]'),
@@ -657,6 +657,34 @@ const steps = {
657
657
  });
658
658
  return questionsArray;
659
659
  },
660
+
661
+ /**
662
+ * Verifies the presence of an error icon in the specified row of the Specify Columns and Rows grid.
663
+ * @param {number} rowIndex - The index of the row to verify.
664
+ */
665
+ verifyErrorIconInSpecifyColumnsAndRowsGrid: (rowIndex) => {
666
+ utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyRow(), rowIndex)
667
+ .within(() => {
668
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), 0)
669
+ .within(() => {
670
+ utilities.verifyElementVisibilityState(commonComponents.errorIcon(), 'visible');
671
+ });
672
+ });
673
+ },
674
+
675
+ /**
676
+ * Verifies the absence of an error icon in the specified row of the Specify Columns and Rows grid.
677
+ * @param {number} rowIndex - The index of the row to verify.
678
+ */
679
+ verifyErrorIconInSpecifyColumnsAndRowsGridNotExists: (rowIndex) => {
680
+ utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyRow(), rowIndex)
681
+ .within(() => {
682
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), 0)
683
+ .within(() => {
684
+ utilities.verifyElementVisibilityState(commonComponents.errorIcon(), 'notExist');
685
+ });
686
+ });
687
+ }
660
688
  }
661
689
 
662
690
  const tests = {
@@ -251,12 +251,12 @@ const steps = {
251
251
 
252
252
  verifyNoImageAlternativeTextPresentInPreviewTab: () => {
253
253
  imageCanvasComponent.canvasImageInPreviewTab()
254
- .should('have.attr', 'alt', '');
254
+ .should('have.attr', 'alt', 'highlightImage.jpg');
255
255
  },
256
256
 
257
257
  verifyNoImageAlternativeTextPresentInEditTab: () => {
258
258
  imageCanvasComponent.canvasImage()
259
- .should('have.attr', 'alt', '');
259
+ .should('have.attr', 'alt', 'highlightImage.jpg');
260
260
  },
261
261
 
262
262
  verifyImageFitsToCanvas: () => {
@@ -979,7 +979,7 @@ const tests = {
979
979
 
980
980
  it('When user clears text in the \'Alternative text\' input field, then default alternative text should be displayed for canvas image', () => {
981
981
  imageCanvasComponent.steps.clearImageAlternativeTextInputFieldText();
982
- imageCanvasComponent.steps.verifyNoImageAlternativeTextPresentInPreviewTab();
982
+ imageCanvasComponent.steps.verifyNoImageAlternativeTextPresentInEditTab();
983
983
  });
984
984
  },
985
985
 
@@ -138,7 +138,7 @@ const tests = {
138
138
  questionInputFieldComponent.steps.clearQuestionInputField();
139
139
  questionInputFieldComponent.steps.verifyQuestionInputFieldPlaceholder();
140
140
  questionInputFieldComponent.steps.addInputToQuestionInputField('Lorem Ipsum');
141
- utilities.verifyInnerText(questionInputFieldComponent.questionInputField(), 'Lorem Ipsum');
141
+ utilities.verifyTextContent(questionInputFieldComponent.questionInputField(), 'Lorem Ipsum');
142
142
  questionInputFieldComponent.steps.verifyQuestionInputFieldPlaceholderNotDisplayed();
143
143
  });
144
144
  },
@@ -67,8 +67,8 @@ const selectors = {
67
67
  //Specify correct answer matrix
68
68
  tableCellContainerSpecifyCorrectAnswerSection: () => cy.get('[class*="DragAndDropMatrixstyles__CellContainer"]'),
69
69
  tableRowContainerSpecifyCorrectAnswerSection: () => cy.get('[class*="DragAndDropMatrixstyles__RowContainer"]'),
70
- leftArrowNavigationButtonSpecifyCorrectAnswerSection: () => cy.get('[aria-label="Left Pagination Button"][class*="DragAndDropMatrixstyles__PaginationControl"]').last(),
71
- rightArrowNavigationButtonSpecifyCorrectAnswerSection: () => cy.get('[aria-label="Right Pagination Button"][class*="DragAndDropMatrixstyles__PaginationControl"]').last(),
70
+ leftArrowNavigationButtonSpecifyCorrectAnswerSection: () => cy.get('.classification-set-correct-answer-wrapper [aria-label="Left Pagination Button"]'),
71
+ rightArrowNavigationButtonSpecifyCorrectAnswerSection: () => cy.get('.classification-set-correct-answer-wrapper [aria-label="Right Pagination Button"]'),
72
72
  tableCellLabel: () => cy.get('.cell-label'),
73
73
 
74
74
  //Additional Settings
@@ -92,8 +92,7 @@ const selectors = {
92
92
  addRowButton: () => cy.get('[aria-label="Rows"] [aria-label*="Increase count"]'),
93
93
  deleteColumnButton: () => cy.get('[aria-label="Columns"] [aria-label*="Decrease count"]'),
94
94
  deleteRowButton: () => cy.get('[aria-label="Rows"] [aria-label*="Decrease count"]'),
95
- //Note: Need to update selector after https://redmine.zeuslearning.com/issues/556753 gets fixed
96
- penaltyPointsForIncorrectDropzoneInputField: () => cy.get('input[aria-label="penalty points for each incorrect option"]'),
95
+ penaltyPointsForIncorrectDropzoneInputField: () => cy.get('input[aria-label="Penalty points for each incorrect dropzone"]'),
97
96
  penaltyPointsForIncorrectOptionInputField: () => cy.get('input[aria-label="penalty points for each incorrect option"]'),
98
97
  penaltyPointsForEachIncorrectOptionOrDropzoneLabel: () => cy.get('[class*="PenaltyScoreForEachIncorrectstyles__PointsLabel"]'),
99
98
  tableOuterBorder: () => cy.get('.table-border'),
@@ -174,6 +174,16 @@ const steps = {
174
174
  .click();
175
175
  },
176
176
 
177
+ clickAndDropGroupedOptionInOptionsContainerInSpecifyCorrectAnswerSection: (optionText) => {
178
+ fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
179
+ .contains(optionText)
180
+ .click({ force: true });
181
+ draggableOptionContainer.groupedOptionsContainerSpecifyCorrectAnswerSection()
182
+ .find('[class*="DraggableGroupItemsstyle__DraggableWrapper"]')
183
+ .eq(0)
184
+ .click();
185
+ },
186
+
177
187
  /**
178
188
  * @description Verifies that the image in the Preview tab has the correct source and alt text.
179
189
  * @param {number} optionIndex - The index of the option in the Preview tab.
@@ -885,9 +885,9 @@ const steps = {
885
885
  .should('have.value', xTickInterval)
886
886
  },
887
887
 
888
- verifyXDisplayAxisCheckboxChecked: () => {
888
+ verifyXDisplayAxisCheckboxUnchecked: () => {
889
889
  graphingPage.xDisplayAxisCheckbox()
890
- .should('be.checked')
890
+ .should('not.be.checked')
891
891
  },
892
892
 
893
893
  uncheckXDisplayAxisCheckbox: () => {
@@ -1004,9 +1004,9 @@ const steps = {
1004
1004
  .should('have.value', yTickInterval)
1005
1005
  },
1006
1006
 
1007
- verifyYDisplayAxisCheckboxChecked: () => {
1007
+ verifyYDisplayAxisCheckboxUnchecked: () => {
1008
1008
  graphingPage.yDisplayAxisCheckbox()
1009
- .should('be.checked')
1009
+ .should('not.be.checked')
1010
1010
  },
1011
1011
 
1012
1012
  uncheckYDisplayAxisCheckbox: () => {
@@ -13,9 +13,6 @@ export * from './shortTextResponsePage';
13
13
  export * from './fillInTheGapsDropdownPage';
14
14
  export * from './fillInTheGapsDragAndDropPage';
15
15
  export * from './dragAndDropIntoCategoriesPage';
16
- export * from './listMatchingPage';
17
- export * from './listMatchingScoring';
18
- export * from './passagePage';
19
16
  export * from './highlightPage';
20
17
  export * from './videoResponsePage';
21
18
  export * from './listOrderingPage';