itemengine-cypress-automation 1.0.180-essayResponseLazyLoadingFix-3170a00.0 → 1.0.181

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  3. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +4 -5
  4. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +64 -3
  5. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  6. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
  7. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  9. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  18. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
  19. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  20. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
  21. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  22. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  23. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  24. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  25. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  26. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  27. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  28. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  29. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
  30. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
  31. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +251 -0
  32. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  33. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
  34. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  35. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
  36. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  37. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
  38. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  39. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +530 -0
  40. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  41. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +119 -0
  42. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +263 -0
  43. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  44. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  45. package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
  46. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  47. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
  48. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  49. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  50. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  51. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
  52. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
  53. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
  54. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
  55. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
  56. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
  57. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
  58. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
  59. package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
  60. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +2 -2
  61. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.smoke.js +179 -0
  62. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
  63. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
  64. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
  65. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
  66. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
  67. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
  68. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  69. package/cypress/fixtures/constants.js +1 -1
  70. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  71. package/cypress/fixtures/theme/ilc.json +16 -16
  72. package/cypress/pages/audioPlayerPage.js +55 -543
  73. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  74. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  75. package/cypress/pages/components/autoScoredStudentViewSettings.js +4 -4
  76. package/cypress/pages/components/commonComponents.js +1 -0
  77. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  78. package/cypress/pages/components/equationEditorFlyout.js +3 -2
  79. package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
  80. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
  81. package/cypress/pages/components/imageCanvasComponent.js +2 -1
  82. package/cypress/pages/components/index.js +1 -0
  83. package/cypress/pages/components/optionsWrapperComponent.js +11 -0
  84. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
  85. package/cypress/pages/components/toolSettingsComponent.js +6 -0
  86. package/cypress/pages/contentBlocksPage.js +2 -2
  87. package/cypress/pages/createItemPage.js +29 -0
  88. package/cypress/pages/dialogBoxBase.js +2 -2
  89. package/cypress/pages/drawingResponsePage.js +23 -4
  90. package/cypress/pages/feedbackScalePage.js +3 -0
  91. package/cypress/pages/graphingPage.js +18 -0
  92. package/cypress/pages/gridFillPage.js +18 -2
  93. package/cypress/pages/index.js +1 -1
  94. package/cypress/pages/itemPreviewSettingsPage.js +4 -0
  95. package/cypress/pages/listOrderingPage.js +122 -647
  96. package/cypress/pages/matchingPage.js +1 -1
  97. package/cypress/pages/multipleSelectionPage.js +23 -1
  98. package/cypress/pages/numberLinePage.js +1196 -59
  99. package/cypress/pages/rulerPage.js +6 -2
  100. package/cypress/pages/textSelectionPage.js +460 -22
  101. package/package.json +2 -2
  102. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
  103. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
@@ -0,0 +1,162 @@
1
+ import { audioPlayerPage, itemPreviewPage, studentViewPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+ let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
6
+ const views = utilities.getViews(previewContentViews);
7
+ var itemReferenceID = "";
8
+
9
+ describe('Preview tab contents for all views', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ //failing in student view due to https://redmine.zeuslearning.com/issues/568592
15
+ views.forEach((view) => {
16
+ describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
17
+ let actualAudioSeekedInPercent = 50
18
+ abortEarlySetup();
19
+ before(() => {
20
+ switch (view) {
21
+ case 'Question preview':
22
+ audioPlayerPage.steps.navigateToCreateResource('audio player');
23
+ audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
24
+ audioPlayerPage.steps.addInputToAudioDescriptionInputField('Sample audio description');
25
+ audioPlayerPage.steps.selectTypeInTranscriptRadioButton();
26
+ audioPlayerPage.steps.enterTextInTranscriptInputField('Sample transcript');
27
+ audioPlayerPage.steps.switchToPreviewTab();
28
+ break;
29
+ case 'Item view':
30
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
31
+ break;
32
+ case 'Item preview':
33
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
34
+ audioPlayerPage.steps.switchToPreviewTab();
35
+ break;
36
+ case 'Student view':
37
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
38
+ break;
39
+ case 'Grading view':
40
+ cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
41
+ break;
42
+ case 'Correct answer view':
43
+ cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
44
+ break;
45
+ default:
46
+ throw new Error('Invalid view');
47
+ }
48
+ });
49
+
50
+ after(() => {
51
+ if (view === 'Question preview') {
52
+ audioPlayerPage.steps.clickOnSaveQuestionButton();
53
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
54
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
55
+ }
56
+ if (view === 'Student view') {
57
+ studentViewPage.steps.submitResponse();
58
+ utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
59
+ }
60
+ });
61
+
62
+ it('When the user switches to preview tab, \'Backward\', \'Play\', \'Forward\', \'Volume control\', \'Elapsed time\', \'Progress bar\', \'Total time\', \'Playback speed\' and \'Add pin\' buttons should be displayed', () => {
63
+ utilities.verifyElementVisibilityState(audioPlayerPage.backwardButton(), 'visible');
64
+ utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
65
+ utilities.verifyElementVisibilityState(audioPlayerPage.forwardButton(), 'visible');
66
+ utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlButton(), 'visible');
67
+ utilities.verifyElementVisibilityState(audioPlayerPage.playbackElapsedTime(), 'visible');
68
+ utilities.verifyInnerText(audioPlayerPage.playbackElapsedTime(), '00:00');
69
+ utilities.verifyElementVisibilityState(audioPlayerPage.progressBar(), 'visible');
70
+ utilities.verifyElementVisibilityState(audioPlayerPage.playbackTotalTime(), 'visible');
71
+ utilities.verifyInnerText(audioPlayerPage.playbackTotalTime(), '00:00');
72
+ utilities.verifyElementVisibilityState(audioPlayerPage.playbackSpeedButton(), 'visible');
73
+ utilities.verifyElementVisibilityState(audioPlayerPage.addPinButton(), 'visible');
74
+ })
75
+
76
+ it('When the user clicks on \'Play\' button, then the audio file should load and the user should be able to play the audio. Timer should display the amount of audio that has been played and the total audio length in (mm:ss)/(mm:ss) format.', () => {
77
+ audioPlayerPage.steps.startPlayback();
78
+ audioPlayerPage.steps.waitForPlaybackToBegin();
79
+ audioPlayerPage.steps.verifyAudioPlaybackTimer('00:03/00:45');
80
+ });
81
+
82
+ it('When the audio player is in playback state and the user clicks on \'Pause\' button, then playback should get paused. Progress bar and timer should not update further and the \'Pause\' button should get replaced with \'Play\' button', () => {
83
+ audioPlayerPage.steps.verifyAudioPlaybackTimer('00:10/00:45');
84
+ audioPlayerPage.steps.pauseAndVerifyProgressBarSliderPosition();
85
+ audioPlayerPage.steps.verifyAudioPlaybackTimer('00:10/00:45');
86
+ utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
87
+ utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'notExist');
88
+ });
89
+
90
+ it('When audio player is in paused state and user clicks on \'Play\' button, then playback should get resumed and \'Play\' button should get replaced with \'Pause\' button.', () => {
91
+ audioPlayerPage.steps.startPlayback();
92
+ utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'visible');
93
+ utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'notExist');
94
+ });
95
+
96
+ it('When the user seeks the progress bar slider while the audio is playing, then the audio should continue to play from the position where the slider is seeked', () => {
97
+ audioPlayerPage.steps.seekProgressBarSliderToCenter();
98
+ audioPlayerPage.steps.addWaitToPlayAudio(1000);
99
+ audioPlayerPage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
100
+ });
101
+
102
+ it('When the audio playback is completed, the \'Pause\' button should get replaced with \'Play\' button', () => {
103
+ audioPlayerPage.steps.verifyAudioPlaybackTimer('00:45/00:45');
104
+ utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
105
+ utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'notExist');
106
+ audioPlayerPage.steps.verifyProgressBarSliderPosition(99);
107
+ });
108
+
109
+ it('The added audio description and transcript should be displayed in preview tab', () => {
110
+ utilities.verifyInnerText(audioPlayerPage.descriptionPreviewTab(), 'Sample audio description');
111
+ utilities.verifyElementVisibilityState(audioPlayerPage.playbackSpeedButton(), 'visible');
112
+ audioPlayerPage.steps.clickOnTranscriptButton();
113
+ utilities.verifyInnerText(audioPlayerPage.transcriptContentPreviewTab(), 'Sample transcript');
114
+ utilities.verifyElementVisibilityState(audioPlayerPage.transcriptContentPreviewTab(), 'visible');
115
+ });
116
+
117
+ it('CSS of standard recording interface in Preview tab', { tags: 'css' }, () => {
118
+ utilities.verifyCSS(audioPlayerPage.playbackElapsedTime(), {
119
+ 'color': css.color.playbackTime,
120
+ 'font-size': css.fontSize.small,
121
+ 'font-weight': css.fontWeight.bold
122
+ });
123
+ utilities.verifyCSS(audioPlayerPage.playbackTotalTime(), {
124
+ 'color': css.color.playbackTime,
125
+ 'font-size': css.fontSize.small,
126
+ 'font-weight': css.fontWeight.bold
127
+ });
128
+ utilities.verifyCSS(audioPlayerPage.backwardButton().find('path').eq(1), {
129
+ 'stroke': css.color.activeButtons
130
+ });
131
+ utilities.verifyCSS(audioPlayerPage.playbackPlayButton().find('path').eq(0), {
132
+ 'stroke': css.color.activeButtons
133
+ });
134
+ utilities.verifyCSS(audioPlayerPage.forwardButton().find('path').eq(1), {
135
+ 'stroke': css.color.activeButtons
136
+ });
137
+ utilities.verifyCSS(audioPlayerPage.playbackSpeedButton().find('path').eq(1), {
138
+ 'fill': css.color.activeButtons
139
+ });
140
+ audioPlayerPage.transcriptButton()
141
+ .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
142
+ utilities.verifyCSS(audioPlayerPage.transcriptButton(), {
143
+ 'background-color': css.color.selectToolbarOptionBg
144
+ });
145
+ utilities.verifyCSS(audioPlayerPage.descriptionPreviewTab(), {
146
+ 'color': css.color.text,
147
+ 'font-size': css.fontSize.default,
148
+ 'font-weight': css.fontWeight.regular
149
+ });
150
+ utilities.verifyCSS(audioPlayerPage.transcriptContentPreviewTab(), {
151
+ 'color': css.color.text,
152
+ 'font-size': css.fontSize.default,
153
+ 'font-weight': css.fontWeight.regular
154
+ });
155
+ });
156
+
157
+ it('Accessibility of standard recording interface in Preview tab', { tags: 'a11y' }, () => {
158
+ cy.checkAccessibility(audioPlayerPage.descriptionPreviewTab().parents('.audio-resource-preview-wrapper'));
159
+ });
160
+ });
161
+ });
162
+ });
@@ -327,7 +327,7 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
327
327
 
328
328
  it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container', () => {
329
329
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionFromDropzoneToOptionContainerPreviewTab('Eagle', 0);
330
- dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(['Whale', 'Platypus', 'Eagle']);
330
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(['Parrot', 'Whale', 'Eagle']);
331
331
  });
332
332
  });
333
333
 
@@ -51,11 +51,10 @@ describe('Create item page - Drawing response: Grading view, Correct answer view
51
51
  utilities.verifyElementVisibilityState(drawingResponsePage.questionInstructionsText(), 'visible');
52
52
  });
53
53
 
54
- it('A preview of the canvas along with the selected tools and controls should be displayed. All contents inside the canvas should be in disabled state', () => {
55
- for (let index = 0; index < defaultToolbarAndControlOptions.length; index++) {
56
- utilities.verifyElementVisibilityState(drawingResponsePage.studentAndGradingViewDrawingToolbarOption(defaultToolbarAndControlOptions[index]), 'visible');
57
- }
58
- utilities.verifyElementDisabledClass(drawingResponsePage.drawingToolWrapper())
54
+ it('A preview of the canvas along with the play button should be displayed and user should be able to click on the play button', () => {
55
+ utilities.verifyElementVisibilityState(drawingResponsePage.gradingViewPlayFeatureButton(), 'visible');
56
+ utilities.verifyElementVisibilityState(drawingResponsePage.previewTabLowerCanvas(), 'visible');
57
+ drawingResponsePage.steps.clickOnPlayButtonInGradingView();
59
58
  });
60
59
 
61
60
  it('Empty score input field and total score should be displayed', () => {
@@ -33,12 +33,14 @@ describe('Item preview: Settings tab - functionality', () => {
33
33
  itemPreviewSettingsPage.steps.createBasicContentBlockResourceAndTool('Heading', 'Content heading');
34
34
  });
35
35
 
36
- it('When user has added question in the left panel, then it should be displayed in the left panel ', () => {
36
+ it('When user has added question in the left panel, then it should be displayed in the left panel within half of the container width', () => {
37
37
  itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 0, questionTitle: 'Short text response', questionInstructions: 'shortTextResponseHeading', panel: 0 });
38
+ itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(0);
38
39
  });
39
40
 
40
- it('When user has added resource and tool in the right panel, then it should be displayed in the right panel', () => {
41
+ it('When user has added resource and tool in the right panel, then it should be displayed in the right panel within half of the container width', () => {
41
42
  itemPreviewSettingsPage.steps.verifyContentBlockContentsPreview({ questionIndex: 0, questionTitle: 'Content blocks', questionInstructions: 'Content heading', panel: 1 });
43
+ itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(1);
42
44
  });
43
45
 
44
46
  it('When user unchecks \'Enable side by side panels\' checkbox, then only one panel should be displayed and and added questions or resource and tools should be displayed inline', () => {
@@ -48,7 +50,8 @@ describe('Item preview: Settings tab - functionality', () => {
48
50
  itemPreviewSettingsPage.steps.verifyQuestionsCount(2);
49
51
  itemPreviewSettingsPage.steps.verifyPanelCount(1);
50
52
  itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 0, questionTitle: 'Short text response', questionInstructions: 'shortTextResponseHeading', panel: 0 });
51
- itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 1, questionTitle: 'Content blocks', questionInstructions: 'Content heading', panel: 0 });
53
+ itemPreviewSettingsPage.steps.verifyContentBlockContentsPreview({ questionIndex: 1, questionTitle: 'Content blocks', questionInstructions: 'Content heading', panel: 0 });
54
+ itemPreviewSettingsPage.steps.verifyPanelWidthEqualToItemWidth();
52
55
  });
53
56
 
54
57
  it('When user checks \'Enable side by side panels\' checkbox again, then \'Edit tab\' should be displayed with two panels, the left panel should be prefilled with added questions and resource tools and right panel should have \'Add question\' and \'Add resource and tool\' buttons', () => {
@@ -58,6 +61,7 @@ describe('Item preview: Settings tab - functionality', () => {
58
61
  itemPreviewSettingsPage.steps.verifyPanelCount(2);
59
62
  itemPreviewSettingsPage.steps.verifyQuestionsExistInLeftPanel();
60
63
  itemPreviewSettingsPage.steps.verifyQuestionsDoNotExistInRightPanel();
64
+ itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(0);
61
65
  });
62
66
 
63
67
  it('Accessibility of panels', { tags: 'a11y' }, () => {
@@ -407,4 +411,61 @@ describe('Item preview: Settings tab - functionality', () => {
407
411
  itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 1, questionTitle: 'Short text response', questionInstructions: 'ShortTextResponse', panel: 1 });
408
412
  });
409
413
  });
414
+
415
+ describe('Functionality for \'Enable side by side panels\' section for canvas questions', () => {
416
+ abortEarlySetup();
417
+ before(() => {
418
+ cy.log('Navigating to Item preview settings tab');
419
+ itemPreviewSettingsPage.steps.navigateToCreateItemPage();
420
+ itemPreviewSettingsPage.steps.clickOnSettingsButton();
421
+ });
422
+
423
+ it('When user checks \'Enable side by side panels\' checkbox and clicks on \'Apply changes\', then two panels should be displayed in \'Edit tab\'', () => {
424
+ itemPreviewSettingsPage.steps.checkEnableSideBySidePanelsCheckbox();
425
+ itemPreviewSettingsPage.steps.clickApplyChanges();
426
+ itemPreviewSettingsPage.steps.verifyPanelCount(2);
427
+ itemPreviewSettingsPage.steps.verifyAddQuestionAndAddResourceButton(0);
428
+ itemPreviewSettingsPage.steps.verifyAddQuestionAndAddResourceButton(1);
429
+ });
430
+
431
+ it('User should be able to add canvas question to both the panels', () => {
432
+ itemPreviewSettingsPage.steps.clickOnAddQuestion(0);
433
+ itemPreviewSettingsPage.steps.selectQuestionType('Graphing');
434
+ itemPreviewSettingsPage.steps.createBasicGraphingResponseQuestion('Graphing question', 2);
435
+ itemPreviewSettingsPage.steps.clickOnAddQuestion(1);
436
+ itemPreviewSettingsPage.steps.selectQuestionType('Drawing Response');
437
+ itemPreviewSettingsPage.steps.createBasicDrawingResponseQuestion('Drawing question', 2);
438
+ });
439
+
440
+ it('When user has added canvas question in the left panel, then it should be displayed in the left panel within half of the container width', () => {
441
+ itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 0, questionTitle: 'Graphing', questionInstructions: 'Graphing question', panel: 0 });
442
+ itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(0);
443
+ });
444
+
445
+ it('When user has added canvas question in the right panel, then it should be displayed in the right panel within half of the container width', () => {
446
+ itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 0, questionTitle: 'Drawing response', questionInstructions: 'Drawing question', panel: 1 });
447
+ itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(1);
448
+ });
449
+
450
+ it('When user unchecks \'Enable side by side panels\' checkbox, then only one panel should be displayed and and added questions should be displayed inline', () => {
451
+ itemPreviewSettingsPage.steps.clickOnSettingsButton();
452
+ itemPreviewSettingsPage.steps.uncheckEnableSideBySidePanelsCheckbox();
453
+ itemPreviewSettingsPage.steps.clickApplyChanges();
454
+ itemPreviewSettingsPage.steps.verifyQuestionsCount(2);
455
+ itemPreviewSettingsPage.steps.verifyPanelCount(1);
456
+ itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 0, questionTitle: 'Graphing', questionInstructions: 'Graphing question', panel: 0 });
457
+ itemPreviewSettingsPage.steps.verifyBasicQuestionContentsPreview({ questionIndex: 1, questionTitle: 'Drawing response', questionInstructions: 'Drawing question', panel: 0 });
458
+ itemPreviewSettingsPage.steps.verifyPanelWidthEqualToItemWidth();
459
+ });
460
+
461
+ it('When user checks \'Enable side by side panels\' checkbox again, then \'Edit tab\' should be displayed with two panels, the left panel should be prefilled with added questions right panel should have \'Add question\' and \'Add resource and tool\' buttons', () => {
462
+ itemPreviewSettingsPage.steps.clickOnSettingsButton();
463
+ itemPreviewSettingsPage.steps.checkEnableSideBySidePanelsCheckbox();
464
+ itemPreviewSettingsPage.steps.clickApplyChanges();
465
+ itemPreviewSettingsPage.steps.verifyPanelCount(2);
466
+ itemPreviewSettingsPage.steps.verifyQuestionsExistInLeftPanel();
467
+ itemPreviewSettingsPage.steps.verifyQuestionsDoNotExistInRightPanel();
468
+ itemPreviewSettingsPage.steps.verifyPanelWidthIsHalfOfItemWidth(0);
469
+ });
470
+ });
410
471
  });
@@ -26,7 +26,7 @@ describe('Create question page - Essay Response: Edit category', () => {
26
26
 
27
27
  it('Title of the flyout should be \'Edit category\'', () => {
28
28
  utilities.verifyElementVisibilityState(editCategoryFlyout.dialogBoxTitle(), 'exist');
29
- utilities.verifyInnerText(editCategoryFlyout.dialogBoxTitle(), 'Edit Category');
29
+ utilities.verifyInnerText(editCategoryFlyout.dialogBoxTitle(), 'Edit category');
30
30
  });
31
31
 
32
32
  it('\'Select the symbols to display to the students.\' help text should be displayed below the title', () => {
@@ -1,5 +1,7 @@
1
+ import { dialogBoxBase } from "../../../pages";
1
2
  import { feedbackScalePage } from "../../../pages/feedbackScalePage";
2
3
  import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
3
5
 
4
6
  describe('Create question page - Feedback scale: Header section and Saving question', () => {
5
7
  before(() => {
@@ -30,7 +32,33 @@ describe('Create question page - Feedback scale: Header section and Saving quest
30
32
  feedbackScalePage.steps.navigateToCreateQuestion('feedback scale')
31
33
  });
32
34
 
33
- feedbackScalePage.tests.verifyCancelButton('feedback scale');
35
+ it('When user has made no edits and clicks on Cancel button, the user should be directed back to the \'Select a Question\' page', () => {
36
+ feedbackScalePage.steps.clickOnCancelButton();
37
+ utilities.verifyElementVisibilityState(feedbackScalePage.selectAQuestionHeaderText(), 'visible');
38
+ utilities.verifyElementVisibilityState(feedbackScalePage.questionTypeOptionTitle(), 'visible');
39
+ });
40
+
41
+ it('When user has made some edits/changes and clicks on Cancel button, a popup should be displayed', () => {
42
+ feedbackScalePage.steps.selectQuestionType('feedback scale');
43
+ feedbackScalePage.steps.addTextInQuestionInstructionsInputField('Feedback scale');
44
+ feedbackScalePage.steps.clickOnCancelButton();
45
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
46
+ });
47
+
48
+ dialogBoxBase.tests.verifyContentsOfLeavePagePopupWithCSSAnda11y();
49
+
50
+ it(`Clicking on \'No, I'd like to go back\' button should close the popup and user should remain on the edit interface of the question`, () => {
51
+ dialogBoxBase.steps.clickOnRejectButtonInDialogBox();
52
+ feedbackScalePage.steps.verifyEditTabSelectedState();
53
+ utilities.verifyTextContent(feedbackScalePage.questionInstructionsInputField(), 'Feedback scale');
54
+ });
55
+
56
+ it(`Clicking on \'Yes, I want to leave this page\' button should discard all changes and direct the user to the \'Select a question\' page.`, () => {
57
+ feedbackScalePage.steps.clickOnCancelButton();
58
+ dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
59
+ utilities.verifyElementVisibilityState(feedbackScalePage.selectAQuestionHeaderText(), 'visible');
60
+ utilities.verifyElementVisibilityState(feedbackScalePage.questionTypeOptionTitle(), 'visible');
61
+ });
34
62
  });
35
63
 
36
64
  describe('Saving a question', () => {
@@ -30,11 +30,11 @@ describe('Preview tab contents for all views', () => {
30
30
  fillInTheGapsDragAndDropPage.steps.focusInOptionsInputField(0);
31
31
  fillInTheGapsDragAndDropPage.steps.selectImageOptionFromCKEditorToolbar();
32
32
  fillInTheGapsDragAndDropPage.steps.addImageToInputField();
33
- fillInTheGapsDragAndDropPage.steps.enterTextInOptionInputField(0, 'Petals');
33
+ fillInTheGapsDragAndDropPage.steps.addTextInputToOptionsInputFieldWithImage(0);
34
34
  cy.log('Add bold text to input field')
35
35
  fillInTheGapsDragAndDropPage.steps.focusInOptionsInputField(1);
36
36
  fillInTheGapsDragAndDropPage.steps.selectBoldOptionFromCKEditorToolbar();
37
- fillInTheGapsDragAndDropPage.steps.enterTextInOptionInputField(1, 'This is a bold option');
37
+ fillInTheGapsDragAndDropPage.steps.addBoldTextInputToOptionsInputField(1);
38
38
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Solve the following': 1, 'Petals': 2, 'This is a bold option': 0 });
39
39
  fillInTheGapsDragAndDropPage.steps.allotPoints(10);
40
40
  fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
@@ -327,7 +327,7 @@ describe('Create Item page - Fill in the gaps with drag and drop: Student view s
327
327
  it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
328
328
  fillInTheGapsDragAndDropPage.steps.switchToEditTab();
329
329
  fillInTheGapsDragAndDropPage.steps.expandMaxCheckAnswerAttemptsDropdown();
330
- fillInTheGapsDragAndDropPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
330
+ fillInTheGapsDragAndDropPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
331
331
  fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
332
332
  fillInTheGapsDragAndDropPage.steps.verifyCheckAnswerButtonEnabled();
333
333
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0 });
@@ -171,7 +171,7 @@ describe('Create Item page - Fill in the gaps with dropdown: Student view settin
171
171
  it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
172
172
  fillInTheGapsDropdownPage.steps.switchToEditTab();
173
173
  fillInTheGapsDropdownPage.steps.expandMaxCheckAnswerAttemptsDropdown();
174
- fillInTheGapsDropdownPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
174
+ fillInTheGapsDropdownPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
175
175
  fillInTheGapsDropdownPage.steps.switchToPreviewTab();
176
176
  fillInTheGapsDropdownPage.steps.verifyCheckAnswerButtonEnabled();
177
177
  fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsForDropdown[0] }]);
@@ -189,6 +189,7 @@ describe('Create item page - fill in the gaps over image - drag and drop: Scorin
189
189
  });
190
190
  });
191
191
 
192
+ //Failing die to https://redmine.zeuslearning.com/issues/567278
192
193
  describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
193
194
  abortEarlySetup();
194
195
  before(() => {
@@ -28,16 +28,16 @@ describe('Preview tab contents for all views', () => {
28
28
  fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
29
29
  fillInTheGapsOverImageDragAndDropPage.steps.insertTextArea(20, 'This is a text area');
30
30
  cy.log('Add image to option input field')
31
+ fillInTheGapsOverImageDragAndDropPage.steps.editOptionInputField(0, 'Petals');
31
32
  fillInTheGapsOverImageDragAndDropPage.steps.focusInOptionsInputField(0);
32
33
  fillInTheGapsOverImageDragAndDropPage.steps.selectImageOptionFromCKEditorToolbar();
33
34
  fillInTheGapsOverImageDragAndDropPage.steps.addImageToInputField();
34
- fillInTheGapsOverImageDragAndDropPage.steps.enterTextInOptionInputField(0, 'Petals');
35
35
  cy.log('Add bold text to input field')
36
36
  fillInTheGapsOverImageDragAndDropPage.steps.focusInOptionsInputField(1);
37
37
  fillInTheGapsOverImageDragAndDropPage.steps.selectBoldOptionFromCKEditorToolbar();
38
38
  fillInTheGapsOverImageDragAndDropPage.steps.enterTextInOptionInputField(1, 'This is a bold option');
39
39
  cy.log('Add equation to option input field')
40
- fillInTheGapsOverImageDragAndDropPage.steps.enterTextInOptionInputField(2, 'Solve the following');
40
+ fillInTheGapsOverImageDragAndDropPage.steps.editOptionInputField(2, 'Solve the following');
41
41
  fillInTheGapsOverImageDragAndDropPage.steps.focusInOptionsInputField(2);
42
42
  fillInTheGapsOverImageDragAndDropPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
43
43
  fillInTheGapsOverImageDragAndDropPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
@@ -360,7 +360,7 @@ describe('Create Item page - Fill in the gaps over image - drag and drop: Studen
360
360
  it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
361
361
  fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
362
362
  fillInTheGapsOverImageDragAndDropPage.steps.expandMaxCheckAnswerAttemptsDropdown();
363
- fillInTheGapsOverImageDragAndDropPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
363
+ fillInTheGapsOverImageDragAndDropPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
364
364
  fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
365
365
  fillInTheGapsOverImageDragAndDropPage.steps.verifyCheckAnswerButtonEnabled();
366
366
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0 });
@@ -196,7 +196,7 @@ describe('Create Item page - Fill in the gaps over image - dropdown: Student vie
196
196
  it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
197
197
  fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
198
198
  fillInTheGapsOverImageDropdownPage.steps.expandMaxCheckAnswerAttemptsDropdown();
199
- fillInTheGapsOverImageDropdownPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
199
+ fillInTheGapsOverImageDropdownPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
200
200
  fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
201
201
  fillInTheGapsOverImageDropdownPage.steps.verifyCheckAnswerButtonEnabled();
202
202
  fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsForDropdown[0] }]);
@@ -203,17 +203,17 @@ describe('Create item page - Fill in the gaps over image with text: Partial diff
203
203
  fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaves' }, { responseIndex: 2, responseText: 'Branch' }]);
204
204
  fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(12.6, 15);
205
205
  fillInTheGapsOverImageTextPage.steps.switchToGradingView();
206
- fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(0);
206
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(0);
207
207
  fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(1);
208
- fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(2);
208
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(2);
209
209
  fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
210
210
  fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
211
211
  fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
212
212
  cy.log('When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternative accordion answers and clicks on \'Check answer\' button, then correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect answer status message should not be displayed and correct answer section with all correct answers from the correct accordion along with response area numeration should be displayed')
213
213
  fillInTheGapsOverImageTextPage.steps.checkAnswer();
214
- fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(0);
214
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(0);
215
215
  fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(1);
216
- fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(2);
216
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(2);
217
217
  fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
218
218
  fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerSectionNotExists();
219
219
  });
@@ -187,7 +187,7 @@ describe('Create item page - Fill in the gaps over image with text: Partial equa
187
187
  fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(1);
188
188
  fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(2);
189
189
  fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
190
- fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Roots']);
190
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Branch']);
191
191
  fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
192
192
  cy.log('When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion and clicks on the \'Check answer\' button, correct icons should be displayed beside correct accordion responses, incorrect icons should be displayed beside alternative accordion responses, correct/incorrect answer label and its border, correct answer container should not be displayed')
193
193
  fillInTheGapsOverImageTextPage.steps.checkAnswer();
@@ -121,7 +121,7 @@ describe('Create Item page - drag and drop into categories: Student view setting
121
121
  it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
122
122
  fillInTheGapsOverImageTextPage.steps.switchToEditTab();
123
123
  fillInTheGapsOverImageTextPage.steps.expandMaxCheckAnswerAttemptsDropdown();
124
- fillInTheGapsOverImageTextPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
124
+ fillInTheGapsOverImageTextPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
125
125
  fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
126
126
  fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
127
127
  fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
@@ -196,20 +196,20 @@ describe('Create item page - Fill in the gaps with text: Partial different weigh
196
196
  fillInTheGapsTextPage.steps.expandCorrectAnswerAccordion();
197
197
  fillInTheGapsTextPage.steps.allotPartialDifferentWeightsPoints({ 0: 1.2, 1: 2.2, 2: 1.6 });
198
198
  fillInTheGapsTextPage.steps.switchToPreviewTab();
199
- fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Petals' }, { responseIndex: 1, responseText: 'Leaves' }, { responseIndex: 2, responseText: 'Branch' }]);
199
+ fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Branch' }]);
200
200
  fillInTheGapsTextPage.steps.verifyPreviewScore(10.4, 23);
201
201
  fillInTheGapsTextPage.steps.switchToGradingView();
202
- fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
202
+ fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
203
203
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
204
- fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
204
+ fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
205
205
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
206
206
  fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
207
207
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
208
208
  cy.log('When the user attempts the question with more number of correct responses from the correct accordion than the alternative accordion but the score of the individual response selected from the alternative accordion overpowers the combined score of the correct accordion answers and clicks on the \'Check answer\' button, correct icon icons should be displayed beside the correct responses from the correct accordion, incorrect icons should be displayed beside the incorrectly answered responses, correct/incorrect answer status message and correct answer section should not be displayed')
209
209
  fillInTheGapsTextPage.steps.checkAnswer();
210
- fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
210
+ fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
211
211
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
212
- fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
212
+ fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
213
213
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
214
214
  fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
215
215
  });
@@ -199,17 +199,16 @@ describe('Create item page - Fill in the gaps with text: Partial different weigh
199
199
  fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaves' }, { responseIndex: 2, responseText: 'Branch' }]);
200
200
  fillInTheGapsTextPage.steps.verifyPreviewScore(12.6, 15);
201
201
  fillInTheGapsTextPage.steps.switchToGradingView();
202
- fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
202
+ fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
203
203
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
204
- fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
204
+ fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
205
205
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
206
206
  fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
207
207
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
208
208
  cy.log('When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternative accordion answers and clicks on \'Check answer\' button, then correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect answer status message should not be displayed and correct answer section with all correct answers from the correct accordion along with response area numeration should be displayed')
209
209
  fillInTheGapsTextPage.steps.checkAnswer();
210
- fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
211
210
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
212
- fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
211
+ fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
213
212
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
214
213
  fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
215
214
  });
@@ -183,7 +183,7 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights w
183
183
  fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
184
184
  fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
185
185
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
186
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Roots']);
186
+ fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Branch']);
187
187
  fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
188
188
  cy.log('When the user has attempted the question with more number of correct responses from the correct accordion than the alternative accordion but the score of the individual response selected from the alternative accordion overpowers the combined score of the correct accordion answers and clicks on the \'Check answer\' button, correct icons should be displayed for the alternative accordion response, incorrect icon should be displayed for the correct accordion responses, correct/incorrect answer status message and correct answer section should not be displayed')
189
189
  fillInTheGapsTextPage.steps.checkAnswer();
@@ -57,6 +57,7 @@ describe('Create item page - Fill in the gaps with text: Header section and savi
57
57
  it('Validation error messages should disappear when required input fields are filled', () => {
58
58
  fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('Question instruction');
59
59
  fillInTheGapsTextPage.steps.allotPoints(10);
60
+ fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
60
61
  fillInTheGapsTextPage.steps.verifyErrorMessageIsNotDisplayed();
61
62
  fillInTheGapsTextPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
62
63
  });
@@ -114,7 +114,7 @@ describe('Create Item page - Fill in the gaps with text: Student view settings',
114
114
  it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
115
115
  fillInTheGapsTextPage.steps.switchToEditTab();
116
116
  fillInTheGapsTextPage.steps.expandMaxCheckAnswerAttemptsDropdown();
117
- fillInTheGapsTextPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
117
+ fillInTheGapsTextPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
118
118
  fillInTheGapsTextPage.steps.switchToPreviewTab();
119
119
  fillInTheGapsTextPage.steps.verifyCheckAnswerButtonEnabled();
120
120
  fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
@@ -161,7 +161,7 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
161
161
  utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
162
162
  graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
163
163
  utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
164
- graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ 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 }]);
164
+ 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 }]);
165
165
 
166
166
  //Correct answer section
167
167
  utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
@@ -183,7 +183,7 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
183
183
  utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
184
184
  graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
185
185
  utilities.verifyElementCount(graphingPage.graphPolygonPreviewTab(), 1);
186
- graphingPage.steps.verifyIncorrectPointsPlottedOnGraphPreviewTab([{ 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 }]);
186
+ 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 }]);
187
187
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
188
188
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
189
189
  });
@@ -203,7 +203,7 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
203
203
  utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
204
204
  graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
205
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 }]);
206
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
207
207
 
208
208
  //Correct answer section
209
209
  utilities.verifyElementCount(graphingPage.graphCircleCorrectAnswerSection(), 2);
@@ -226,7 +226,7 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
226
226
  utilities.verifyElementCount(graphingPage.graphLinePreviewTab(), 1);
227
227
  graphingPage.steps.verifyPointsPlottedOnPreviewTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
228
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 }]);
229
+ graphingPage.steps.verifyCorrectPointsPlottedOnGraphPreviewTab([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
230
230
  graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
231
231
  graphingPage.steps.verifyCorrectAnswerSectionNotExist();
232
232
  });