itemengine-cypress-automation 1.0.173 → 1.0.174

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +0 -18
  2. package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +1 -1
  3. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +10 -7
  4. package/cypress/e2e/ILC/FeedbackScaleNew/additionalSettings.js +111 -0
  5. package/cypress/e2e/ILC/FeedbackScaleNew/colorPopup.js +206 -0
  6. package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +262 -0
  7. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +51 -0
  8. package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +17 -17
  9. package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +1 -1
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +2 -2
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +3 -3
  12. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +1 -0
  13. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +6 -7
  14. package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +3 -3
  15. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -1
  16. package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
  17. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +0 -1
  18. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -0
  19. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -4
  20. package/cypress/e2e/ILC/GridFill/gridLayoutEditTabFunctionality.js +2 -2
  21. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +12 -12
  22. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +91 -90
  23. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +93 -92
  24. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +97 -95
  25. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +62 -62
  26. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +118 -117
  27. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +124 -120
  28. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +128 -125
  29. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +97 -96
  30. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +222 -196
  31. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +34 -34
  32. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +20 -20
  33. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +29 -29
  34. package/cypress/e2e/ILC/NumberLine/headerSection.js +3 -2
  35. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +40 -37
  36. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +7 -4
  37. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +14 -12
  38. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +24 -23
  39. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +2 -2
  40. package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +1 -1
  41. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +2 -0
  42. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +1 -0
  43. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +1 -0
  44. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +1 -0
  45. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +1 -0
  46. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +4 -0
  47. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +8 -15
  48. package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +1 -0
  49. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -0
  50. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +1 -1
  51. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +332 -0
  52. package/cypress/e2e/ILC/TextSelection/Scoring/manuallyAndNonScored.js +149 -0
  53. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -1
  54. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -1
  55. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +11 -11
  56. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +3 -3
  57. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +337 -0
  58. package/cypress/e2e/ILC/TextSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +206 -0
  59. package/cypress/e2e/ILC/TextSelection/{previewContentsForAllViews.js → previewContentsForAllViews.smoke.js} +3 -3
  60. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +87 -87
  61. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +5 -5
  62. package/cypress/pages/audioResponsePage.js +1 -0
  63. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +2 -1
  64. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  65. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -4
  66. package/cypress/pages/components/colorPopupComponent.js +11 -0
  67. package/cypress/pages/components/createCustomCategoryFlyout.js +13 -9
  68. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  69. package/cypress/pages/components/equationEditorFlyout.js +0 -1
  70. package/cypress/pages/components/essayResponseCommonComponents.js +1 -1
  71. package/cypress/pages/components/imageCanvasComponent.js +1 -1
  72. package/cypress/pages/components/index.js +2 -1
  73. package/cypress/pages/components/optionsWrapperComponent.js +2 -1
  74. package/cypress/pages/components/questionInputFieldComponent.js +1 -1
  75. package/cypress/pages/components/questionInstructionsComponent.js +19 -7
  76. package/cypress/pages/components/setPointsPopupBase.js +17 -4
  77. package/cypress/pages/components/studentViewSettingsLabelComponent.js +2 -2
  78. package/cypress/pages/drawingResponsePage.js +2 -3
  79. package/cypress/pages/feedbackScalePage.js +143 -2
  80. package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
  81. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +12 -12
  82. package/cypress/pages/graphingPage.js +6 -6
  83. package/cypress/pages/gridFillPage.js +64 -7
  84. package/cypress/pages/matchingPage.js +3 -3
  85. package/cypress/pages/numberLinePage.js +342 -215
  86. package/cypress/pages/readingRulerPage.js +1 -1
  87. package/cypress/pages/textEntryMathPage.js +9 -0
  88. package/cypress/pages/textEntryMathWithImagePage.js +11 -11
  89. package/cypress/pages/textSelectionPage.js +125 -57
  90. package/package.json +1 -1
  91. package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
  92. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
  93. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
  94. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +0 -355
  95. package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
  96. package/cypress/pages/feedbackScalePage copy.js +0 -716
@@ -1,355 +0,0 @@
1
- import { graphingPage } from "../../../../pages";
2
- import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
- import utilities from "../../../../support/helpers/utilities";
4
- const unselectedToolOption = ['Circle', 'Parabola', 'Sine', 'Polygon'];
5
- const css = Cypress.env('css');
6
-
7
- describe('Create Item page - Graphing: All or nothing with alternative answer', () => {
8
- before(() => {
9
- cy.loginAs('admin');
10
- });
11
-
12
- describe('All or nothing scoring with correct answer equal to alternative points', () => {
13
- abortEarlySetup();
14
- before(() => {
15
- graphingPage.steps.navigateToCreateQuestion('Graphing');
16
- cy.barsPreLoaderWait();
17
- graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
18
- graphingPage.steps.selectToolOptions(unselectedToolOption);
19
- graphingPage.steps.checkPatternBackground();
20
- graphingPage.steps.selectGraphToolOptionEditTab('Line');
21
- graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
22
- graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
23
- graphingPage.steps.selectGraphToolOptionEditTab('Circle');
24
- graphingPage.steps.plotPointsOnGraphEditTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
25
- graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
26
- //Correct answer
27
- graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Polygon');
28
- graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
29
- graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
30
- //Common answer
31
- graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Circle');
32
- graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
33
- graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
34
- graphingPage.steps.allotPoints(20);
35
- //Alternative answer
36
- graphingPage.steps.addAlternativeAnswerAccordion(1);
37
- graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Vector');
38
- graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
39
- graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
40
- //Common answer
41
- graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Circle');
42
- graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
43
- graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
44
- graphingPage.steps.allotPoints(20);
45
- graphingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
46
- graphingPage.steps.switchToPreviewTab();
47
- });
48
-
49
- it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph', () => {
50
- graphingPage.steps.verifyPreviewScore(0, 20);
51
- graphingPage.steps.switchToGradingView();
52
-
53
- //Preview tab
54
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
55
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
56
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
57
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
58
-
59
- //Correct answer section
60
- utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
61
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
62
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
63
- utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
64
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
65
- utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
66
-
67
- //Correct/incorrect icon
68
- utilities.verifyElementVisibilityState(graphingPage.correctIncorrectStatusMessageText(), 'notExist');
69
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
70
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
71
- graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
72
-
73
- cy.log('When the user switches to \'Grading view\' without attempting the question and clicks on \'Check answer\' button, status message and correct answer section should not be displayed')
74
- graphingPage.steps.checkAnswer();
75
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
76
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
77
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
78
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
79
- graphingPage.steps.verifyCorrectAnswerSectionNotExist();
80
- });
81
-
82
- 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 the attempted graph should be displayed correct, a status message with text \'Your answer is correct\' should be displayed above the question preview, correct answer section should not be displayed', () => {
83
- graphingPage.steps.resetQuestionPreview();
84
- graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
85
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
86
- graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
87
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
88
- graphingPage.steps.verifyPreviewScore(20, 20);
89
- graphingPage.steps.switchToGradingView();
90
-
91
- //Preview tab
92
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
93
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
94
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
95
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
96
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
97
- utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
98
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
99
-
100
- //Correct/incorrect icon
101
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
102
- graphingPage.steps.verifyCorrectAnswerSectionNotExist();
103
- graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
104
-
105
- cy.log('When the user attempts the question with responses from the correct accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
106
- graphingPage.steps.checkAnswer();
107
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
108
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
109
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
110
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
111
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
112
- utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
113
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
114
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
115
- graphingPage.steps.verifyCorrectAnswerSectionNotExist();
116
- });
117
-
118
- it('When the user attempts the question with alternative accordion response, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, the attempted graph should be displayed correct, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
119
- graphingPage.steps.resetQuestionPreview();
120
- graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
121
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
122
- graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
123
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
124
- graphingPage.steps.verifyPreviewScore(20, 20);
125
- graphingPage.steps.switchToGradingView();
126
-
127
- //Preview tab
128
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
129
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
130
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
131
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
132
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
133
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
134
-
135
- //Correct/incorrect icon
136
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct')
137
- graphingPage.steps.verifyCorrectAnswerSectionNotExist();
138
- graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
139
-
140
- cy.log('When the user attempts the question with responses from the alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
141
- graphingPage.steps.checkAnswer();
142
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
143
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
144
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
145
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
146
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
147
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
148
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
149
- graphingPage.steps.verifyCorrectAnswerSectionNotExist();
150
- });
151
-
152
- it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
153
- graphingPage.steps.resetQuestionPreview();
154
- graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
155
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
156
- graphingPage.steps.verifyPreviewScore(0, 20);
157
- graphingPage.steps.switchToGradingView();
158
-
159
- //Preview tab
160
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
161
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
162
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
163
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
164
- utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
165
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
166
-
167
- //Correct answer section
168
- utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
169
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
170
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
171
- utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
172
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
173
- utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
174
-
175
- //Correct/incorrect icon
176
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
177
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
178
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
179
- graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
180
-
181
- cy.log('When the user attempts the question with partially correct responses exclusively from the correct accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
182
- graphingPage.steps.checkAnswer();
183
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
184
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
185
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
186
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
187
- utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
188
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
189
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
190
- graphingPage.steps.verifyCorrectAnswerSectionNotExist();
191
- });
192
-
193
- it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
194
- graphingPage.steps.resetQuestionPreview();
195
- graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
196
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
197
- graphingPage.steps.verifyPreviewScore(0, 20);
198
- graphingPage.steps.switchToGradingView();
199
-
200
- //Preview tab
201
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
202
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
203
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
204
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
205
- utilities.verifyElementCount(graphingPage.graphLineSegmentsPreviewTab(), 1);
206
- graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
207
-
208
- //Correct answer section
209
- utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
210
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
211
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
212
- utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
213
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
214
- utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
215
-
216
- //Correct/incorrect icon
217
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
218
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
219
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
220
- graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
221
-
222
- cy.log('When the user attempts the question with partially correct responses exclusively from the alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
223
- graphingPage.steps.checkAnswer();
224
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
225
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
226
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
227
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
228
- utilities.verifyElementCount(graphingPage.graphLineSegmentsPreviewTab(), 1);
229
- graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
230
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
231
- graphingPage.steps.verifyCorrectAnswerSectionNotExist();
232
- });
233
-
234
- 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 0 points and on switching to \'Grading\' view, the correctly attempted graph should be displayed correct and incorrectly attempted should be displayed for the alternative accordion graph, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
235
- graphingPage.steps.resetQuestionPreview();
236
- graphingPage.steps.selectGraphToolOptionPreviewTab('Vector');
237
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
238
- graphingPage.steps.selectGraphToolOptionPreviewTab('Polygon');
239
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
240
- graphingPage.steps.verifyPreviewScore(0, 20);
241
- graphingPage.steps.switchToGradingView();
242
-
243
- //Preview tab
244
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
245
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
246
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
247
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
248
- graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
249
- utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
250
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }]);
251
-
252
- //Correct answer section
253
- utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
254
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
255
- utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
256
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
257
- utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
258
-
259
- //Correct/incorrect icon
260
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
261
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
262
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
263
- graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
264
-
265
- cy.log('When the user attempts the question with equal number responses from the correct and alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
266
- graphingPage.steps.checkAnswer();
267
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 1);
268
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
269
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
270
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
271
- graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
272
- utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
273
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }]);
274
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
275
- graphingPage.steps.verifyCorrectAnswerSectionNotExist();
276
- });
277
-
278
- 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 0 points and on switching to \'Grading\' view, the attempted response should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
279
- graphingPage.steps.resetQuestionPreview();
280
- graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
281
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
282
- graphingPage.steps.verifyPreviewScore(0, 20);
283
- graphingPage.steps.switchToGradingView();
284
-
285
- //Preview tab
286
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
287
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
288
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
289
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
290
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
291
-
292
- //Correct answer section
293
- utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
294
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
295
- utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
296
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
297
- utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
298
-
299
- //Correct/incorrect icon
300
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
301
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
302
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }]);
303
- graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
304
-
305
- cy.log('When the user attempts the question with common response from the alternative accordion and clicks on \'Check answer\' button, the attempted graph should be displayed correct, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
306
- graphingPage.steps.checkAnswer();
307
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
308
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
309
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
310
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
311
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
312
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
313
- graphingPage.steps.verifyCorrectAnswerSectionNotExist();
314
- });
315
-
316
- it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
317
- graphingPage.steps.resetQuestionPreview();
318
- graphingPage.steps.selectGraphToolOptionPreviewTab('Circle');
319
- graphingPage.steps.plotPointsOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
320
- graphingPage.steps.verifyPreviewScore(0, 20);
321
- graphingPage.steps.switchToGradingView();
322
-
323
- //Preview tab
324
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
325
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
326
- graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
327
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
328
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
329
-
330
- //Correct answer section
331
- utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
332
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
333
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
334
- utilities.verifyElementCount(graphingPage.graphLineCorrectAnswerSection(), 1);
335
- graphingPage.steps.verifyPointsPlottedOnCorrectAnswerSection([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
336
- utilities.verifyElementCount(graphingPage.graphPolygonCorrectAnswerSection(), 1);
337
-
338
- //Correct/incorrect icon
339
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect')
340
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 0, xRange: 20, y: 1, yRange: 20 }, { x: 0, xRange: 20, y: 2, yRange: 20 }]);
341
- graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
342
- graphingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
343
-
344
- cy.log('When the user has attempted the question with incorrect responses and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
345
- graphingPage.steps.checkAnswer();
346
- utilities.verifyElementCount(graphingPage.graphCirclePreviewTab(), 2);
347
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 0, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 5, yRange: 20 }]);
348
- graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ x: -2, xRange: 20, y: 1, yRange: 20 }, { x: -4, xRange: 20, y: 1, yRange: 20 }]);
349
- utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
350
- graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
351
- graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
352
- graphingPage.steps.verifyCorrectAnswerSectionNotExist();
353
- });
354
- });
355
- });
@@ -1,28 +0,0 @@
1
- import { multipleSelectionGridPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
-
5
- describe('Create item page - Multiple selection grid: Preview contents', () => {
6
- before(() => {
7
- cy.loginAs('admin');
8
- });
9
-
10
- describe(`Auto scored - All or nothing scoring`, () => {
11
- abortEarlySetup();
12
- before(() => {
13
- multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
14
- cy.barsPreLoaderWait();
15
- multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
16
- multipleSelectionGridPage.steps.addInputToColumnInputStepper(4);
17
- multipleSelectionGridPage.steps.setQuestionGridLayoutForScoringFunctionalityTest();
18
- multipleSelectionGridPage.steps.allotPoints(20);
19
- multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 1 }, { row: 4, column: 2 }]);
20
- multipleSelectionGridPage.steps.switchToPreviewTab();
21
- });
22
-
23
- it('Question instructions should be visible', () => {
24
- utilities.verifyInnerText(multipleSelectionGridPage.questionInstructionsText(), 'Please select following animals facts are correct or not');
25
- utilities.verifyElementVisibilityState(multipleSelectionGridPage.questionInstructionsText(), 'visible');
26
- });
27
- });
28
- });