itemengine-cypress-automation 1.0.72 → 1.0.73

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/cypress/e2e/ILC/AudioResponse/{audioResponseMinimalPreviewSection.js → audioResponseMinimalPreviewSection.smoke.js} +263 -254
  2. package/cypress/e2e/ILC/AudioResponse/{audioResponseStandardPreviewSection.js → audioResponseStandardPreviewSection.smoke.js} +100 -97
  3. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.smoke.js +121 -0
  4. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachCell.js → groupedOptionsPartialScoreForEachCell.smoke.js} +1 -1
  5. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachResponse.js → groupedOptionsPartialScoreForEachResponse.smoke.js} +1 -1
  6. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.smoke.js +164 -0
  7. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{standardTotalScoreDividedBetweenResponse.js → standardTotalScoreDividedBetweenResponse.smoke.js} +21 -18
  8. package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +753 -0
  9. package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.smoke.js +943 -0
  10. package/cypress/e2e/ILC/EssayResponse/{essayResponseCustomizeFormattingOptions1.js → essayResponseCustomizeFormattingOptions1.smoke.js} +113 -110
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +581 -0
  12. package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.smoke.js +111 -0
  13. package/cypress/e2e/ILC/EssayResponse/{essayResponsePreviewContentsForAllViews.js → essayResponsePreviewContentsForAllViews.smoke.js} +6 -3
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.smoke.js +81 -0
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/{fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.js → fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.smoke.js} +25 -22
  16. package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownAllOrNothingScoring.js → fillInTheGapsDropdownAllOrNothingScoring.smoke.js} +16 -14
  17. package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.smoke.js} +80 -74
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.smoke.js +361 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.smoke.js +137 -0
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.smoke.js +171 -0
  21. package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.smoke.js} +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextAllOrNothingScoring.js → fillInTheGapsOverImageTextAllOrNothingScoring.smoke.js} +32 -29
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextCheckAnswerForAllViews.js → fillInTheGapsOverImageTextCheckAnswerForAllViews.smoke.js} +5 -3
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.smoke.js +137 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.smoke.js +146 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewContentsForAllViews.js → fillInTheGapsOverImageTextPreviewContentsForAllViews.smoke.js} +5 -3
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewTab.js → fillInTheGapsOverImageTextPreviewTab.smoke.js} +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextShowCorrectAnswerForAllView.js → fillInTheGapsOverImageTextShowCorrectAnswerForAllView.smoke.js} +6 -4
  29. package/cypress/e2e/ILC/FillInTheGapsText/{fillInTheGapsTextAutoScoredScoring.js → fillInTheGapsTextAutoScoredScoring.smoke.js} +12 -9
  30. package/cypress/e2e/ILC/Highlight/HighlightScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +36 -34
  31. package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.smoke.js +462 -0
  32. package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.smoke.js +148 -0
  33. package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.smoke.js +185 -0
  34. package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.smoke.js +138 -0
  35. package/cypress/e2e/ILC/HighlightImage/{highlightImagePreviewTab.js → highlightImagePreviewTab.smoke.js} +1 -1
  36. package/cypress/e2e/ILC/HighlightImage/{highlightImageToolsFunctionalityPreviewTab.js → highlightImageToolsFunctionalityPreviewTab.smoke.js} +4 -4
  37. package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.smoke.js +122 -0
  38. package/cypress/e2e/ILC/ListMatching/{listMatchingAlternateAnswer.js → listMatchingAlternateAnswer.smoke.js} +47 -43
  39. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.smoke.js +211 -0
  40. package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.smoke.js +254 -0
  41. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.smoke.js +191 -0
  42. package/cypress/e2e/ILC/ListOrdering/ListOrderingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +34 -32
  43. package/cypress/e2e/ILC/ListSorting/ListSortingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +41 -38
  44. package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.smoke.js +269 -0
  45. package/cypress/e2e/ILC/MultipleSelectionGrid/{multipleSelectionGridAutoScoredScoring.js → multipleSelectionGridAutoScoredScoring.smoke.js} +36 -34
  46. package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.smoke.js +407 -0
  47. package/cypress/e2e/ILC/SingleSelectionGrid/{singleSelectionGridAutoScoredScoring.js → singleSelectionGridAutoScoredScoring.smoke.js} +32 -29
  48. package/cypress/e2e/ILC/UploadResponse/{uploadResponsePreview.js → uploadResponsePreview.smoke.js} +64 -59
  49. package/cypress/e2e/ILC/VideoResponse/{videoResponsePreviewTab.js → videoResponsePreviewTab.smoke.js} +290 -281
  50. package/cypress/pages/components/additionalSettingsPanel.js +0 -27
  51. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
  52. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +321 -0
  53. package/cypress/pages/components/createQuestionBasePage.js +1 -7
  54. package/cypress/pages/components/essayResponseCommonComponents.js +0 -6
  55. package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -13
  56. package/cypress/pages/components/index.js +2 -1
  57. package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -10
  58. package/cypress/pages/components/scoringSectionBase.js +3 -2
  59. package/cypress/pages/createItemPage.js +3 -79
  60. package/cypress/pages/dialogBoxBase.js +8 -23
  61. package/cypress/pages/index.js +1 -4
  62. package/cypress/pages/itemPreviewSettingsPage.js +446 -0
  63. package/cypress/pages/multipleSelectionPage.js +113 -64
  64. package/cypress/pages/selectQuestionResourceToolPage.js +0 -5
  65. package/cypress/pages/shortTextResponsePage.js +0 -6
  66. package/cypress/pages/singleSelectionPage.js +0 -1
  67. package/package.json +2 -2
  68. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.js +0 -116
  69. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.js +0 -160
  70. package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.js +0 -932
  71. package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.js +0 -572
  72. package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.js +0 -106
  73. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.js +0 -76
  74. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.js +0 -134
  75. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js +0 -133
  76. package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.js +0 -457
  77. package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.js +0 -143
  78. package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.js +0 -178
  79. package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.js +0 -125
  80. package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.js +0 -117
  81. package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.js +0 -207
  82. package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.js +0 -246
  83. package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.js +0 -185
  84. package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettings.js +0 -820
  85. package/cypress/e2e/ILC/ListSorting/listSortingAutoScoredScoring.js +0 -936
  86. package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.js +0 -263
  87. package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.js +0 -402
  88. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.js +0 -356
  89. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.js +0 -134
  90. package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.js +0 -156
@@ -0,0 +1,446 @@
1
+ import utilities from "../support/helpers/utilities";
2
+ import { createItemPage } from "./createItemPage";
3
+ import { commonComponents } from "./components";
4
+
5
+ const selectors = {
6
+ ...createItemPage,
7
+ headerWrapper: () => cy.get('.settings-header-wrapper'),
8
+ //HeadingSectionSelectors
9
+ settingsLabel: () => cy.get('.settings-label'),
10
+ cancelLabel: () => cy.get('.ngie-button').eq(0),
11
+ applyChangesLabel: () => cy.get('.ngie-button').eq(1),
12
+ //SideBySidePanelsSectionSelectors
13
+ sideBySidePanelsLabel: () => cy.get('[class*="SettingsTabstyles__PanelsWrapper"] .section-title-label'),
14
+ enableSideBySidePanelsCheckbox: () => cy.get('[data-ngie-testid="enable-side-by-side-panels-checkbox"] input'),
15
+ enableSideBySidePanelsLabel: () => cy.get('[data-ngie-testid="enable-side-by-side-panels-checkbox"] .MuiFormControlLabel-label'),
16
+ //SeparatorSectionSelectors
17
+ separatorsLabel: () => cy.get('[class*="SettingsTabstyles__SeparatorsWrapper"] .separator-title-label-cls'),
18
+ horizontalSeparatorsCheckbox: () => cy.get('[data-ngie-testid="horizontal-separator-line-between-questions-checkbox"] input'),
19
+ horizontalSeparatorLabel: () => cy.get('[data-ngie-testid="horizontal-separator-line-between-questions-checkbox"] .MuiFormControlLabel-label'),
20
+ horizontalIllustrator: () => cy.get('[class*="SettingsTabstyles__HorizontalSeparatorImg"]'),
21
+ verticalSeparatorWrapper: () => cy.get('[data-ngie-testid="vertical-separator-line-between-panels-checkbox"]'),
22
+ verticalSeparatorsCheckbox: () => cy.get('[data-ngie-testid="vertical-separator-line-between-panels-checkbox"] input'),
23
+ verticalSeparatorsLabel: () => cy.get('[data-ngie-testid="vertical-separator-line-between-panels-checkbox"] .MuiFormControlLabel-label'),
24
+ verticalSeparatorsIllustrator: () => cy.get('[class*="SettingsTabstyles__VerticalSeparatorImg"]'),
25
+ separatorsStyleLabel: () => cy.get('[class*="SettingsTabstyles__LabelTextWrapper"]'),
26
+ solidSeparatorStyleOption: () => cy.get('[data-ngie-testid="solid-toggle-button"]'),
27
+ dottedSeparatorStyleOption: () => cy.get('[data-ngie-testid="dotted-toggle-button"]'),
28
+ dashedSeparatorStyleOption: () => cy.get('[data-ngie-testid="dashed-toggle-button"]'),
29
+ separatorStyleWrapper: () => cy.get('[class*="SettingsTabstyles__SeparatorStyleWrapper"]'),
30
+ //SectionsSectionSelectors
31
+ sectionsLabel: () => cy.get('[class*="SettingsTabstyles__SectionsWrapper"] .section-title-label'),
32
+ enableSectionsCheckbox: () => cy.get('[data-ngie-testid="enable-sections-checkbox"] input'),
33
+ enableSectionsLabel: () => cy.get('[data-ngie-testid="enable-sections-checkbox"] .MuiFormControlLabel-label'),
34
+ enableSectionsInLabel: () => cy.get('[class*="SectionsComponentstyles__HeadWrapper"]').eq(0), //couldnt get unique
35
+ leftPanelCheckbox: () => cy.get('[data-ngie-testid="left-panel-checkbox"] input'),
36
+ leftPanelLabel: () => cy.get('[data-ngie-testid="left-panel-checkbox"] .MuiFormControlLabel-label'),
37
+ rightPanelCheckbox: () => cy.get('[data-ngie-testid="right-panel-checkbox"] input'),
38
+ rightPanelLabel: () => cy.get('[data-ngie-testid="right-panel-checkbox"] .MuiFormControlLabel-label'),
39
+ sectionsNavigationOrientationLabel: () => cy.get('.orientation-wrapper-cls [class*=SectionsComponentstyles__HeadWrapper]'),
40
+ horizontalRadioButton: () => cy.get('[class*="SectionsComponentstyles__OrientationWrapper"] input').eq(0),
41
+ horizontalLabel: () => cy.get('[class*="SectionsComponentstyles__OrientationWrapper"] .ngie-radio-label').eq(0),
42
+ verticalRadioButton: () => cy.get('[class*="SectionsComponentstyles__OrientationWrapper"] input').eq(1),
43
+ verticalLabel: () => cy.get('[class*="SectionsComponentstyles__OrientationWrapper"] .ngie-radio-label').eq(1),
44
+ sectionsNavigationStyleLabel: () => cy.get('[class*="SectionsComponentstyles__StyleWrapper"] [class*="SectionsComponentstyles__HeadWrapper"]'),
45
+ underlinedRadioButton: () => cy.get('[class*="SectionsComponentstyles__StyleWrapper"] input').eq(0),
46
+ underlinedLabel: () => cy.get('[class*="SectionsComponentstyles__StyleWrapper"] .ngie-radio-label').eq(0),
47
+ separatedUsingDividersRadioButton: () => cy.get('[class*="SectionsComponentstyles__StyleWrapper"] input').eq(1),
48
+ separatedUsingDividersLabel: () => cy.get('[class*="SectionsComponentstyles__StyleWrapper"] .ngie-radio-label').eq(1),
49
+ numberedRadioButton: () => cy.get('[class*="SectionsComponentstyles__StyleWrapper"] input').eq(2),
50
+ numberedLabel: () => cy.get('[class*="SectionsComponentstyles__StyleWrapper"] .ngie-radio-label').eq(2),
51
+ sectionsNavigationAlignmentLabel: () => cy.get('[class*="SectionsComponentstyles__AlignmentWrapper"] [class*="SectionsComponentstyles__HeadWrapper"]'),
52
+ leftAlignedRadioButton: () => cy.get('[class*="SectionsComponentstyles__AlignmentWrapper"] input').eq(0),
53
+ leftAlignedLabel: () => cy.get('[class*="SectionsComponentstyles__AlignmentWrapper"] .ngie-radio-label').eq(0),
54
+ centerAlignedRadioButton: () => cy.get('[class*="SectionsComponentstyles__AlignmentWrapper"] input').eq(1),
55
+ centerAlignedLabel: () => cy.get('[class*="SectionsComponentstyles__AlignmentWrapper"] .ngie-radio-label').eq(1),
56
+ rightAlignedRadioButton: () => cy.get('[class*="SectionsComponentstyles__AlignmentWrapper"] input').eq(2),
57
+ rightAlignedLabel: () => cy.get('[class*="SectionsComponentstyles__AlignmentWrapper"] .ngie-radio-label').eq(2),
58
+ enableSectionsContentWrapper: () => cy.get('[class*="SectionsComponentstyles__SectionConfigWrapper"]'),
59
+ //SpacingSectionSelectors
60
+ spaceBetweenQuestionsLabel: () => cy.get('[class*="SettingsTabstyles__SpaceWrapper"] .section-title-label'),
61
+ spacingLabel: () => cy.get('#Spacing-dropdown-label'),
62
+ spacingDropdown: () => cy.get('#Spacing-select'),
63
+ spacingDropdownListOptions: (ariaLabel = null) => {
64
+ if (ariaLabel) {
65
+ return cy.get(`[aria-labelledby*="Spacing"][aria-labelledby*="dropdown-label"] li[role="option"][aria-label*="${ariaLabel}"]`)
66
+ } else {
67
+ return cy.get('[aria-labelledby*="Spacing"][aria-labelledby*="dropdown-label"] li[role="option"]')
68
+ }
69
+ },
70
+ //MultiLanguageSupportSectionSelectors
71
+ multiLanguageSupportLabel: () => cy.get('[class*="SettingsTabstyles__LanguageSupportWrapper"] .section-title-label'),
72
+ languagesCheckbox: () => cy.get('[data-ngie-testid="this-item-is-also-available-in-other-languages-checkbox"] input'),
73
+ languagesLabel: () => cy.get('[data-ngie-testid="this-item-is-also-available-in-other-languages-checkbox"] .MuiFormControlLabel-label'),
74
+ //AccessibilitySectionSelectors
75
+ accessibilityLabel: () => cy.get('[class*="SettingsTabstyles__AccessibilityWrapper"] .section-title-label'),
76
+ flagNonAccessibleCheckbox: () => cy.get('[data-ngie-testid="flag-this-item-as-non-accessible-checkbox"] input'),
77
+ flagNonAccessibleLabel: () => cy.get('[data-ngie-testid="flag-this-item-as-non-accessible-checkbox"] .MuiFormControlLabel-label'),
78
+ alternateAccessibleIdLabel: () => cy.get('.text-field-label'),
79
+ alternateAccessibleIdInputField: () => cy.get('.additional-option-placeholder-input input'),
80
+ //MiscellaneousSectionSelectors
81
+ miscellaneousLabel: () => cy.get('[class*="SettingsTabstyles__MiscellaneousWrapper"] .section-title-label'),
82
+ disableCutCopyAndPasteCheckbox: () => cy.get('[data-ngie-testid="disable-cut,-copy-and-paste-for-all-questions-checkbox"] input'),
83
+ disableCutCopyAndPasteLabel: () => cy.get('[data-ngie-testid="disable-cut,-copy-and-paste-for-all-questions-checkbox"] .MuiFormControlLabel-label '),
84
+ randomizeQuestionsOrderCheckbox: () => cy.get('[data-ngie-testid="randomize-questions-order-checkbox"] input'),
85
+ randomizeQuestionsOrderLabel: () => cy.get('[data-ngie-testid="randomize-questions-order-checkbox"] .MuiFormControlLabel-label'),
86
+ roundNegativeScoresToZeroCheckbox: () => cy.get('[data-ngie-testid="round-negative-scores-to-zero-checkbox"] input'),
87
+ roundNegativeScoresToZeroLabel: () => cy.get('[data-ngie-testid="round-negative-scores-to-zero-checkbox"] .MuiFormControlLabel-label')
88
+ };
89
+
90
+ const steps = {
91
+ ...createItemPage.steps,
92
+
93
+ verifyEnableSideBySidePanelsCheckboxUnchecked: () => {
94
+ itemPreviewSettingsPage.enableSideBySidePanelsCheckbox()
95
+ .should('not.be.checked');
96
+ },
97
+
98
+ checkEnableSideBySidePanelsCheckbox: () => {
99
+ itemPreviewSettingsPage.enableSideBySidePanelsCheckbox()
100
+ .click()
101
+ .should('be.checked');
102
+ },
103
+
104
+ verifyVerticalSeparatorIsEnabled: () => {
105
+ itemPreviewSettingsPage.verticalSeparatorsCheckbox()
106
+ .should('be.enabled');
107
+ itemPreviewSettingsPage.verticalSeparatorsLabel()
108
+ .should('not.have.class', 'Mui-disabled');
109
+ },
110
+
111
+ uncheckEnableSideBySidePanelsCheckbox: () => {
112
+ itemPreviewSettingsPage.enableSideBySidePanelsCheckbox()
113
+ .click()
114
+ .should('not.be.checked');
115
+ },
116
+
117
+ verifyVerticalSeparatorIsDisabled: () => {
118
+ itemPreviewSettingsPage.verticalSeparatorsCheckbox()
119
+ .should('be.disabled');
120
+ itemPreviewSettingsPage.verticalSeparatorsLabel()
121
+ .should('have.class', 'Mui-disabled');
122
+ },
123
+
124
+ verifyHorizontalSeparatorCheckboxUnchecked: () => {
125
+ itemPreviewSettingsPage.horizontalSeparatorsCheckbox()
126
+ .should('not.be.checked');
127
+ },
128
+
129
+ verifyVerticalSeparatorCheckboxUnchecked: () => {
130
+ itemPreviewSettingsPage.verticalSeparatorsCheckbox()
131
+ .should('not.be.checked');
132
+ },
133
+
134
+ checkHorizontalSeparatorCheckbox: () => {
135
+ itemPreviewSettingsPage.horizontalSeparatorsCheckbox()
136
+ .click()
137
+ .should('be.checked');
138
+ },
139
+
140
+ uncheckHorizontalSeparatorCheckbox: () => {
141
+ itemPreviewSettingsPage.horizontalSeparatorsCheckbox()
142
+ .click()
143
+ .should('not.be.checked');
144
+ },
145
+
146
+ checkVerticalSeparatorCheckbox: () => {
147
+ itemPreviewSettingsPage.verticalSeparatorsCheckbox()
148
+ .click()
149
+ .should('be.checked');
150
+ },
151
+
152
+ uncheckVerticalSeparatorCheckbox: () => {
153
+ itemPreviewSettingsPage.verticalSeparatorsCheckbox()
154
+ .click()
155
+ .should('not.be.checked');
156
+ },
157
+
158
+ verifySeparatorStyleSectionContent: () => {
159
+ utilities.verifyInnerText(itemPreviewSettingsPage.separatorsStyleLabel(), 'Separator style');
160
+ utilities.verifyElementVisibilityState(itemPreviewSettingsPage.separatorsStyleLabel(), 'visible');
161
+ utilities.verifyInnerText(itemPreviewSettingsPage.solidSeparatorStyleOption(), 'Solid');
162
+ utilities.verifyElementVisibilityState(itemPreviewSettingsPage.solidSeparatorStyleOption(), 'visible');
163
+ utilities.verifyInnerText(itemPreviewSettingsPage.dottedSeparatorStyleOption(), 'Dotted');
164
+ utilities.verifyElementVisibilityState(itemPreviewSettingsPage.dottedSeparatorStyleOption(), 'visible');
165
+ utilities.verifyInnerText(itemPreviewSettingsPage.dashedSeparatorStyleOption(), 'Dashed');
166
+ utilities.verifyElementVisibilityState(itemPreviewSettingsPage.dashedSeparatorStyleOption(), 'visible');
167
+ },
168
+
169
+ verifyEnableSectionsCheckboxUnchecked: () => {
170
+ itemPreviewSettingsPage.enableSectionsCheckbox()
171
+ .should('not.be.checked');
172
+ },
173
+
174
+ checkEnableSectionsCheckbox: () => {
175
+ itemPreviewSettingsPage.enableSectionsCheckbox()
176
+ .click()
177
+ .should('be.checked');
178
+ },
179
+
180
+ uncheckEnableSectionsCheckbox: () => {
181
+ itemPreviewSettingsPage.enableSectionsCheckbox()
182
+ .click()
183
+ .should('not.be.checked');
184
+ },
185
+
186
+ verifyLeftPanelLabelAndCheckboxIsEnabled: () => {
187
+ itemPreviewSettingsPage.leftPanelCheckbox()
188
+ .should('be.enabled');
189
+ itemPreviewSettingsPage.leftPanelLabel()
190
+ .should('not.have.class', 'Mui-disabled');
191
+ },
192
+
193
+ verifyLeftPanelCheckboxIsSelected: () => {
194
+ itemPreviewSettingsPage.leftPanelCheckbox()
195
+ .should('be.checked')
196
+ },
197
+
198
+ verifyRightPanelLabelAndCheckboxIsEnabled: () => {
199
+ itemPreviewSettingsPage.rightPanelCheckbox()
200
+ .should('be.enabled');
201
+ itemPreviewSettingsPage.rightPanelLabel()
202
+ .should('not.have.class', 'Mui-disabled');
203
+ },
204
+
205
+ verifyLeftPanelLabelAndCheckboxIsDisabled: () => {
206
+ itemPreviewSettingsPage.leftPanelCheckbox()
207
+ .should('be.disabled');
208
+ itemPreviewSettingsPage.leftPanelLabel()
209
+ .should('have.class', 'Mui-disabled');
210
+ },
211
+
212
+ verifyRightPanelLabelAndCheckboxIsDisabled: () => {
213
+ itemPreviewSettingsPage.rightPanelCheckbox()
214
+ .should('be.disabled');
215
+ itemPreviewSettingsPage.rightPanelLabel()
216
+ .should('have.class', 'Mui-disabled');
217
+ },
218
+
219
+ verifyDisabledLeftPanelTooltip: () => {
220
+ itemPreviewSettingsPage.leftPanelCheckbox()
221
+ .trigger('mouseover', { force: true });
222
+ commonComponents.tooltipText()
223
+ .should('have.text', 'Please enable panels');
224
+ itemPreviewSettingsPage.leftPanelCheckbox()
225
+ .trigger('mouseout', { force: true });
226
+ commonComponents.tooltipText()
227
+ .should('not.exist');
228
+ },
229
+
230
+ verifyDisabledRightPanelTooltip: () => {
231
+ itemPreviewSettingsPage.rightPanelCheckbox()
232
+ .trigger('mouseover', { force: true });
233
+ commonComponents.tooltipText()
234
+ .should('have.text', 'Please enable panels');
235
+ itemPreviewSettingsPage.rightPanelCheckbox()
236
+ .trigger('mouseout', { force: true });
237
+ commonComponents.tooltipText()
238
+ .should('not.exist');
239
+ },
240
+
241
+ verifyVerticalNavigationOrientationIsEnabled: () => {
242
+ itemPreviewSettingsPage.verticalRadioButton()
243
+ .should('be.enabled');
244
+ itemPreviewSettingsPage.verticalLabel()
245
+ .parent()
246
+ .should('not.have.class', 'radio-option-disabled');
247
+ },
248
+
249
+ selectVerticalOrientationRadioButton: () => {
250
+ itemPreviewSettingsPage.verticalRadioButton()
251
+ .click();
252
+ itemPreviewSettingsPage.verticalRadioButton()
253
+ .should('be.checked');
254
+ },
255
+
256
+ verifySectionsNavigationStyleSectionIsDisabled: () => {
257
+ const sectionNavigationAlignmentOptionsLabel = [itemPreviewSettingsPage.leftAlignedLabel, itemPreviewSettingsPage.centerAlignedLabel, itemPreviewSettingsPage.rightAlignedLabel];
258
+ const sectionNavigationAlignmentOptionsRadioButton = [itemPreviewSettingsPage.leftAlignedRadioButton, itemPreviewSettingsPage.centerAlignedRadioButton, itemPreviewSettingsPage.rightAlignedRadioButton];
259
+ sectionNavigationAlignmentOptionsRadioButton.forEach((option) => {
260
+ option()
261
+ .should('be.disabled');
262
+ });
263
+ sectionNavigationAlignmentOptionsLabel.forEach((option) => {
264
+ option()
265
+ .parent()
266
+ .should('have.class', 'radio-option-disabled');
267
+ });
268
+ },
269
+
270
+ verifySectionsNavigationStyleSectionIsEnabled: () => {
271
+ const sectionNavigationAlignmentOptionsLabel = [itemPreviewSettingsPage.leftAlignedLabel, itemPreviewSettingsPage.centerAlignedLabel, itemPreviewSettingsPage.rightAlignedLabel];
272
+ const sectionNavigationAlignmentOptionsRadioButton = [itemPreviewSettingsPage.leftAlignedRadioButton, itemPreviewSettingsPage.centerAlignedRadioButton, itemPreviewSettingsPage.rightAlignedRadioButton];
273
+ sectionNavigationAlignmentOptionsRadioButton.forEach((option) => {
274
+ option()
275
+ .should('be.enabled');
276
+ });
277
+ sectionNavigationAlignmentOptionsLabel.forEach((option) => {
278
+ option()
279
+ .parent()
280
+ .should('not.have.class', 'radio-option-disabled');
281
+ });
282
+ },
283
+
284
+ selectHorizontalOrientationRadioButton: () => {
285
+ itemPreviewSettingsPage.horizontalRadioButton()
286
+ .click()
287
+ .should('be.checked');
288
+ },
289
+
290
+ verifyVerticalNavigationOrientationIsDisabled: () => {
291
+ itemPreviewSettingsPage.verticalRadioButton()
292
+ .should('be.disabled');
293
+ itemPreviewSettingsPage.verticalLabel()
294
+ .parent()
295
+ .should('have.class', 'radio-option-disabled');
296
+ },
297
+
298
+ verifyDisableCutCopyAndPasteCheckboxIsUnchecked: () => {
299
+ itemPreviewSettingsPage.disableCutCopyAndPasteCheckbox()
300
+ .should('not.be.checked');
301
+ },
302
+
303
+ verifyRandomizeQuestionsOrderCheckboxIsUnchecked: () => {
304
+ itemPreviewSettingsPage.randomizeQuestionsOrderCheckbox()
305
+ .should('not.be.checked');
306
+ },
307
+
308
+ verifyRoundNegativeScoresCheckboxIsUnchecked: () => {
309
+ itemPreviewSettingsPage.roundNegativeScoresToZeroCheckbox()
310
+ .should('not.be.checked');
311
+ },
312
+
313
+ checkDisableCutCopyAndPasteCheckbox: () => {
314
+ itemPreviewSettingsPage.disableCutCopyAndPasteCheckbox()
315
+ .click()
316
+ .should('be.checked');
317
+ },
318
+
319
+ checkRoundNegativeScoresCheckbox: () => {
320
+ itemPreviewSettingsPage.roundNegativeScoresToZeroCheckbox()
321
+ .click()
322
+ .should('be.checked');
323
+ },
324
+
325
+ checkRandomizeQuestionsOrderCheckbox: () => {
326
+ itemPreviewSettingsPage.randomizeQuestionsOrderCheckbox()
327
+ .click()
328
+ .should('be.checked');
329
+ },
330
+
331
+ uncheckDisableCutCopyAndPasteCheckbox: () => {
332
+ itemPreviewSettingsPage.disableCutCopyAndPasteCheckbox()
333
+ .click()
334
+ .should('not.be.checked');
335
+ },
336
+
337
+ uncheckRoundNegativeScoresCheckbox: () => {
338
+ itemPreviewSettingsPage.roundNegativeScoresToZeroCheckbox()
339
+ .click()
340
+ .should('not.be.checked');
341
+ },
342
+
343
+ uncheckRandomizeQuestionsOrderCheckbox: () => {
344
+ itemPreviewSettingsPage.randomizeQuestionsOrderCheckbox()
345
+ .click()
346
+ .should('not.be.checked');
347
+ },
348
+
349
+ verifyFlagThisItemNonAccessibleCheckboxIsUnchecked: () => {
350
+ itemPreviewSettingsPage.flagNonAccessibleCheckbox()
351
+ .should('not.be.checked');
352
+ },
353
+
354
+ checkFlagThisItemNonAccessibleCheckbox: () => {
355
+ itemPreviewSettingsPage.flagNonAccessibleCheckbox()
356
+ .click()
357
+ .should('be.checked');
358
+ },
359
+
360
+ uncheckFlagThisItemNonAccessibleCheckbox: () => {
361
+ itemPreviewSettingsPage.flagNonAccessibleCheckbox()
362
+ .click()
363
+ .should('not.be.checked');
364
+ },
365
+
366
+ /**
367
+ * @param {string} inputText text to be entered in Alternate accessible item ID input field
368
+ * @description this function is used to add input to the Alternate accessible item ID input field
369
+ */
370
+ verifyAlternateAccessibleIdInputFieldText: (inputText) => {
371
+ itemPreviewSettingsPage.alternateAccessibleIdInputField()
372
+ .type(`${inputText}`);
373
+ itemPreviewSettingsPage.alternateAccessibleIdInputField()
374
+ .should('have.attr', 'value', `${inputText}`);
375
+ },
376
+
377
+ verifyThisItemIsAlsoAvailableInOtherLanguagesCheckboxIsUnchecked: () => {
378
+ itemPreviewSettingsPage.languagesCheckbox()
379
+ .should('not.be.checked');
380
+ },
381
+
382
+ checkThisItemIsAlsoAvailableInOtherLanguagesCheckbox: () => {
383
+ itemPreviewSettingsPage.languagesCheckbox()
384
+ .click()
385
+ .should('be.checked');
386
+ },
387
+
388
+ uncheckThisItemIsAlsoAvailableInOtherLanguagesCheckbox: () => {
389
+ itemPreviewSettingsPage.languagesCheckbox()
390
+ .click()
391
+ .should('not.be.checked');
392
+ },
393
+
394
+ verifyHorizontalRadioButtonIsSelected: () => {
395
+ itemPreviewSettingsPage.horizontalRadioButton()
396
+ .should('be.checked');
397
+ },
398
+
399
+ verifyUnderlinedRadioButtonIsSelected: () => {
400
+ itemPreviewSettingsPage.underlinedRadioButton()
401
+ .should('be.checked');
402
+ },
403
+
404
+ verifyLeftAlignedRadioButtonIsSelected: () => {
405
+ itemPreviewSettingsPage.leftAlignedRadioButton()
406
+ .should('be.checked');
407
+ },
408
+
409
+ /**
410
+ *
411
+ * @param {array} spacingOptionsArray array containing options of spacing dropdown list
412
+ * @description this function is used to verify inner text of expanded spacing dropdown list options
413
+ */
414
+ verifySpacingDropdownListOptions: (spacingOptionsArray) => {
415
+ spacingOptionsArray.forEach((option, count) => {
416
+ itemPreviewSettingsPage.spacingDropdownListOptions()
417
+ .eq(count)
418
+ .should('have.text', option);
419
+ });
420
+ },
421
+
422
+ verifyDefaultSpacingIsSelected: () => {
423
+ itemPreviewSettingsPage.spacingDropdown()
424
+ .contains('Default');
425
+ },
426
+
427
+ clickSpacingDropdownList: () => {
428
+ itemPreviewSettingsPage.spacingDropdown()
429
+ .click();
430
+ },
431
+
432
+ /**
433
+ * @param {string} spacingOption text is the option that has to be selected from expanded spacing dropdown list
434
+ * @description this function is used to select particular option from expanded spacing dropdown list
435
+ */
436
+ selectOptionFromSpacingDropdown: (spacingOption) => {
437
+ itemPreviewSettingsPage.spacingDropdownListOptions()
438
+ .contains(`${spacingOption}`)
439
+ .click();
440
+ }
441
+ };
442
+
443
+ export const itemPreviewSettingsPage = {
444
+ ...selectors,
445
+ steps
446
+ };
@@ -1,85 +1,134 @@
1
- import { additionalSettingsPanel, autoScoredPreviewBase, createQuestionBasePage, mcqAdditionalSettingsBase, mcqOptionsComponent, mcqPreviewComponents, mcqSetCorrectAnswerSection, questionInstructionsComponent, scoringSectionBase, autoScoredAdditionalSettings, autoScoredSetCorrectAnswerSection, autoScoredScoringSectionMultipleResponsesType, autoScoredScoringSection, mcqScoringComponent, previewScoringAndShowCorrectAnswerComponent, optionsWrapperComponent } from "./components"
2
- import { mcqQuestionCommonComponents } from "./components/mcqQuestionCommonComponents";
1
+ import utilities from "../support/helpers/utilities"
2
+ import { autoScoredSpecifyCorrectAnswerSection, commonComponents, createQuestionBasePage, optionsWrapperComponent, scoringSectionBase } from "./components"
3
+ const css = Cypress.env('css');
3
4
 
4
5
  const selectors = {
5
- ...mcqAdditionalSettingsBase,
6
- ...scoringSectionBase,
6
+ ...autoScoredSpecifyCorrectAnswerSection,
7
7
  ...createQuestionBasePage,
8
- ...mcqQuestionCommonComponents,
9
- ...mcqOptionsComponent,
10
- ...additionalSettingsPanel,
11
- ...mcqSetCorrectAnswerSection,
12
- ...autoScoredPreviewBase,
13
- ...questionInstructionsComponent,
14
- ...autoScoredAdditionalSettings,
15
- ...autoScoredSetCorrectAnswerSection,
16
- ...autoScoredScoringSectionMultipleResponsesType,
17
- ...previewScoringAndShowCorrectAnswerComponent,
18
8
  ...optionsWrapperComponent,
19
- //Maximum and minimum answers
20
- minimumNumberOfAnswersLabel: () => cy.get('.min-answer-label'),
21
- maximumNumberOfAnswersLabel: () => cy.get('.max-answer-label'),
22
- minimumAnswersInputField: () => cy.get('.min-answer-input-field input'),
23
- maximumAnswersInputField: () => cy.get('.max-answer-input-field input'),
24
- minMaxErrorMessage: () => cy.get('.min-max-answer-error-wrapper')
9
+ optionWrapperSpecifyCorrectAnswerSection: () => cy.get('.mcq-option-wrapper'),
10
+ optionsTextSpecifyCorrectAnswerSection: () => cy.get('.mcq-label'),
11
+ //TODO: Need to update below selectors, once https://redmine.zeuslearning.com/issues/553983 gets resolved
12
+ optionsCheckboxSpecifyCorrectAnswerSection: () => cy.get('[data-ngie-testid="response-option-checkbox"]:visible [type="checkbox"]'),
13
+ optionsCheckboxWrapperSpecifyCorrectAnswerSection: () => cy.get('[data-ngie-testid="response-option-checkbox"]:visible')
25
14
  }
26
15
 
27
16
  const steps = {
17
+ ...autoScoredSpecifyCorrectAnswerSection.steps,
28
18
  ...createQuestionBasePage.steps,
29
- ...questionInstructionsComponent.steps,
30
- ...mcqOptionsComponent.steps,
31
- ...additionalSettingsPanel.steps,
32
- ...autoScoredAdditionalSettings.steps,
33
- ...mcqPreviewComponents.steps,
34
- ...mcqSetCorrectAnswerSection.steps,
35
- ...autoScoredPreviewBase.steps,
36
- ...mcqQuestionCommonComponents.steps,
19
+ ...optionsWrapperComponent.steps,
37
20
  ...scoringSectionBase.steps,
38
- ...autoScoredSetCorrectAnswerSection.steps,
39
- ...autoScoredScoringSection.steps,
40
- ...autoScoredScoringSectionMultipleResponsesType.steps,
41
- ...mcqAdditionalSettingsBase.steps,
42
- addPartialDifferentWeightsPoints: (optionIndex, points) => {
43
- mcqSetCorrectAnswerSection.correctAnswerOptionsWrapper(optionIndex)
21
+ /**
22
+ * Verifies the contents of an option wrapper in the 'Specify correct answer' section for multiple selection questions.
23
+ * @param {number} optionIndex - The index of the option wrapper to be verified.
24
+ * @example - verifyOptionWrapperContentsSpecifyCorrectAnswerSection(0);
25
+ */
26
+ verifyOptionWrapperContentsSpecifyCorrectAnswerSection: (optionIndex) => {
27
+ multipleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
28
+ .eq(optionIndex)
44
29
  .within(() => {
45
- scoringSectionBase.pointsInputField()
46
- .clear()
47
- .type(points, { delay: 500 })
48
- .should('have.value', points)
49
- .blur();
30
+ utilities.verifyInnerText(multipleSelectionPage.optionsTextSpecifyCorrectAnswerSection(), '');
31
+ multipleSelectionPage.optionsCheckboxSpecifyCorrectAnswerSection()
32
+ .should('not.be.checked');
50
33
  });
51
34
  },
52
35
 
53
- //TODO: Remove this after https://redmine.zeuslearning.com/issues/528831 is fixed
54
- verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked: () => {
55
- cy.log('After deselecting Show correct answer checkbox, the question preview should return to the previous state');
56
- previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
36
+ /**
37
+ * @description. Checks the options checkbox in the 'Specify correct answer' section for multiple selection questions.
38
+ * @param {number} optionIndex - The index of the option checkbox to be checked.
39
+ * @throws {Error} Will throw an error if the checkbox is not checked after the operation.
40
+ * @example - checkOptionsCheckboxInSpecifyCorrectAnswerSection(0);
41
+ */
42
+ checkOptionsCheckboxInSpecifyCorrectAnswerSection: (optionIndex) => {
43
+ multipleSelectionPage.optionsCheckboxSpecifyCorrectAnswerSection()
44
+ .eq(optionIndex)
57
45
  .click()
58
- .should('not.be.checked');
59
- autoScoredPreviewBase.correctIcon()
60
- .should('not.exist');
61
- autoScoredPreviewBase.incorrectIcon()
62
- .should('not.exist');
63
- autoScoredPreviewBase.correctIncorrectAnswerLabel()
64
- .should('not.exist');
65
- autoScoredPreviewBase.steps.verifyCorrectIncorrectBorderNotExists();
46
+ .should('be.checked')
66
47
  },
48
+
49
+ /**
50
+ * @description. Unchecks the options checkbox in the 'Specify correct answer' section for multiple selection questions.
51
+ * @param {number} optionIndex - The index of the option checkbox to be unchecked.
52
+ * @throws {Error} Will throw an error if the checkbox is not unchecked after the operation.
53
+ * @example - uncheckOptionsCheckboxInSpecifyCorrectAnswerSection(0);
54
+ */
55
+ uncheckOptionsCheckboxInSpecifyCorrectAnswerSection: (optionIndex) => {
56
+ multipleSelectionPage.optionsCheckboxSpecifyCorrectAnswerSection()
57
+ .eq(optionIndex)
58
+ .click()
59
+ .should('not.be.checked')
60
+ }
67
61
  }
68
62
 
69
63
  const tests = {
70
- ...createQuestionBasePage.tests,
71
- ...questionInstructionsComponent.tests,
72
- ...mcqOptionsComponent.tests,
73
- ...additionalSettingsPanel.tests,
74
- ...mcqAdditionalSettingsBase.tests,
75
- ...mcqSetCorrectAnswerSection.tests,
76
- ...mcqQuestionCommonComponents.tests,
77
- ...scoringSectionBase.tests,
78
- ...autoScoredSetCorrectAnswerSection.tests,
79
- ...autoScoredScoringSection.tests,
80
- ...autoScoredAdditionalSettings.tests,
81
- ...mcqScoringComponent.tests,
82
- ...previewScoringAndShowCorrectAnswerComponent.tests,
64
+ ...autoScoredSpecifyCorrectAnswerSection.tests,
65
+ /**
66
+ * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
67
+ * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
68
+ * @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
69
+ */
70
+ verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
71
+ it(`The user should be able to check/uncheck an option in the ${accordionName} accordion`, () => {
72
+ multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
73
+ multipleSelectionPage.steps.uncheckOptionsCheckboxInSpecifyCorrectAnswerSection(1);
74
+ });
75
+
76
+ it(`When the user has unchecked all selected options in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
77
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible')
78
+ utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
79
+ if (accordionName == 'Correct') {
80
+ autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
81
+ .within(() => {
82
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
83
+ });
84
+ } else {
85
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
86
+ .eq(1)
87
+ .within(() => {
88
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
89
+ });
90
+ };
91
+ });
92
+
93
+ autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredCorrectAnswerErrorMessageCSSAndA11y();
94
+
95
+ it('When the user checks an options checkbox, the error message should disappear', () => {
96
+ multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
97
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
98
+ });
99
+
100
+ autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
101
+
102
+ it('CSS of \'Correct\' accordion contents', { tags: 'css' }, () => {
103
+ utilities.verifyCSS(multipleSelectionPage.optionsTextSpecifyCorrectAnswerSection(), {
104
+ 'color': css.color.text,
105
+ 'font-size': css.fontSize.default,
106
+ 'font-weight': css.fontWeight.regular
107
+ });
108
+ utilities.verifyCSS(multipleSelectionPage.optionsCheckboxSpecifyCorrectAnswerSection().parent().find('svg'), {
109
+ 'fill': css.color.secondaryBtn
110
+ });
111
+ cy.log('CSS of selected options')
112
+ utilities.verifyCSS(multipleSelectionPage.optionsCheckboxWrapperSpecifyCorrectAnswerSection().eq(1), {
113
+ 'background-color': css.color.defaultBackground,
114
+ 'color': css.color.activeButtons,
115
+ 'border': `2px solid ${css.color.activeComponentBorder}`
116
+ });
117
+ utilities.verifyCSS(utilities.getNthElement(multipleSelectionPage.optionsTextSpecifyCorrectAnswerSection(), 1).find('.question-text-wrapper'), {
118
+ 'color': css.color.optionsSelectedText,
119
+ 'font-size': css.fontSize.default,
120
+ 'font-weight': css.fontWeight.regular
121
+ });
122
+ multipleSelectionPage.optionsCheckboxSpecifyCorrectAnswerSection()
123
+ .eq(1)
124
+ .parent()
125
+ .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
126
+ });
127
+
128
+ it('Accessibility of \'Correct\' accordion contents', { tags: 'a11y' }, () => {
129
+ cy.checkAccessibility(multipleSelectionPage.optionWrapperSpecifyCorrectAnswerSection().parents('.correct-answer-accordion'))
130
+ });
131
+ },
83
132
  }
84
133
 
85
134
  export const multipleSelectionPage = {
@@ -41,12 +41,7 @@ const questionTypeCategoryMap = {
41
41
  }
42
42
 
43
43
  const steps = {
44
- //TODO: Need to update this for all question types on high priority
45
44
  selectQuestionType: (questionType) => {
46
- const questionCategory = questionTypeCategoryMap[questionType];
47
- selectQuestionResourceToolPage.questionTypeCategory()
48
- .contains(questionCategory)
49
- .click();
50
45
  selectQuestionResourceToolPage.questionTypeOptionTitle(questionType)
51
46
  .click();
52
47
  },