itemengine-cypress-automation 1.0.199-20thMayRepoUpdate-6af11c9.0 → 1.0.199

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +3 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -0
  3. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +348 -0
  4. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +346 -0
  5. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +401 -0
  6. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingPenaltyScoring.js +53 -0
  7. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightBasic.js +251 -0
  8. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightBasic.js +251 -0
  9. package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +366 -0
  10. package/cypress/e2e/ILC/ChartsBar/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  11. package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +367 -0
  12. package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +3 -3
  13. package/cypress/e2e/ILC/Compass/compassEditTabBasicsSection.js +134 -0
  14. package/cypress/e2e/ILC/Compass/compassPreviewContent.smoke.js +88 -0
  15. package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +2 -1
  16. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +3 -3
  17. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +2 -2
  18. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +1 -0
  19. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +4 -2
  20. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +3 -3
  21. package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +1 -1
  22. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +5 -5
  23. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  24. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  25. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +4 -4
  26. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +1 -1
  27. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +4 -4
  28. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +3 -3
  29. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +4 -4
  30. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +4 -4
  31. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +4 -4
  32. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +1 -1
  33. package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +1 -16
  34. package/cypress/e2e/ILC/chartsDotsPlot/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
  35. package/cypress/e2e/ILC/chartsDotsPlot/editTabScoring.js +223 -0
  36. package/cypress/e2e/ILC/chartsDotsPlot/headerSection.js +110 -0
  37. package/cypress/e2e/ILC/chartsDotsPlot/minimumScoringPenaltyPointsAndRoundingDropdown.js +199 -0
  38. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +375 -0
  39. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +382 -0
  40. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +422 -0
  41. package/cypress/e2e/ILC/chartsDotsPlot/scoring/manualAndNonScoredScoring.js +159 -0
  42. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsBasic.js +233 -0
  43. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +380 -0
  44. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +293 -0
  45. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +382 -0
  46. package/cypress/e2e/ILC/chartsDotsPlot/scoring/toleranceThresholdScoring.js +184 -0
  47. package/cypress/e2e/ILC/chartsDotsPlot/toolSettings.js +76 -0
  48. package/cypress/pages/chartsBarPage.js +23 -15
  49. package/cypress/pages/chartsDotPlotPage.js +130 -7
  50. package/cypress/pages/chartsLinePage.js +11 -11
  51. package/cypress/pages/compassPage.js +57 -0
  52. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -0
  53. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
  54. package/cypress/pages/components/barAndLineChartComponent.js +7 -7
  55. package/cypress/pages/components/chartsCommonComponent.js +55 -7
  56. package/cypress/pages/components/createQuestionBasePage.js +1 -1
  57. package/cypress/pages/components/optionsWrapperComponent.js +1 -1
  58. package/cypress/pages/components/questionInputFieldComponent.js +2 -2
  59. package/cypress/pages/feedbackScalePage.js +3 -1
  60. package/cypress/pages/graphingPage.js +1 -1
  61. package/cypress/pages/imageHighlightPage.js +4 -434
  62. package/cypress/pages/index.js +2 -1
  63. package/cypress/pages/listOrderingPage.js +9 -9
  64. package/cypress/pages/textEntryMathPage.js +16 -16
  65. package/package.json +2 -2
@@ -0,0 +1,76 @@
1
+ import { toolSettingsComponent } from "../../../pages/components";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ import { dialogBoxBase, chartsDotPlotPage, rulerPage } from "../../../pages";
5
+
6
+ const css = Cypress.env('css');
7
+
8
+ describe('Create Item page: Tool settings', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Tool settings: Contents', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
17
+ chartsDotPlotPage.steps.selectDotPlot();
18
+ });
19
+
20
+ toolSettingsComponent.tests.verifyToolSettingsContent();
21
+ });
22
+
23
+ //Failing due to https://redmine.zeuslearning.com/issues/568938
24
+ describe('Tool settings: Edit tool settings', () => {
25
+ abortEarlySetup();
26
+ before(() => {
27
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
28
+ chartsDotPlotPage.steps.selectDotPlot();
29
+ toolSettingsComponent.steps.expandToolSettingsAccordion();
30
+ });
31
+
32
+ it('When user clicks on edit icon for ruler tool, then popup for ruler tool settings should be displayed', () => {
33
+ toolSettingsComponent.steps.clickOnToolEditIcon(0);
34
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
35
+ });
36
+
37
+ it('When user modifies the settings for the ruler tool and clicks the \'Ok\' button, then ruler tool should enter selected state.', () => {
38
+ rulerPage.steps.expandUnitOfMeasurementDropdown();
39
+ rulerPage.steps.selectOptionFromUnitOfMeasurementDropdown('Inch');
40
+ rulerPage.steps.selectOptionFromLengthOfRulerOptions('12 in');
41
+ rulerPage.steps.selectColorBlock(1);
42
+ rulerPage.steps.expandRotationDropdown();
43
+ rulerPage.steps.selectOptionFromRotationDropdown('Allow rotation and display angle');
44
+ rulerPage.steps.enterInputToOpacityInputField(60);
45
+ rulerPage.steps.checkAddShowHideButtonCheckbox();
46
+ toolSettingsComponent.steps.clickOnOkButton();
47
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
48
+ toolSettingsComponent.steps.verifyToolSelectedState(0);
49
+ });
50
+
51
+ it('When user has made changes for ruler tool in edit tab then changes should be reflected in the ruler tool in the preview tab', () => {
52
+ cy.log('Switching to Preview Tab');
53
+ rulerPage.steps.switchToPreviewTab();
54
+ rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Show');
55
+ rulerPage.steps.clickOnRulerVisibilityButton();
56
+ utilities.verifyElementVisibilityState(rulerPage.rulerPreviewTab(), 'visible');
57
+ rulerPage.steps.verifyLengthOfRulerInPreview('12in');
58
+ rulerPage.steps.verifyColorOfRulerInPreview(1);
59
+ rulerPage.steps.verifyRulerOpacityInPreview('0.6');
60
+ rulerPage.steps.verifyRotationButtonWithDegreeVisible();
61
+ });
62
+
63
+ it('CSS of the \'Hide ruler\' button', { tags: 'css' }, () => {
64
+ utilities.verifyCSS(rulerPage.rulerVisibilityButtonPreviewTab(), {
65
+ 'border': `1px solid ${css.color.activeButtons}`,
66
+ 'background-color': css.color.defaultBackground,
67
+ 'font-size': css.fontSize.normal,
68
+ 'font-weight': css.fontWeight.semibold
69
+ });
70
+ });
71
+
72
+ it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
73
+ cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
74
+ });
75
+ });
76
+ });
@@ -1,14 +1,16 @@
1
1
  import utilities from "../support/helpers/utilities"
2
- import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab } from "./components";
2
+ import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent } from "./components";
3
3
  import { dialogBoxBase } from "./dialogBoxBase";
4
4
  const css = Cypress.env('css');
5
5
 
6
6
  const selectors = {
7
7
  ...questionInstructionsComponent,
8
8
  ...barAndLineChartComponent,
9
- ...chartsCommonComponent,
10
9
  ...commonComponents,
11
10
  ...dialogBoxBase,
11
+ ...autoScoredScoringPreviewTab,
12
+ ...correctIncorrectAnswerLabelComponent,
13
+ ...chartsCommonComponent,
12
14
  barDragHandle: () => cy.get('.bar-drag-handle'),
13
15
  bar: () => cy.get('.ngie-chart-point'),
14
16
  selectChartTypeMaxXLabel: () => cy.get('[class*="ChartsPreviewstyles__CustomInputFieldLabel"]'),
@@ -23,10 +25,10 @@ const selectors = {
23
25
  specifyCorrectAnswerBar: () => cy.get('.ngie-accordion .ngie-chart-point'),
24
26
 
25
27
  //Preview tab
26
- previewTabBarDragHandle: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible .bar-drag-handle'),
27
- previewTabBar: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible .ngie-chart-point'),
28
- previewTabBarLabel: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartGridstyle__NameDiv-"]'),
29
- previewTabBarTooltipColorBlock: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartTooltipstyles__ColorBox"]:visible')
28
+ previewTabBarDragHandle: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] .bar-drag-handle'),
29
+ previewTabBar: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] .ngie-chart-point'),
30
+ previewTabBarLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartGridstyle__NameDiv-"]'),
31
+ previewTabBarTooltipColorBlock: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartTooltipstyles__ColorBox"]')
30
32
  }
31
33
 
32
34
  const steps = {
@@ -38,6 +40,9 @@ const steps = {
38
40
  ...chartsCommonComponent.steps,
39
41
  ...resetPopupComponent.steps,
40
42
  ...autoScoredStudentViewSettings.steps,
43
+ ...autoScoredScoringSectionMultiResponseType.steps,
44
+ ...autoScoredSpecifyCorrectAnswerSection.steps,
45
+ ...correctIncorrectAnswerLabelComponent.steps,
41
46
  /**
42
47
  * @description set the bar height/value in the select chart type section chart
43
48
  * @param {Object} barProperties - The properties and changes to be done on the bar
@@ -49,9 +54,12 @@ const steps = {
49
54
  utilities.getNthElement(chartsBarPage.selectChartTypeBar(), barIndex)
50
55
  .invoke('attr', 'height')
51
56
  .then((barValue) => {
52
- let updatedBarValue = parseFloat(value /= range)
57
+ let updatedBarValue = value / range
53
58
  let originalBarValue = parseFloat(barValue)
54
- let unitChange = parseFloat(1 / range)
59
+ let unitChange = 1 / range
60
+ console.log(updatedBarValue)
61
+ console.log(originalBarValue)
62
+ console.log(unitChange)
55
63
  if (originalBarValue < updatedBarValue) {
56
64
  for (let i = originalBarValue; i < updatedBarValue; i = parseFloat((i + unitChange).toFixed(2))) {
57
65
  utilities.getNthElement(chartsBarPage.selectChartTypeBarDragHandle(), barIndex)
@@ -81,9 +89,9 @@ const steps = {
81
89
  utilities.getNthElement(chartsBarPage.specifyCorrectAnswerBar(), barIndex)
82
90
  .invoke('attr', 'height')
83
91
  .then((barValue) => {
84
- let updatedBarValue = parseFloat(value /= range)
92
+ let updatedBarValue = value / range
85
93
  let originalBarValue = parseFloat(barValue)
86
- let unitChange = parseFloat(1 / range)
94
+ let unitChange = 1 / range
87
95
  if (originalBarValue < updatedBarValue) {
88
96
  for (let i = originalBarValue; i < updatedBarValue; i = parseFloat((i + unitChange).toFixed(2))) {
89
97
  utilities.getNthElement(chartsBarPage.specifyCorrectAnswerBarDragHandle(), barIndex)
@@ -155,7 +163,7 @@ const steps = {
155
163
  * @param {number} barProperties.range Maximum value of the axis on which bar value is determined
156
164
  */
157
165
  verifyBarHeightInPreviewTab: ({ barIndex, barValue, range }) => {
158
- let barHeight = parseFloat(barValue /= range)
166
+ let barHeight = barValue / range
159
167
  utilities.getNthElement(chartsBarPage.previewTabBar(), barIndex)
160
168
  .should('have.attr', 'height', barHeight);
161
169
  },
@@ -180,7 +188,7 @@ const steps = {
180
188
  utilities.getNthElement(chartsBarPage.previewTabBar(), barIndex)
181
189
  .invoke('attr', 'height')
182
190
  .then((barValue) => {
183
- let originalBarValue = parseFloat(barValue)
191
+ let originalBarValue = barValue
184
192
  utilities.getNthElement(chartsBarPage.previewTabBarDragHandle(), barIndex)
185
193
  .focus()
186
194
  .type('{upArrow}{upArrow}{upArrow}{downArrow}{downArrow}{downArrow}', { force: true });
@@ -204,9 +212,9 @@ const steps = {
204
212
  utilities.getNthElement(chartsBarPage.previewTabBar(), barIndex)
205
213
  .invoke('attr', 'height')
206
214
  .then((barValue) => {
207
- let updatedBarValue = parseFloat(value /= range)
215
+ let updatedBarValue = value / range
208
216
  let originalBarValue = parseFloat(barValue)
209
- let unitChange = parseFloat(1 / range)
217
+ let unitChange = 1 / range
210
218
  if (originalBarValue < updatedBarValue) {
211
219
  for (let i = originalBarValue; i < updatedBarValue; i = parseFloat((i + unitChange).toFixed(2))) {
212
220
  utilities.getNthElement(chartsBarPage.previewTabBarDragHandle(), barIndex)
@@ -270,7 +278,7 @@ const steps = {
270
278
  * @param {number} barProperties.range Maximum value of the axis on which bar value is determined
271
279
  */
272
280
  verifyBarHeightInCorrectAnswerSection: ({ barIndex, barValue, range }) => {
273
- let barHeight = parseFloat(barValue /= range)
281
+ let barHeight = barValue / range
274
282
  chartsBarPage.previewTabChartWrapper()
275
283
  .eq(1)
276
284
  .within(() => {
@@ -1,5 +1,7 @@
1
1
  import utilities from "../support/helpers/utilities"
2
- import { createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, chartsCommonComponent, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, layoutSectionComponent, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent } from "./components";
2
+ import { createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, chartsCommonComponent, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, layoutSectionComponent, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, studentViewSettingsLabelComponent } from "./components";
3
+ import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
4
+ import { dialogBoxBase } from "./dialogBoxBase";
3
5
  const css = Cypress.env('css');
4
6
 
5
7
  const selectors = {
@@ -8,6 +10,12 @@ const selectors = {
8
10
  ...commonComponents,
9
11
  ...autoScoredStudentViewSettings,
10
12
  ...correctIncorrectAnswerLabelComponent,
13
+ ...autoScoredScoringSectionMultiResponseType,
14
+ ...additionalSettingsPanel,
15
+ ...studentViewSettingsLabelComponent,
16
+ ...autoScoredScoringPreviewTab,
17
+ ...selectQuestionResourceToolPage,
18
+ ...dialogBoxBase,
11
19
 
12
20
  dotPlotToggleButton: () => cy.get('[data-ngie-testid="dot-plot-toggle-button"]'),
13
21
  minInputFieldSelectChartType: () => cy.get('input[aria-label="Min"]'),
@@ -27,6 +35,8 @@ const selectors = {
27
35
  return cy.get('.ngie-dot-plot-chart .chart-controls button')
28
36
  }
29
37
  },
38
+ labelsNumberLineAxisSelectChartType: () => cy.get('.ngie-dot-plot-chart .label-wrapper [class*="DotPlotChartstyles__Label"]'),
39
+ numberLineAxisSelectChartType: () => cy.get('.ngie-dot-plot-chart .number-line-wrapper'),
30
40
  //Specify correct answer
31
41
  dotColumnSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .ngie-chart-point'),
32
42
  addButtonSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .charts-tooltip-wrapper [aria-label*="plus"]'),
@@ -39,8 +49,14 @@ const selectors = {
39
49
  return cy.get('.ngie-accordion-detail .chart-controls button')
40
50
  }
41
51
  },
42
- dotIconSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .dot-icon'),
52
+ dotIconSpecifyCorrectAnswer: () => cy.get('.dot-icon'),
43
53
  tooltipWrapperSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .charts-tooltip-wrapper'),
54
+ labelsNumberLineAxisSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .label-wrapper [class*="DotPlotChartstyles__Label"]'),
55
+ numberLineAxisSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .number-line-wrapper'),
56
+ labelsNumberLineAxisSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .label-wrapper [class*="DotPlotChartstyles__Label"]'),
57
+ partialEqualWeightsPointsPerResponseScore: () => cy.get('[class*="Chartsstyles__EqualPoints"]'),
58
+ dotColumnNumerationPointsLabel: () => cy.get('[class*="Chartsstyles__PartialPointsWrapper"] .partial-points-input-label'),
59
+ pointsInputField: () => cy.get('.ngie-accordion-detail .points-input-field input[type="text"]'),
44
60
 
45
61
  //preview tab
46
62
  dotColumnPreviewTab: () => cy.get('.ngie-chart-point:visible'),
@@ -68,7 +84,8 @@ const selectors = {
68
84
  dotPlotChartCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__ChartWrapper"]').eq(1),
69
85
  dotColumnCorrectAnswerSection: () => cy.get('.ngie-chart-point'),
70
86
  dotIconCorrectAnswerSection: () => cy.get('.dot-icon'),
71
- graphTitleCorrectAnswerSection: () => cy.get('.title-container'),
87
+ graphTitleCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .chart-top-wrapper .title-container').eq(1),
88
+ xAxisLabelCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .chart-bottom-wrapper .title-container').eq(1),
72
89
  numberLineAxisCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .number-line-wrapper').eq(0),
73
90
  labelsNumberLineAxisCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__BottomWrapper"]').eq(0).find('.label-wrapper [class*="DotPlotChartstyles__Label"]'),
74
91
  }
@@ -83,6 +100,10 @@ const steps = {
83
100
  ...autoScoredScoringPreviewTab.steps,
84
101
  ...layoutSectionComponent.steps,
85
102
  ...autoScoredSpecifyCorrectAnswerSection.steps,
103
+ ...autoScoredScoringSectionMultiResponseType.steps,
104
+ ...additionalSettingsPanel.steps,
105
+ ...selectQuestionResourceToolPage.steps,
106
+ ...dialogBoxBase.steps,
86
107
 
87
108
  /**
88
109
  * @param {string} element denotes element
@@ -402,14 +423,50 @@ const steps = {
402
423
  const magnitude = Math.abs(difference);
403
424
  if (difference > 0) {
404
425
  steps.increaseDotCountInDotColumnSpecifyCorrectAnswer(magnitude);
405
- steps.verifyDotCountSpecifyCorrectAnswer(expectedDots, { point, min, interval });
406
426
  } else if (difference < 0) {
407
427
  steps.decreaseDotCountInDotColumnSpecifyCorrectAnswer(magnitude);
408
- steps.verifyDotCountSpecifyCorrectAnswer(expectedDots, { point, min, interval });
409
428
  }
410
429
  });
411
430
  }
412
431
  steps.unselectDotColumnInSpecifyCorrectAnswer({ point, min, interval });
432
+ steps.verifyDotCountSpecifyCorrectAnswer(expectedDots, { point, min, interval });
433
+ },
434
+
435
+ /**
436
+ * Verifies the labels on the number line axis in the Specify correct answer
437
+ * @param {number} min - The minimum value.
438
+ * @param {number} max - The maximum value.
439
+ * @param {number} annotateEvery - value of annotate every
440
+ */
441
+ verifyLabelsOnNumberLineAxisSpecifyCorrectAnswer: (min, max, annotateEvery) => {
442
+ let expectedLabelsIndex = [];
443
+ chartsDotPlotPage.labelsNumberLineAxisSpecifyCorrectAnswer()
444
+ .each((value, index) => {
445
+ if (index % annotateEvery === 0) {
446
+ expectedLabelsIndex.push(index.toString());
447
+ }
448
+ })
449
+ .then(() => {
450
+ for (var i = min; i < max; i++) {
451
+ console.log(expectedLabelsIndex[i])
452
+ chartsDotPlotPage.labelsNumberLineAxisSpecifyCorrectAnswer()
453
+ .eq(expectedLabelsIndex[i - 1])
454
+ .should('have.text', i)
455
+ }
456
+ });
457
+ },
458
+
459
+ verifyPointsPerResponseLabel: () => {
460
+ utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'Points per response:\n-');
461
+ utilities.verifyElementVisibilityState(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'visible');
462
+ },
463
+
464
+ /**
465
+ * @param {number} points - The expected points value to be verified.
466
+ * @description Verifies the partial equal weights points per response score for a specific option in the specify correct answer section for a multi-response type question.
467
+ */
468
+ verifyPartialEqualWeightsPointsPerResponseScore: (points) => {
469
+ utilities.verifyInnerText(chartsDotPlotPage.partialEqualWeightsPointsPerResponseScore(), points);
413
470
  },
414
471
 
415
472
  //preview tab
@@ -606,7 +663,8 @@ const steps = {
606
663
  .within(() => {
607
664
  utilities.verifyElementVisibilityState(chartsDotPlotPage.dotColumnLockIconPreviewTab(), 'visible');
608
665
  });
609
- utilities.getNthElement(chartsDotPlotPage.dotColumnPreviewTab(), index)
666
+ chartsDotPlotPage.dotColumnPreviewTab()
667
+ .eq(index)
610
668
  .should('have.css', 'background-color', css.color.lockedDotColumnBg);
611
669
  },
612
670
 
@@ -822,6 +880,10 @@ const steps = {
822
880
  utilities.verifyElementVisibilityState(chartsDotPlotPage.dotPlotChartCorrectAnswerSection(), 'notExist');
823
881
  },
824
882
 
883
+ verifyCorrectIncorrectStatusMessageNotExists: () => {
884
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.correctIncorrectAnswerTextWrapper(), 'notExist');
885
+ },
886
+
825
887
  /**
826
888
  * Verifies that the correct dot column
827
889
  * @param {object} options - The options object containing point, min, and interval.
@@ -984,10 +1046,71 @@ const steps = {
984
1046
  steps.verifyDotColumnIsLockedInCorrectAnswerSection({ point, min, interval });
985
1047
  steps.verifyDefaultDotCorrectAnswerSection({ point, min, interval });
986
1048
  },
1049
+
1050
+ /**
1051
+ * @param {number} points - The points to be allotted.
1052
+ * @description - Allots points in the scoring section.
1053
+ */
1054
+ allotPoints: (points) => {
1055
+ scoringSectionBaseEditTab.pointsInputField()
1056
+ .eq(0)
1057
+ .clear()
1058
+ .type(`${points}`)
1059
+ .blur();
1060
+ scoringSectionBaseEditTab.pointsInputField()
1061
+ .eq(0)
1062
+ .should('have.value', points)
1063
+ },
1064
+
1065
+ /**
1066
+ * Sets the tolerance threshold value for the charts dot plot.
1067
+ * @param {number} value - The value for the tolerance threshold.
1068
+ */
1069
+ setToleranceThresholdValue: (value) => {
1070
+ chartsDotPlotPage.toleranceThresholdInputField()
1071
+ .clear()
1072
+ .type(value)
1073
+ .blur();
1074
+ chartsDotPlotPage.toleranceThresholdInputField()
1075
+ .should('have.value', value)
1076
+ },
1077
+
1078
+ /**
1079
+ * verify the displayed penalty points for each incorrect dot plot
1080
+ * @param {number} penaltyPoints displayed penalty points
1081
+ */
1082
+ verifyPenaltyPointsForEachIncorrectDotPlot: (penaltyPoints) => {
1083
+ utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.penaltyPointsDetailsSectionAllottedPointsLabel(), `Penalty points for each incorrect dot plot: ${penaltyPoints}`);
1084
+ },
1085
+
1086
+ focusInOutOfToleranceThresholdInputField: () => {
1087
+ chartsDotPlotPage.toleranceThresholdInputField()
1088
+ .focus()
1089
+ .blur();
1090
+ },
987
1091
  }
988
1092
 
989
1093
  const tests = {
990
- ...autoScoredScoringPreviewTab.tests
1094
+ ...autoScoredScoringPreviewTab.tests,
1095
+ ...autoScoredScoringSectionMultiResponseType.tests,
1096
+ ...scoringSectionBaseEditTab.tests,
1097
+ ...additionalSettingsPanel.tests,
1098
+ ...additionalSettingsAccessibilitySectionComponent.tests,
1099
+ ...questionInstructionsComponent.tests,
1100
+ ...createQuestionBasePage.tests,
1101
+ ...commonComponents.tests,
1102
+ ...studentViewSettingsLabelComponent.tests,
1103
+ ...autoScoredStudentViewSettings.tests,
1104
+ ...chartsCommonComponent.tests,
1105
+
1106
+ verifyContentsOfSpecifyCorrectAnswerSection: () => {
1107
+ it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
1108
+ chartsCommonComponent.steps.verifyGraphTitleInSpecifyCorrectAnswer('Graph title');
1109
+ chartsCommonComponent.steps.verifyXAxisLabelInSpecifyCorrectAnswer('Label');
1110
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.numberLineAxisSpecifyCorrectAnswer(), 'exist');
1111
+ chartsDotPlotPage.steps.verifyLabelsOnNumberLineAxisSpecifyCorrectAnswer(1, 4, 1);
1112
+ });
1113
+ }
991
1114
  }
992
1115
 
993
1116
  export const chartsDotPlotPage = {
@@ -18,11 +18,11 @@ const selectors = {
18
18
  specifyCorrectAnswerPoint: () => cy.get('.ngie-accordion .ngie-chart-point'),
19
19
 
20
20
  //Preview tab
21
- previewTabPoint: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible .ngie-chart-point'),
22
- previewTabConnectorLine: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible .line-chart-connector-line'),
21
+ previewTabPoint: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] .ngie-chart-point'),
22
+ previewTabConnectorLine: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] .line-chart-connector-line'),
23
23
 
24
24
  //Preview tab
25
- previewTabPointLabel: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartGridstyle__NameDiv-"]'),
25
+ previewTabPointLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartGridstyle__NameDiv-"]'),
26
26
  }
27
27
 
28
28
  const steps = {
@@ -45,9 +45,9 @@ const steps = {
45
45
  utilities.getNthElement(chartsLinePage.selectChartTypePoint(), pointIndex)
46
46
  .invoke('attr', 'height')
47
47
  .then((pointValue) => {
48
- let updatedPointValue = parseFloat(value /= range)
48
+ let updatedPointValue = value / range
49
49
  let originalPointValue = parseFloat(pointValue)
50
- let unitChange = parseFloat(1 / range)
50
+ let unitChange = 1 / range
51
51
  if (originalPointValue < updatedPointValue) {
52
52
  for (let i = originalPointValue; i < updatedPointValue; i = parseFloat((i + unitChange).toFixed(2))) {
53
53
  utilities.getNthElement(chartsLinePage.selectChartTypePoint(), pointIndex)
@@ -94,9 +94,9 @@ const steps = {
94
94
  utilities.getNthElement(chartsLinePage.specifyCorrectAnswerPoint(), pointIndex)
95
95
  .invoke('attr', 'height')
96
96
  .then((pointValue) => {
97
- let updatedPointValue = parseFloat(value /= range)
97
+ let updatedPointValue = value / range
98
98
  let originalPointValue = parseFloat(pointValue)
99
- let unitChange = parseFloat(1 / range)
99
+ let unitChange = 1 / range
100
100
  if (originalPointValue < updatedPointValue) {
101
101
  for (let i = originalPointValue; i < updatedPointValue; i = parseFloat((i + unitChange).toFixed(2))) {
102
102
  utilities.getNthElement(chartsLinePage.specifyCorrectAnswerPoint(), pointIndex)
@@ -124,7 +124,7 @@ const steps = {
124
124
  * @param {number} pointProperties.range Maximum value of the axis on which point value is determined
125
125
  */
126
126
  verifyPointValueInPreviewTab: ({ pointIndex, value, range }) => {
127
- let pointHeight = parseFloat(value /= range)
127
+ let pointHeight = value / range
128
128
  utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
129
129
  .should('have.attr', 'height', pointHeight);
130
130
  },
@@ -168,9 +168,9 @@ const steps = {
168
168
  utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
169
169
  .invoke('attr', 'height')
170
170
  .then((pointValue) => {
171
- let updatedPointValue = parseFloat(value /= range)
171
+ let updatedPointValue = value / range
172
172
  let originalPointValue = parseFloat(pointValue)
173
- let unitChange = parseFloat(1 / range)
173
+ let unitChange = 1 / range
174
174
  if (originalPointValue < updatedPointValue) {
175
175
  for (let i = originalPointValue; i < updatedPointValue; i = parseFloat((i + unitChange).toFixed(2))) {
176
176
  utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
@@ -234,7 +234,7 @@ const steps = {
234
234
  * @param {number} pointProperties.range Maximum value of the axis on which point value is determined
235
235
  */
236
236
  verifyPointValueInCorrectAnswerSection: ({ pointIndex, value, range }) => {
237
- let pointValue = parseFloat(value /= range)
237
+ let pointValue = value / range
238
238
  chartsLinePage.previewTabChartWrapper()
239
239
  .eq(1)
240
240
  .within(() => {
@@ -0,0 +1,57 @@
1
+ import {createQuestionBasePage, toolVisibilityComponent } from "./components";
2
+ import utilities from "../support/helpers/utilities";
3
+ const css = Cypress.env('css');
4
+
5
+ const selectors = {
6
+ ...toolVisibilityComponent,
7
+ compassVisibilityLabel : ()=> cy.get('[class*="Compassstyles__LabelToolVisibility"]'),
8
+ previewTabCompassVisibilityButton : ()=> cy.get('.protractor-button'),
9
+ previewTabCompassTool : ()=> cy.get('[class*="CompassComponentstyles__Target"] img'),
10
+ compassToolRotateButton : ()=> cy.get('.icon-rotate'),
11
+ }
12
+
13
+ const steps = {
14
+ ...createQuestionBasePage.steps,
15
+ ...toolVisibilityComponent.steps,
16
+
17
+ /**
18
+ * @param {string} label name of tool
19
+ * @description this function verifies the visibility of the tool label
20
+ */
21
+ verifyCompassVisibilityLabel: (label) => {
22
+ utilities.verifyInnerText(compassPage.compassVisibilityLabel(), label);
23
+ utilities.verifyElementVisibilityState(compassPage.compassVisibilityLabel(), 'visible');
24
+ },
25
+
26
+ /**
27
+ * @param {("Show"|"Hide")} visibility
28
+ * @description this function verifies the state of the tool visibility button.
29
+ */
30
+ verifyPreviewTabCompassVisibilityButtonLabel: (visibility) => {
31
+ utilities.verifyInnerText(compassPage.previewTabCompassVisibilityButton(), `${visibility} compass`)
32
+ },
33
+
34
+ verifyCompassToolIsVisible: () => {
35
+ utilities.verifyElementVisibilityState(compassPage.previewTabCompassTool(), 'visible');
36
+ utilities.verifyElementVisibilityState(compassPage.compassToolRotateButton(), 'visible');
37
+ },
38
+
39
+ verifyCompassToolNotVisible: () => {
40
+ utilities.verifyElementVisibilityState(compassPage.previewTabCompassTool(), 'notExist');
41
+ utilities.verifyElementVisibilityState(compassPage.compassToolRotateButton(), 'notExist');
42
+ },
43
+
44
+ clickOnCompassToolVisibilityButton: () => {
45
+ compassPage.previewTabCompassVisibilityButton().click();
46
+ }
47
+ }
48
+
49
+ const tests = {
50
+ ...createQuestionBasePage.tests,
51
+ }
52
+
53
+ export const compassPage = {
54
+ ...selectors,
55
+ steps,
56
+ tests
57
+ }
@@ -299,6 +299,7 @@ const steps = {
299
299
  case 'specify points for each incorrect option':
300
300
  case 'specify points for each incorrect answer':
301
301
  case 'specify points for each incorrect dropdown':
302
+ case 'specify points for each incorrect dot plot':
302
303
  autoScoredScoringSectionMultiResponseType.specifyPointsForEachIncorrectOptionRadioButton()
303
304
  .click();
304
305
  break;
@@ -216,6 +216,9 @@ const tests = {
216
216
  case 'image highlight':
217
217
  helpText = 'You can set the correct answer by selecting the correct answer option.'
218
218
  break;
219
+ case 'charts':
220
+ helpText = 'You can set the correct answer by entering the correct answer(s) in the response area(s).'
221
+ break;
219
222
  default:
220
223
  throw new Error('Invalid question type');
221
224
  }
@@ -27,13 +27,13 @@ const selectors = {
27
27
  specifyCorrectAnswerToolsResetButton: () => cy.get('.ngie-accordion [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(3),
28
28
 
29
29
  //Preview tab
30
- previewTabToolsAddBarOrPointButton: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(0),
31
- previewTabToolsUndoButton: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(1),
32
- previewTabToolsRedoButton: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(2),
33
- previewTabToolsResetButton: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(3),
34
- previewTabYAxisLabelButton: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartsPreviewstyles__LeftWrapper"] .title-container'),
35
- previewTabYAxisCoordinate: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartGridstyle__ValueDiv"]'),
36
- previewTabChartRowHeaderContainer: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartGridstyle__RowHeaderContainer"]'),
30
+ previewTabToolsAddBarOrPointButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(0),
31
+ previewTabToolsUndoButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(1),
32
+ previewTabToolsRedoButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(2),
33
+ previewTabToolsResetButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(3),
34
+ previewTabYAxisLabelButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartsPreviewstyles__LeftWrapper"] .title-container'),
35
+ previewTabYAxisCoordinate: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartGridstyle__ValueDiv"]'),
36
+ previewTabChartRowHeaderContainer: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartGridstyle__RowHeaderContainer"]'),
37
37
  }
38
38
 
39
39
  const steps = {