itemengine-cypress-automation 1.0.119 → 1.0.121

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +13 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -0
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -0
  4. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +2 -0
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +1 -4
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +273 -0
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAnswerFunctionalityForAllViews.smoke.js +116 -0
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +136 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +224 -0
  12. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +120 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViews.smoke.js +158 -0
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +1 -1
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -4
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +246 -0
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +332 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +409 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +80 -0
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +213 -0
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +2 -2
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +1 -1
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -2
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +68 -68
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +6 -6
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +3 -289
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -1
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +2 -2
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -23
  32. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +191 -0
  33. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +190 -0
  34. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +284 -0
  35. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  36. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +113 -0
  37. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +217 -0
  38. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +234 -0
  39. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +217 -0
  40. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +217 -0
  41. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsBasic.js +136 -0
  42. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +197 -0
  43. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +169 -0
  44. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +197 -0
  45. package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +219 -0
  46. package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAnswerFunctionalityForAllViews.smoke.js +115 -0
  47. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +142 -0
  48. package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViews.smoke.js +152 -0
  49. package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +39 -0
  50. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +2 -12
  51. package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +497 -0
  52. package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +503 -0
  53. package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +233 -0
  54. package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +291 -0
  55. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +332 -0
  56. package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +2 -12
  57. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +9 -8
  58. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +4 -4
  59. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -2
  60. package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +5 -2
  61. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +334 -0
  62. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +419 -0
  63. package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +166 -0
  64. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +166 -0
  65. package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +51 -0
  66. package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +99 -0
  67. package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +71 -0
  68. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +155 -0
  69. package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +66 -0
  70. package/cypress/e2e/migration/migration.js +6 -5
  71. package/cypress/e2e/migration/migration2.js +4 -3
  72. package/cypress/e2e/migration/migration3.js +4 -3
  73. package/cypress/e2e/migration/migration4.js +4 -3
  74. package/cypress/e2e/migration/migration5.js +4 -3
  75. package/cypress/fixtures/theme/ilc.json +3 -1
  76. package/cypress/pages/audioResponsePage.js +2 -1
  77. package/cypress/pages/components/additionalSettingsPanel.js +27 -0
  78. package/cypress/pages/components/autoScoredPreviewBase.js +1 -1
  79. package/cypress/pages/components/autoScoredScoringSection.js +1 -1
  80. package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +1 -1
  81. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
  82. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +2 -2
  83. package/cypress/pages/components/autoScoredStudentViewSettings.js +8 -1
  84. package/cypress/pages/components/backgroundImageUploadComponent.js +5 -5
  85. package/cypress/pages/components/createQuestionBasePage.js +8 -2
  86. package/cypress/pages/components/essayResponseCommonComponents.js +6 -0
  87. package/cypress/pages/components/fillInTheGapsCommonComponents.js +13 -0
  88. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +40 -0
  89. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +422 -314
  90. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +438 -710
  91. package/cypress/pages/components/{figOverImageCanvasComponent.js → imageCanvasComponent.js} +274 -272
  92. package/cypress/pages/components/index.js +3 -3
  93. package/cypress/pages/components/maximumRecorderLengthComponent.js +55 -11
  94. package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +1 -1
  95. package/cypress/pages/components/questionInputFieldComponent.js +49 -23
  96. package/cypress/pages/components/scoringSectionBase.js +1 -1
  97. package/cypress/pages/createItemPage.js +67 -2
  98. package/cypress/pages/fillInTheGapsDragAndDropPage.js +172 -711
  99. package/cypress/pages/fillInTheGapsDropdownPage.js +75 -72
  100. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +4 -4
  101. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +109 -273
  102. package/cypress/pages/fillInTheGapsOverImageTextPage.js +49 -291
  103. package/cypress/pages/fillInTheGapsTextPage.js +52 -199
  104. package/cypress/pages/index.js +5 -5
  105. package/cypress/pages/multipleSelectionPage.js +1 -0
  106. package/cypress/pages/shortTextResponsePage.js +575 -33
  107. package/cypress/pages/singleSelectionGridPage.js +1 -2
  108. package/cypress/pages/singleSelectionPage.js +5 -6
  109. package/cypress/pages/textEntryMathPage.js +46 -22
  110. package/cypress/pages/textEntryMathWithImagePage.js +212 -0
  111. package/cypress/pages/uploadResponsePage.js +74 -21
  112. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +73 -2
  113. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
  114. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +49 -2
  115. package/package.json +1 -1
  116. package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +0 -482
  117. package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +0 -412
  118. package/cypress/pages/components/figOverImageCommonComponent.js +0 -1113
  119. package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +0 -1155
  120. package/cypress/pages/dragAndDropIntoCategoriesCellsScoring.js +0 -1561
  121. package/cypress/pages/dragAndDropIntoCategoriesResponseScoring.js +0 -1396
  122. package/cypress/pages/fillInTheGapsScoring.js +0 -5872
  123. package/cypress/pages/fillInTheGapsSetCorrectAnswerSection.js +0 -260
@@ -1,224 +1,77 @@
1
- import { questionInstructionsComponent, scoringSectionBase, createQuestionBasePage, additionalSettingsPanel, commonComponents, autoScoredPreviewBase, autoScoredAdditionalSettings, autoScoredSetCorrectAnswerSection, autoScoredScoringSectionMultipleResponsesType, autoScoredScoringSection, fillInTheGapsCommonComponents, specialCharactersFlyoutComponent, specialAndCustomSpecialCharactersComponent, previewScoringAndShowCorrectAnswerComponent, questionInputFieldComponent } from "./components";
2
- import { answerNumerationComponent } from "./components/answerNumerationComponent";
1
+ import utilities from "../support/helpers/utilities";
2
+ import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, commonComponents, autoScoredScoringPreviewTab, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, acceptedStudentInputComponent, customizeSpecialCharacterComponent, fillInTheGapsTextCommonComponent, questionInputFieldComponent, additionalSettingsPanel } from "./components";
3
3
  const css = Cypress.env('css');
4
4
 
5
5
  const selectors = {
6
- ...scoringSectionBase,
7
- ...createQuestionBasePage,
8
- ...additionalSettingsPanel,
9
6
  ...questionInstructionsComponent,
10
7
  ...commonComponents,
11
- ...autoScoredSetCorrectAnswerSection,
12
- ...autoScoredAdditionalSettings,
13
- ...autoScoredPreviewBase,
14
- ...autoScoredScoringSectionMultipleResponsesType,
15
- ...fillInTheGapsCommonComponents,
16
- ...specialCharactersFlyoutComponent,
17
- ...specialAndCustomSpecialCharactersComponent,
18
- ...previewScoringAndShowCorrectAnswerComponent,
19
- ...answerNumerationComponent,
8
+ ...correctIncorrectAnswerLabelComponent,
9
+ ...customizeSpecialCharacterComponent,
10
+ ...autoScoredScoringSectionMultiResponseType,
11
+ ...autoScoredSpecifyCorrectAnswerSection,
12
+ ...autoScoredStudentViewSettings,
13
+ ...autoScoredScoringPreviewTab,
14
+ ...fillInTheGapsTextCommonComponent,
20
15
  ...questionInputFieldComponent,
21
- setCorrectAnswerResponseField: () => cy.get('.response-input-field input[type="text"]'),
22
- caseSensitiveLabel: () => cy.get('[data-ngie-testid="case-sensitive-checkbox"] .MuiFormControlLabel-label'),
23
- ignoreSpacesBeforeAndAfterLabel: () => cy.get('[data-ngie-testid="ignore-spaces-before-and-after-checkbox"] .MuiFormControlLabel-label'),
24
- matchFromAllResponsesLabel: () => cy.get('[data-ngie-testid="match-from-all-responses-checkbox"] .MuiFormControlLabel-label'),
25
- caseSensitiveCheckbox: () => cy.get('[data-ngie-testid="case-sensitive-checkbox"] input'),
26
- ignoreSpacesBeforeAndAfterCheckbox: () => cy.get('[data-ngie-testid="ignore-spaces-before-and-after-checkbox"] input'),
27
- matchFromAllResponsesCheckbox: () => cy.get('[data-ngie-testid="match-from-all-responses-checkbox"] input'),
28
- //Additional settings
29
- multilineResponseLabel: () => cy.get('[data-ngie-testid="multiline-response-checkbox"] .MuiFormControlLabel-label'),
30
- multilineResponseCheckbox: () => cy.get('[data-ngie-testid="multiline-response-checkbox"] input'),
31
- setCorrectAnswerMultilineTextArea: () => cy.get('.response-multiline-input-field'),
32
- previewTabMultilineTextArea: () => cy.get('.cloze-with-text-response-preview-wrapper .response-multiline-input-field'),
33
- spellCheckLabel: () => cy.get('[data-ngie-testid="spell-check-checkbox"] .MuiFormControlLabel-label'),
34
- spellCheckCheckbox: () => cy.get('[data-ngie-testid="spell-check-checkbox"] input'),
35
- previewTabResponseFieldSpecialCharactersButton: () => cy.get('.cloze-with-text-response-preview-wrapper .custon-special-character-button'),
36
- typeOfAnswerInputLabel: () => cy.get('.additional-settings-label[id*="Type-of-Answer-input"]'),
37
- typeOfAnswerInputDropdown: () => cy.get('.drop-down-parent[id*="Type-of-Answer-input"]').eq(0),
38
- typeOfAnswerInputDropdownListOptions: (optionNumber) => cy.get('[aria-labelledby*="Type-of-Answer-input"] .dropdown-menu-item').eq(optionNumber),
39
- setCharacterLimitLabel: () => cy.get('[aria-labelledby="Set character limit"]'),
40
- setCharacterLimitInputField: () => cy.get('.dropdown-wrapper .text-input-field input[type="text"]').eq(0),
41
- //Preview tab
42
- previewTabResponseField: () => cy.get('.cloze-with-text-response-preview-wrapper [type="text"]'),
43
- previewTabResponseFieldWrapper: () => cy.get('.cloze-with-text-answer-status-response-preview-wrapper'),
44
16
  }
45
17
 
46
18
  const steps = {
47
19
  ...createQuestionBasePage.steps,
48
20
  ...questionInstructionsComponent.steps,
49
- ...scoringSectionBase.steps,
50
- ...additionalSettingsPanel.steps,
51
- ...autoScoredSetCorrectAnswerSection.steps,
52
- ...autoScoredPreviewBase.steps,
53
- ...autoScoredSetCorrectAnswerSection.steps,
54
- ...autoScoredScoringSection.steps,
55
- ...autoScoredAdditionalSettings.steps,
56
- ...fillInTheGapsCommonComponents.steps,
57
- ...specialCharactersFlyoutComponent.steps,
58
- ...autoScoredScoringSectionMultipleResponsesType.steps,
59
- ...answerNumerationComponent.steps,
21
+ ...commonComponents.steps,
22
+ ...scoringSectionBaseEditTab.steps,
23
+ ...autoScoredScoringPreviewTab.steps,
24
+ ...autoScoredSpecifyCorrectAnswerSection.steps,
25
+ ...autoScoredScoringSectionMultiResponseType.steps,
26
+ ...correctIncorrectAnswerLabelComponent.steps,
27
+ ...autoScoredStudentViewSettings.steps,
28
+ ...acceptedStudentInputComponent.steps,
29
+ ...customizeSpecialCharacterComponent.steps,
30
+ ...autoScoredStudentViewSettings.steps,
31
+ ...fillInTheGapsTextCommonComponent.steps,
60
32
  ...questionInputFieldComponent.steps,
61
- expandResponseAccordion: (responseIndex) => {
62
- fillInTheGapsTextPage.responseAccordionWrapper()
63
- .eq(responseIndex)
64
- .find('[role="button"]')
65
- .should('have.attr', 'aria-expanded', 'false')
66
- .click()
67
- .should('have.attr', 'aria-expanded', 'true');
33
+ ...additionalSettingsPanel.steps,
34
+ /**
35
+ * Verify that the incorrect option icon is displayed for a specific answer input field.
36
+ * @param {number} inputFieldIndex - The index of the answer input field to verify.
37
+ */
38
+ verifyIncorrectOptionIcon: (inputFieldIndex) => {
39
+ utilities.getNthElement(fillInTheGapsTextCommonComponent.responseStatusWrapper(), inputFieldIndex)
40
+ .within(() => {
41
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'visible');
42
+ });
68
43
  },
69
44
 
70
- setCorrectAnswerResponses: (responseTextArray) => {
71
- responseTextArray.forEach((responseFieldText, count) => {
72
- fillInTheGapsTextPage.setCorrectAnswerResponseField()
73
- .eq(count)
74
- .type(responseFieldText)
75
- .should('have.value', responseFieldText);
76
- });
45
+ /**
46
+ * Verify that the correct option icon is displayed for a specific answer input field.
47
+ * @param {number} inputFieldIndex - The index of the answer input field to verify.
48
+ */
49
+ verifyCorrectOptionIcon: (inputFieldIndex) => {
50
+ utilities.getNthElement(fillInTheGapsTextCommonComponent.responseStatusWrapper(), inputFieldIndex)
51
+ .within(() => {
52
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
53
+ });
77
54
  },
78
55
 
79
- verifyAnswerInputScoreAndCorrectIncorrectAnswerLabel: (answerInput, score, isCorrect) => {
80
- cy.log('Pre-requisite: This can only be used for questions with single response fields');
81
- fillInTheGapsTextPage.previewTabResponseField()
82
- .clear()
83
- .type(answerInput)
84
- .blur();
85
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
86
- .verifyInnerText(score);
87
- autoScoredPreviewBase.checkAnswerButton()
88
- .realClick();
89
- if (isCorrect) {
90
- fillInTheGapsTextPage.steps.verifyCorrectOptionCheckmarkIcon('0');
91
- autoScoredPreviewBase.steps.verifyCorrectIncorrectAnswerLabel('Correct');
92
- } else {
93
- fillInTheGapsTextPage.steps.verifyIncorrectOptionCrossmarkIcon('0');
94
- autoScoredPreviewBase.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
95
- };
56
+ /**
57
+ * Verify that both correct and incorrect option icons do not exist for a specific answer input field.
58
+ * @param {number} inputFieldIndex - The index of the answer input field to verify.
59
+ */
60
+ verifyCorrectIncorrectIconNotExist: (inputFieldIndex) => {
61
+ utilities.getNthElement(fillInTheGapsTextCommonComponent.responseStatusWrapper(), inputFieldIndex)
62
+ .within(() => {
63
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'notExist');
64
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'notExist');
65
+ });
96
66
  },
97
-
98
- enterAnswerResponsesInPreviewTab: (responseTextArray) => {
99
- responseTextArray.forEach((responseFieldText, count) => {
100
- fillInTheGapsTextPage.previewTabResponseField()
101
- .eq(count)
102
- .clear()
103
- .type(responseFieldText)
104
- .should('have.value', responseFieldText);
105
- });
106
- }
107
67
  }
108
68
 
109
69
  const tests = {
110
- ...commonComponents.tests,
111
- ...createQuestionBasePage.tests,
70
+ ...autoScoredScoringPreviewTab.tests,
112
71
  ...questionInstructionsComponent.tests,
113
- ...additionalSettingsPanel.tests,
114
- ...scoringSectionBase.tests,
115
- ...autoScoredSetCorrectAnswerSection.tests,
116
- ...autoScoredAdditionalSettings.tests,
117
- ...autoScoredScoringSection.tests,
118
- ...fillInTheGapsCommonComponents.tests,
119
- ...specialCharactersFlyoutComponent.tests,
120
- ...specialAndCustomSpecialCharactersComponent.tests,
121
- ...previewScoringAndShowCorrectAnswerComponent.tests,
122
- ...autoScoredScoringSectionMultipleResponsesType.tests,
123
- ...answerNumerationComponent.tests,
72
+ ...commonComponents.tests,
124
73
  ...questionInputFieldComponent.tests,
125
- verifySetCorrectAnswerTabContentsAndFunctionality: (tabName) => {
126
- it(`CSS of ${tabName} contents`, { tags: 'css' }, () => {
127
- fillInTheGapsTextPage.setCorrectAnswerResponseFieldLabel()
128
- .eq(0)
129
- .verifyCSS(css.color.labels, css.fontSize.default, css.fontWeight.regular);
130
- fillInTheGapsTextPage.setCorrectAnswerResponseField()
131
- .eq(0)
132
- .verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
133
- });
134
-
135
- it('By default, an empty points input field and two empty response fields with labels \'Response 1\' and \'Response 2\' should be present', () => {
136
- fillInTheGapsTextPage.pointsInputField()
137
- .should('have.value', '');
138
- for (let index = 0; index < 2; index++) {
139
- fillInTheGapsTextPage.setCorrectAnswerResponseFieldLabel()
140
- .eq(index)
141
- .verifyInnerText(`Response ${index + 1}`);
142
- fillInTheGapsTextPage.setCorrectAnswerResponseField()
143
- .eq(index)
144
- .should('be.visible');
145
- };
146
- });
147
-
148
- it('User should be able to enter text in the empty response field', () => {
149
- fillInTheGapsTextPage.setCorrectAnswerResponseField()
150
- .eq(0)
151
- .type('Lorem Ipsum')
152
- .should('have.value', 'Lorem Ipsum');
153
- });
154
-
155
- it(`When the user has only partially filled response fields out of the available response fields, \'Error: Please set a correct answer.\' validation error message should be thrown along with an error icon on the \'${tabName}\'`, () => {
156
- fillInTheGapsTextPage.setCorrectAnswerResponseField()
157
- .eq(1)
158
- .focus()
159
- .blur();
160
- commonComponents.errorMessage()
161
- .should('have.text', 'Error: Please set a correct answer.');
162
- if (tabName == 'Correct tab') {
163
- autoScoredSetCorrectAnswerSection.correctTab()
164
- .within(() => {
165
- autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon()
166
- .should('be.visible');
167
- });
168
- } else {
169
- autoScoredSetCorrectAnswerSection.alternateAnswerTab(1)
170
- .within(() => {
171
- autoScoredSetCorrectAnswerSection.setCorrectAnswerErrorIcon()
172
- .should('be.visible');
173
- });
174
- };
175
- });
176
-
177
- autoScoredSetCorrectAnswerSection.tests.verifyCSSAndA11yOfAutoScoredSetCorrectAnswerErrorMessage();
178
-
179
- it('CSS of response field error state', { tags: 'css' }, () => {
180
- fillInTheGapsTextPage.setCorrectAnswerResponseField()
181
- .eq(1)
182
- .parents('.response-input-field')
183
- .should('have.css', 'background-color', css.color.errorFieldBg)
184
- .find('fieldset')
185
- .should('have.css', 'border', `1px solid ${css.color.errorFieldBorder}`)
186
- });
187
-
188
- it('Accessibility of response field error state', { tags: 'a11y' }, () => {
189
- cy.checkAccessibility(fillInTheGapsTextPage.setCorrectAnswerResponseField().parents('.cloze-with-text-response-form-controls-wrapper'));
190
- });
191
-
192
- it('When the user has added text in all the available response fields, the error message should disappear', () => {
193
- fillInTheGapsTextPage.setCorrectAnswerResponseField()
194
- .eq(1)
195
- .type('dolor sit amet')
196
- .should('have.value', 'dolor sit amet');
197
- commonComponents.errorMessage()
198
- .should('not.exist');
199
- });
200
-
201
- autoScoredSetCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(tabName);
202
- },
203
-
204
- verifyMinimumScoreAwardedForIncorrectAnswer: (totalPoints) => {
205
- it('When user has provided minimum score awarded (if attempted) points, then in Preview tab on entering incorrect answer, minimum score should be provided for the question', () => {
206
- cy.log('Switch to edit tab and set minimum score if attempted points')
207
- createQuestionBasePage.steps.switchToEditTab();
208
- scoringSectionBase.minimumScoreIfAttemptedInputField()
209
- .type('1')
210
- .should('have.value', '1');
211
- createQuestionBasePage.steps.switchToPreviewTab()
212
- fillInTheGapsTextPage.previewTabResponseField()
213
- .eq(0)
214
- .type('Incorrect answer')
215
- .blur();
216
- previewScoringAndShowCorrectAnswerComponent.previewScoreText()
217
- .then(($points) => {
218
- expect($points.text()).to.equal(`1/${totalPoints}`);
219
- });
220
- });
221
- }
74
+ ...fillInTheGapsTextCommonComponent.tests
222
75
  }
223
76
 
224
77
  export const fillInTheGapsTextPage = {
@@ -11,14 +11,10 @@ export * from './fillInTheGapsTextPage';
11
11
  export * from './essayResponseMathPage';
12
12
  export * from './shortTextResponsePage';
13
13
  export * from './fillInTheGapsDropdownPage';
14
- export * from './fillInTheGapsScoring';
15
14
  export * from './fillInTheGapsDragAndDropPage';
16
- export * from './fillInTheGapsSetCorrectAnswerSection';
17
15
  export * from './dragAndDropIntoCategoriesPage';
18
16
  export * from './listMatchingPage';
19
- export * from './dragAndDropIntoCategoriesResponseScoring'
20
17
  export * from './listMatchingScoring';
21
- export * from './dragAndDropIntoCategoriesAllOrNothingScoring';
22
18
  export * from './passagePage';
23
19
  export * from './highlightPage';
24
20
  export * from './videoResponsePage';
@@ -29,6 +25,9 @@ export * from './audioPlayerPage';
29
25
  export * from './highlightImagePage';
30
26
  export * from './fillInTheGapsOverImageDropdownPage';
31
27
  export * from './fillInTheGapsOverImageTextPage';
28
+ export * from './multipleSelectionGridPage';
29
+ export * from './singleSelectionGridPage';
30
+ export * from './feedbackScalePage';
32
31
  export * from './itemPreviewSettingsPage';
33
32
  export * from './itemPreviewPage';
34
33
  export * from './studentViewPage';
@@ -40,4 +39,5 @@ export * from './desmosGraphingPage';
40
39
  export * from './drawingResponsePage';
41
40
  export * from './protractorPage';
42
41
  export * from './textEntryMathPage';
43
- export * from './fillInTheGapsOverImageDragAndDropPage';
42
+ export * from './fillInTheGapsOverImageDragAndDropPage';
43
+ export * from './textEntryMathWithImagePage';
@@ -556,6 +556,7 @@ const tests = {
556
556
  ...optionsWrapperComponent.tests,
557
557
  ...equationEditorFlyout.tests,
558
558
  ...commonComponents.tests,
559
+ ...autoScoredStudentViewSettings.tests,
559
560
  /**
560
561
  * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
561
562
  * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.