itemengine-cypress-automation 1.0.576-IEI-7071-main-98ffd41.0 → 1.0.576-IEI-7079-0591b8d.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +205 -0
  2. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +205 -0
  3. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
  4. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +248 -1
  5. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +247 -0
  6. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
  7. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +223 -0
  8. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +175 -0
  9. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
  10. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +191 -0
  11. package/cypress/e2e/ILC/ChartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePointsLocked.js +24 -24
  12. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +177 -0
  13. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +206 -0
  14. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
  15. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +228 -0
  16. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +229 -1
  17. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +229 -1
  18. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +206 -0
  19. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
  20. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +206 -0
  21. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +184 -0
  22. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +164 -10
  23. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +165 -11
  24. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +165 -11
  25. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +164 -14
  26. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +121 -10
  27. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +167 -16
  28. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +25 -15
  29. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -10
  30. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +24 -13
  31. package/cypress/pages/chartsBarPage.js +44 -1
  32. package/cypress/pages/chartsDotPlotPage.js +99 -1
  33. package/cypress/pages/chartsLinePage.js +48 -1
  34. package/package.json +1 -1
@@ -22,14 +22,14 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
22
22
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
23
23
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
24
24
  chartsDotPlotPage.steps.allotPoints(30);
25
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
26
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
25
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
26
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
27
27
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
28
28
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
29
29
  chartsDotPlotPage.steps.clickOnAddAlternativeAnswerButton(1);
30
30
  chartsDotPlotPage.steps.allotPoints(18);
31
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
32
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 2, min: 1, interval: 1, defaultDots: 0 });
31
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
32
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
33
33
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
34
34
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
35
35
  chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
@@ -71,6 +71,8 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
71
71
 
72
72
  it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly, a status message and correct answer section should not be displayed', () => {
73
73
  chartsDotPlotPage.steps.resetQuestionPreview();
74
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
75
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
74
76
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
75
77
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
76
78
  chartsDotPlotPage.steps.verifyPreviewScore(30, 30);
@@ -98,7 +100,8 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
98
100
 
99
101
  it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly, a status message and correct answer section should not be displayed', () => {
100
102
  chartsDotPlotPage.steps.resetQuestionPreview();
101
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
103
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
104
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
102
105
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
103
106
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
104
107
  chartsDotPlotPage.steps.verifyPreviewScore(18, 30);
@@ -126,7 +129,8 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
126
129
 
127
130
  it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed in dot column responses from correct accordion and incorrect icon should be displayed in dot column set incorrectly, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
128
131
  chartsDotPlotPage.steps.resetQuestionPreview();
129
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
132
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
133
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
130
134
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 4, min: 1, interval: 1, defaultDots: 0 });
131
135
  chartsDotPlotPage.steps.verifyPreviewScore(25, 30);
132
136
  chartsDotPlotPage.steps.switchToGradingView();
@@ -160,7 +164,8 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
160
164
 
161
165
  it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly from alternate accordion, incorrect icon should be displayed in dot column set incorrectly, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
162
166
  chartsDotPlotPage.steps.resetQuestionPreview();
163
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
167
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
168
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
164
169
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
165
170
  chartsDotPlotPage.steps.verifyPreviewScore(15, 30);
166
171
  chartsDotPlotPage.steps.switchToGradingView();
@@ -194,7 +199,8 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
194
199
 
195
200
  it('When the user attempts the question partially correct with all the responses correct as per the alternate accordion but one response incomplete, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly from correct accordion, incorrect icon should be displayed in dot column set incorrectly from the alternative accordion and a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
196
201
  chartsDotPlotPage.steps.resetQuestionPreview();
197
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 2, min: 1, interval: 1 });
202
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
203
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 2, min: 1, interval: 1, defaultDots: 2 });
198
204
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
199
205
  chartsDotPlotPage.steps.verifyPreviewScore(20, 30);
200
206
  chartsDotPlotPage.steps.switchToGradingView();
@@ -228,7 +234,8 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
228
234
 
229
235
  it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed in dot column attempted correctly from correct accordion, incorrect icon should be displayed in dot column set incorrectly from the alternative accordion as score achieved from the correct responses is more than alternate responses, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
230
236
  chartsDotPlotPage.steps.resetQuestionPreview();
231
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1 });
237
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
238
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
232
239
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(5, { point: 5, min: 1, interval: 1, defaultDots: 0 });
233
240
  chartsDotPlotPage.steps.verifyPreviewScore(15, 30);
234
241
  chartsDotPlotPage.steps.switchToGradingView();
@@ -263,7 +270,8 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
263
270
  it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed in common dot column attempted correctly, incorrect icon should be displayed in dot column set incorrectly, correct/incorrect status message should be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
264
271
  chartsDotPlotPage.steps.resetQuestionPreview();
265
272
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(3, { point: 3, min: 1, interval: 1, defaultDots: 0 });
266
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
273
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
274
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
267
275
  chartsDotPlotPage.steps.verifyPreviewScore(20, 30);
268
276
  chartsDotPlotPage.steps.switchToGradingView();
269
277
  chartsDotPlotPage.steps.verifyCorrectDotColumnPreviewTab({ point: 1, min: 1, interval: 1 });
@@ -295,7 +303,8 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
295
303
 
296
304
  it('When the user attempts the question incorrectly, then the user should be awarded points for correct bar only and on switching to \'Grading\' view, incorrect icon should be displayed in dot column attempted incorrectly, a status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
297
305
  chartsDotPlotPage.steps.resetQuestionPreview();
298
- chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(0, { point: 2, min: 1, interval: 1 });
306
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
307
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 2, min: 1, interval: 1, defaultDots: 2 });
299
308
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
300
309
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 5, min: 1, interval: 1, defaultDots: 0 });
301
310
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 4, min: 1, interval: 1, defaultDots: 0 });
@@ -335,20 +344,22 @@ describe('Create item page - Charts - Dot plot: Partial equal with alternative a
335
344
  chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('All or nothing');
336
345
  chartsDotPlotPage.steps.addAlternativeAnswerAccordion(1);
337
346
  chartsDotPlotPage.steps.allotPoints(14);
338
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 2, min: 1, interval: 1, defaultDots: 0 });
347
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(3, { point: 2, min: 1, interval: 1, defaultDots: 2 });
339
348
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 3, min: 1, interval: 1, defaultDots: 0 });
340
349
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
341
350
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 5, min: 1, interval: 1, defaultDots: 0 });
342
351
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(1, { point: 6, min: 1, interval: 1, defaultDots: 0 });
343
352
  chartsDotPlotPage.steps.expandCorrectAnswerAccordion();
344
353
  chartsDotPlotPage.steps.allotPoints(41);
345
- chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1 });
354
+ chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
346
355
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 3, min: 1, interval: 1 });
347
356
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 4, min: 1, interval: 1 });
348
357
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 5, min: 1, interval: 1, defaultDots: 0 });
349
358
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 6, min: 1, interval: 1, defaultDots: 0 });
350
359
  chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
351
360
  chartsDotPlotPage.steps.switchToPreviewTab();
361
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(2, { point: 1, min: 1, interval: 1, defaultDots: 1 });
362
+ chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(4, { point: 2, min: 1, interval: 1, defaultDots: 2 });
352
363
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 3, min: 1, interval: 1, defaultDots: 0 });
353
364
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 4, min: 1, interval: 1, defaultDots: 0 });
354
365
  chartsDotPlotPage.steps.plotDotsInDotColumnPreviewTab(1, { point: 5, min: 1, interval: 1, defaultDots: 0 });
@@ -1,5 +1,5 @@
1
1
  import utilities from "../support/helpers/utilities"
2
- import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, studentViewSettingsLabelComponent, layoutSectionComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
2
+ import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, studentViewSettingsLabelComponent, layoutSectionComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, showAlternativeAnswersComponent } from "./components";
3
3
  import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
4
4
  import { createItemPage } from "./createItemPage";
5
5
  import { dialogBoxBase } from "./dialogBoxBase";
@@ -20,6 +20,7 @@ const selectors = {
20
20
  ...selectQuestionResourceToolPage,
21
21
  ...autoScoredScoringSectionMultiResponseType,
22
22
  ...chartsCommonComponent,
23
+ ...showAlternativeAnswersComponent,
23
24
 
24
25
  barDragHandle: () => cy.get('.bar-drag-handle'),
25
26
  bar: () => cy.get('.ngie-chart-point'),
@@ -93,6 +94,7 @@ const steps = {
93
94
  ...selectQuestionResourceToolPage.steps,
94
95
  ...commonComponents.steps,
95
96
  ...createItemPage.steps,
97
+ ...showAlternativeAnswersComponent.steps,
96
98
 
97
99
  /**
98
100
  * @description set the bar height/value in the select chart type section chart
@@ -726,6 +728,47 @@ const steps = {
726
728
  });
727
729
  },
728
730
 
731
+
732
+ /**
733
+ * Verify that a bar has the expected value and also has a tick icon in a specific answer section
734
+ * @param {Object} barProperties - The properties of the bar to verify
735
+ * @param {number} barProperties.barIndex - Index of the bar
736
+ * @param {number} barProperties.barValue - Expected value/height of the bar
737
+ * @param {number} barProperties.range - Maximum value of the axis
738
+ * @param {number} barProperties.sectionIndex - Index of the chart section (1 for correct, 2 for alternative)
739
+ * @example verifyBarValueAndTickIconInSpecificSection({ barIndex: 0, barValue: 4, range: 10, sectionIndex: 2 })
740
+ */
741
+ verifyBarValueAndTickIconInSpecificSection: ({ barIndex, barValue, range, sectionIndex }) => {
742
+ const expectedHeight = barValue / range;
743
+
744
+ chartsBarPage.previewTabChartWrapper()
745
+ .eq(sectionIndex)
746
+ .within(() => {
747
+ utilities.getNthElement(chartsBarPage.bar(), barIndex)
748
+ .should('have.attr', 'height', expectedHeight)
749
+ .within(() => {
750
+ chartsBarPage.tickIconWrapper()
751
+ .should('be.visible')
752
+ .and('have.class', 'correct-option-icon');
753
+ });
754
+ });
755
+ },
756
+
757
+ /**
758
+ * Verify that all bars have the expected values and tick icons in a specific answer section
759
+ * @param {Object[]} barsData - Array of bar properties objects
760
+ * @param {number} barsData[].barIndex - Index of the bar
761
+ * @param {number} barsData[].barValue - Expected value/height of the bar
762
+ * @param {number} barsData[].range - Maximum value of the axis
763
+ * @param {number} sectionIndex - Index of the chart section (1 for correct, 2 for alternative)
764
+ * @example verifyAllBarsValueAndTickIconInSpecificSection(barsData, 2)
765
+ */
766
+ verifyAllBarsValueAndTickIconInSpecificSection: (barsData, sectionIndex) => {
767
+ barsData.forEach(({ barIndex, barValue, range }) => {
768
+ chartsBarPage.steps.verifyBarValueAndTickIconInSpecificSection({ barIndex, barValue, range, sectionIndex });
769
+ });
770
+ },
771
+
729
772
  /**
730
773
  * Verify the correct/incorrect icon not exists for bar in preview tab
731
774
  * @param {number} barIndex index of the bar
@@ -1,5 +1,5 @@
1
1
  import utilities from "../support/helpers/utilities"
2
- import { createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, chartsCommonComponent, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, layoutSectionComponent, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, studentViewSettingsLabelComponent } from "./components";
2
+ import { createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, chartsCommonComponent, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, layoutSectionComponent, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, studentViewSettingsLabelComponent, showAlternativeAnswersComponent } from "./components";
3
3
  import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
4
4
  import { dialogBoxBase } from "./dialogBoxBase";
5
5
  import { createItemPage } from "./createItemPage";
@@ -96,6 +96,8 @@ const selectors = {
96
96
  //Correct answer section
97
97
  correctAnswersLabel: () => cy.get('[class*="CorrectAnswerHeader"]:visible'),
98
98
  dotPlotChartCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__ChartWrapper"]').eq(1),
99
+ //alternate answer section
100
+ dotPlotChartAlternateAnswerSection: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__ChartWrapper"]').eq(2),
99
101
  dotColumnCorrectAnswerSection: () => cy.get('.ngie-chart-point'),
100
102
  dotIconCorrectAnswerSection: () => cy.get('.dot-icon'),
101
103
  numberLineAxisCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .number-line-wrapper').eq(0),
@@ -119,6 +121,7 @@ const steps = {
119
121
  ...dialogBoxBase.steps,
120
122
  ...commonComponents.steps,
121
123
  ...createItemPage.steps,
124
+ ...showAlternativeAnswersComponent.steps,
122
125
 
123
126
  //select chart type
124
127
  selectDotPlot: () => {
@@ -1425,6 +1428,22 @@ const steps = {
1425
1428
  }
1426
1429
  },
1427
1430
 
1431
+ verifyCorrectDotColumnAlternateAnswerSection: ({ point, min, interval, defaultDots = null }) => {
1432
+ const index = Math.round((point - min) / interval);
1433
+ chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
1434
+ .within(() => {
1435
+ chartsDotPlotPage.dotColumnCorrectAnswerSection()
1436
+ .eq(index)
1437
+ .should('have.class', 'correct-bar-indicator')
1438
+ .should('have.css', 'background-color', css.color.correctAnswerLabelBg)
1439
+ .find('.icon-correct')
1440
+ .should('exist');
1441
+ });
1442
+ if (defaultDots === null) {
1443
+ steps.verifyCorrectDotAlternateAnswerSection({ point, min, interval });
1444
+ }
1445
+ },
1446
+
1428
1447
  /**
1429
1448
  * Verifies that the empty dot column
1430
1449
  * @param {object} options - The options object containing point, min, and interval.
@@ -1454,6 +1473,28 @@ const steps = {
1454
1473
  });
1455
1474
  },
1456
1475
 
1476
+ verifyEmptyDotColumnAlternateAnswerSection: ({ point, min, interval }) => {
1477
+ const index = Math.round((point - min) / interval);
1478
+ chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
1479
+ .within(() => {
1480
+ chartsDotPlotPage.dotColumnCorrectAnswerSection()
1481
+ .eq(index)
1482
+ .should('have.not.class', 'correct-bar-indicator')
1483
+ .should('have.css', 'background-color', css.color.transparent)
1484
+ .find('.icon-correct')
1485
+ .should('not.exist');
1486
+ chartsDotPlotPage.dotColumnCorrectAnswerSection()
1487
+ .eq(index)
1488
+ .should('not.have.class', 'inCorrect-bar-indicator')
1489
+ .find('.icon-incorrect')
1490
+ .should('not.exist');
1491
+ chartsDotPlotPage.dotColumnCorrectAnswerSection()
1492
+ .eq(index)
1493
+ .find('.dot-icon')
1494
+ .should('not.exist');
1495
+ });
1496
+ },
1497
+
1457
1498
  /**
1458
1499
  * Verifies that the correct dot exists in the specified column
1459
1500
  * @param {object} options - The options object containing point, min, and interval.
@@ -1477,6 +1518,22 @@ const steps = {
1477
1518
  });
1478
1519
  },
1479
1520
 
1521
+ verifyCorrectDotAlternateAnswerSection: ({ point, min, interval }) => {
1522
+ const index = Math.round((point - min) / interval);
1523
+ chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
1524
+ .within(() => {
1525
+ chartsDotPlotPage.dotColumnCorrectAnswerSection()
1526
+ .eq(index)
1527
+ .within(() => {
1528
+ chartsDotPlotPage.dotIconCorrectAnswerSection()
1529
+ .each((el) => {
1530
+ cy.wrap(el)
1531
+ .should('have.css', 'background-color', css.color.correctAnswer)
1532
+ });
1533
+ });
1534
+ });
1535
+ },
1536
+
1480
1537
  /**
1481
1538
  * Verifies that the default dot exists in the specified column
1482
1539
  * @param {object} options - The options object containing point, min, and interval.
@@ -1500,6 +1557,22 @@ const steps = {
1500
1557
  });
1501
1558
  },
1502
1559
 
1560
+ verifyDefaultDotAlternateAnswerSection: ({ point, min, interval }) => {
1561
+ const index = Math.round((point - min) / interval);
1562
+ chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
1563
+ .within(() => {
1564
+ chartsDotPlotPage.dotColumnCorrectAnswerSection()
1565
+ .eq(index)
1566
+ .within(() => {
1567
+ chartsDotPlotPage.dotIconCorrectAnswerSection()
1568
+ .each((el) => {
1569
+ cy.wrap(el)
1570
+ .should('have.css', 'background-color', css.color.activeButtons)
1571
+ });
1572
+ });
1573
+ });
1574
+ },
1575
+
1503
1576
  /**
1504
1577
  * Verify the dot column is locked in preview tab
1505
1578
  * @param {number} index index of the dot column
@@ -1514,6 +1587,16 @@ const steps = {
1514
1587
  });
1515
1588
  },
1516
1589
 
1590
+ verifyDotColumnIsLockedInAlternateAnswerSection: ({ point, min, interval }) => {
1591
+ const index = Math.round((point - min) / interval);
1592
+ chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
1593
+ .within(() => {
1594
+ utilities.getNthElement(chartsDotPlotPage.dotColumnCorrectAnswerSection(), index)
1595
+ .find('[class*="LockIconWrapper"]')
1596
+ .should('exist');
1597
+ });
1598
+ },
1599
+
1517
1600
  /**
1518
1601
  * Verifies the expected number of dots
1519
1602
  * @param {number} expectedDotCount - The expected number of dots.
@@ -1594,6 +1677,21 @@ const steps = {
1594
1677
  steps.verifyDefaultDotCorrectAnswerSection({ point, min, interval });
1595
1678
  },
1596
1679
 
1680
+ verifyLockedDotColumnAlternateAnswerSection: ({ point, min, interval }) => {
1681
+ const index = Math.round((point - min) / interval);
1682
+ chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
1683
+ .within(() => {
1684
+ chartsDotPlotPage.dotColumnCorrectAnswerSection()
1685
+ .eq(index)
1686
+ .should('not.have.class', 'correct-bar-indicator')
1687
+ .and('not.have.class', 'inCorrect-bar-indicator')
1688
+ .and('not.have.css', 'background-color', css.color.correctAnswerLabelBg)
1689
+ .and('not.have.css', 'background-color', css.color.correctAnswerLabelBg)
1690
+ });
1691
+ steps.verifyDotColumnIsLockedInAlternateAnswerSection({ point, min, interval });
1692
+ steps.verifyDefaultDotAlternateAnswerSection({ point, min, interval });
1693
+ },
1694
+
1597
1695
  /**
1598
1696
  * @param {number} points - The points to be allotted.
1599
1697
  * @description - Allots points in the scoring section.
@@ -1,5 +1,5 @@
1
1
  import utilities from "../support/helpers/utilities";
2
- import { additionalSettingsAccessibilitySectionComponent, additionalSettingsPanel, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, barAndLineChartComponent, chartsCommonComponent, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, layoutSectionComponent } from "./components";
2
+ import { additionalSettingsAccessibilitySectionComponent, additionalSettingsPanel, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, barAndLineChartComponent, chartsCommonComponent, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, layoutSectionComponent, showAlternativeAnswersComponent } from "./components";
3
3
  import { dialogBoxBase } from "./dialogBoxBase";
4
4
  import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
5
5
  import { createItemPage } from "./createItemPage";
@@ -17,6 +17,7 @@ const selectors = {
17
17
  ...chartsCommonComponent,
18
18
  ...layoutSectionComponent,
19
19
  ...autoScoredSpecifyCorrectAnswerSection,
20
+ ...showAlternativeAnswersComponent,
20
21
  point: () => cy.get('.ngie-chart-point'),
21
22
  selectChartTypePoint: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] .ngie-chart-point'),
22
23
  pointLockIcon: () => cy.get('[class*="ChartGridstyle__LineLockIconWrapper"]'),
@@ -54,6 +55,7 @@ const steps = {
54
55
  ...commonComponents.steps,
55
56
  ...createItemPage.steps,
56
57
  ...layoutSectionComponent.steps,
58
+ ...showAlternativeAnswersComponent.steps,
57
59
 
58
60
  /**
59
61
  * @description set the point height/value in the select chart type section chart
@@ -345,6 +347,23 @@ const steps = {
345
347
  });
346
348
  },
347
349
 
350
+ /**
351
+ * Verify the point value in correct answer section tab
352
+ * @param {Object} pointProperties - The properties of the point
353
+ * @param {number} pointProperties.pointIndex index of the point
354
+ * @param {number} pointProperties.value Height of the point as per the axis
355
+ * @param {number} pointProperties.range Maximum value of the axis on which point value is determined
356
+ */
357
+ verifyPointValueInAlternativeAnswerSection: ({ pointIndex, value, range }) => {
358
+ let pointValue = value / range
359
+ chartsLinePage.previewTabChartWrapper()
360
+ .eq(2)
361
+ .within(() => {
362
+ utilities.getNthElement(chartsLinePage.point(), pointIndex)
363
+ .should('have.attr', 'height', pointValue);
364
+ });
365
+ },
366
+
348
367
  /**
349
368
  * Verify the correct/incorrect icon of point in correct answer section
350
369
  * @param {number} pointIndex index of the point
@@ -379,6 +398,17 @@ const steps = {
379
398
  });
380
399
  },
381
400
 
401
+ verifyPointCorrectIncorrectIconNotExistsInAlternativeAnswerSection: (pointIndex) => {
402
+ chartsLinePage.previewTabChartWrapper()
403
+ .eq(2)
404
+ .within(() => {
405
+ utilities.getNthElement(chartsLinePage.point(), pointIndex)
406
+ .within(() => {
407
+ utilities.verifyElementVisibilityState(chartsLinePage.tickIconWrapper(), 'notExist');
408
+ });
409
+ });
410
+ },
411
+
382
412
  /**
383
413
  * Verify the correct/incorrect icon of point in preview tab
384
414
  * @param {number} pointIndex index of the point
@@ -431,6 +461,12 @@ const steps = {
431
461
  chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInCorrectAnswerSection(pointIndex);
432
462
  },
433
463
 
464
+ verifyLockedPointInAlternativeAnswerSection: ({ pointIndex, value, range }) => {
465
+ chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: pointIndex, value: value, range: range });
466
+ chartsLinePage.steps.verifyPointIsLockedInAlternativeAnswerSection(pointIndex);
467
+ chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInAlternativeAnswerSection(pointIndex);
468
+ },
469
+
434
470
  /**
435
471
  * Verify the point is locked in correct answer section
436
472
  * @param {number} pointIndex index of the point
@@ -446,6 +482,17 @@ const steps = {
446
482
  });
447
483
  },
448
484
 
485
+ verifyPointIsLockedInAlternativeAnswerSection: (pointIndex) => {
486
+ chartsLinePage.previewTabChartWrapper()
487
+ .eq(2)
488
+ .within(() => {
489
+ utilities.getNthElement(chartsLinePage.point(), pointIndex)
490
+ .within(() => {
491
+ utilities.verifyElementVisibilityState(chartsLinePage.pointLockIcon(), 'visible');
492
+ });
493
+ });
494
+ },
495
+
449
496
 
450
497
  /**
451
498
  * verify the displayed penalty points for each incorrect point
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.576-IEI-7071-main-98ffd41.0",
3
+ "version": "1.0.576-IEI-7079-0591b8d.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {