itemengine-cypress-automation 1.0.166 → 1.0.169-uploadResponseMigration-83ab996.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +11 -22
  3. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +7 -18
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +6 -11
  5. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -0
  6. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +36 -2
  7. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +34 -22
  8. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +24 -8
  9. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +25 -5
  10. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +114 -68
  11. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +111 -67
  12. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +123 -71
  13. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +63 -41
  14. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +25 -21
  15. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +85 -50
  16. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -68
  17. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +98 -54
  18. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +120 -72
  19. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
  20. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
  21. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
  22. package/cypress/fixtures/theme/ilc.json +26 -14
  23. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
  24. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +0 -3
  25. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  26. package/cypress/pages/components/colorPopupComponent.js +2 -2
  27. package/cypress/pages/components/gridQuestionCommonComponent.js +2 -629
  28. package/cypress/pages/components/index.js +0 -3
  29. package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
  30. package/cypress/pages/components/measuringToolComponent.js +2 -2
  31. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  32. package/cypress/pages/components/setPointsPopupBase.js +4 -6
  33. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +3 -60
  34. package/cypress/pages/components/toolSettingsComponent.js +12 -80
  35. package/cypress/pages/dragAndDropIntoCategoriesPage.js +8 -0
  36. package/cypress/pages/feedbackScalePage.js +449 -591
  37. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -3
  38. package/cypress/pages/graphingPage.js +145 -9
  39. package/cypress/pages/gridFillPage.js +120 -135
  40. package/cypress/pages/highlightPage.js +394 -0
  41. package/cypress/pages/index.js +2 -5
  42. package/cypress/pages/matchingPage.js +20 -78
  43. package/cypress/pages/multipleSelectionGridPage.js +1 -88
  44. package/cypress/pages/singleSelectionGridPage.js +0 -86
  45. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +38 -1
  46. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
  47. package/cypress/support/migrationHelpers/migrationScript.js +4 -0
  48. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +34 -2
  49. package/package.json +2 -2
  50. package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +0 -83
  51. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +0 -200
  52. package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +0 -56
  53. package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -95
  54. package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +0 -71
  55. package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +0 -72
  56. package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +0 -71
  57. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
  58. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
  59. package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
  60. package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +0 -308
  61. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +0 -216
  62. package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +0 -336
  63. package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +0 -570
  64. package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +0 -214
  65. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
  66. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
  67. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -355
  68. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +0 -309
  69. package/cypress/e2e/ILC/Matching/toolSettings.js +0 -72
  70. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +0 -1033
  71. package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
  72. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +0 -236
  73. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -239
  74. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -278
  75. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +0 -178
  76. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +0 -407
  77. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +0 -273
  78. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +0 -278
  79. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +0 -228
  80. package/cypress/e2e/ILC/NumberLine/additionalSettings.js +0 -120
  81. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +0 -659
  82. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +0 -149
  83. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +0 -151
  84. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -171
  85. package/cypress/e2e/ILC/NumberLine/headerSection.js +0 -76
  86. package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -54
  87. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +0 -200
  88. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +0 -67
  89. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +0 -135
  90. package/cypress/e2e/ILC/NumberLine/toolSettings.js +0 -73
  91. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +0 -372
  92. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +0 -1014
  93. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -235
  94. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -235
  95. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -235
  96. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -457
  97. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -342
  98. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -342
  99. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -342
  100. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -155
  101. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -314
  102. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -275
  103. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -314
  104. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -290
  105. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -142
  106. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +0 -137
  107. package/cypress/pages/brainingCampManipulativePage.js +0 -122
  108. package/cypress/pages/components/defaultToolDropdown.js +0 -77
  109. package/cypress/pages/components/resetPopupComponent.js +0 -74
  110. package/cypress/pages/components/toolsAndControlsComponent.js +0 -69
  111. package/cypress/pages/feedbackScalePage copy.js +0 -716
  112. package/cypress/pages/numberLinePage.js +0 -723
  113. package/cypress/pages/textSelectionPage.js +0 -582
@@ -1,161 +0,0 @@
1
- describe('Create item page: Feedback scale: Preview tab: \'Button\' and \'Star\' layouts, add, delete option accordion', () => {
2
- before(() => {
3
- cy.loginAs('admin');
4
- });
5
-
6
- describe('Feedback scale - \'Numbers\' layout style in the preview tab', () => {
7
- abortEarlySetup();
8
- before(() => {
9
- });
10
-
11
- it('By default 5 number buttons with text "#"(# being a number from 1 to 5) should be displayed in the preview tab', () => {
12
-
13
- });
14
-
15
- it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
16
-
17
- });
18
-
19
- it('The legend text accordion should display the number button, no legend text should be displayed for the number buttons', () => {
20
- });
21
-
22
- it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective number button in the legend text accordion', () => {
23
-
24
- });
25
-
26
- it('CSS of number buttons - unselected state', { tags: 'css' }, () => {
27
- });
28
-
29
- it('Accessibility of number buttons - unselected state', { tags: 'a11y' }, () => {
30
- });
31
-
32
- it('The user should be able to mark feedback by clicking on any number button', () => {
33
-
34
- });
35
-
36
- it('CSS of number buttons - selected state', { tags: 'css' }, () => {
37
- });
38
-
39
- it('Accessibility of number buttons - selected state', { tags: 'a11y' }, () => {
40
- });
41
- });
42
-
43
- describe('Feedback scale - \'Thumbs\' layout style in the preview tab', () => {
44
- abortEarlySetup();
45
- before(() => {
46
- });
47
-
48
- it('By default two buttons, "Thumbs up" and "Thumbs down" should be displayed in the preview tab', () => {
49
-
50
- });
51
-
52
- it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
53
-
54
- });
55
-
56
- it('The legend text accordion should display the two buttons with button labels - "Thumbs up" and "Thumbs down", no legend text should be displayed for the two buttons', () => {
57
- });
58
-
59
- it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective button in the legend text accordion', () => {
60
-
61
- });
62
-
63
- it('CSS of Thumb buttons - unselected state', { tags: 'css' }, () => {
64
- });
65
-
66
- it('Accessibility of Thumb buttons - unselected state', { tags: 'a11y' }, () => {
67
- });
68
-
69
- it('The user should be able to mark feedback by clicking on any Thumb button', () => {
70
-
71
- });
72
-
73
- it('CSS of Thumb buttons - selected state', { tags: 'css' }, () => {
74
- });
75
-
76
- it('Accessibility of Thumb buttons - selected state', { tags: 'a11y' }, () => {
77
- });
78
- });
79
-
80
- describe('Feedback scale - \'Stars/Hearts\' layout style in the preview tab', () => {
81
- abortEarlySetup();
82
- before(() => {
83
- });
84
-
85
- it('By default 5 star buttons should be displayed in the preview tab', () => {
86
-
87
- });
88
-
89
- it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
90
-
91
- });
92
-
93
- it('The legend text accordion should display the stars in a list with all 5 stars present and the respective number of stars in highlighted state, no legend text should be displayed for the star buttons', () => {
94
- });
95
-
96
- it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective star button in the legend text accordion', () => {
97
-
98
- });
99
-
100
- it('CSS of star buttons - unselected state', { tags: 'css' }, () => {
101
- });
102
-
103
- it('Accessibility of star buttons - unselected state', { tags: 'a11y' }, () => {
104
- });
105
-
106
- it('The user should be able to mark feedback by clicking on any star button', () => {
107
-
108
- });
109
-
110
- it('CSS of star buttons - selected state', { tags: 'css' }, () => {
111
- });
112
-
113
- it('Accessibility of star buttons - selected state', { tags: 'a11y' }, () => {
114
- });
115
-
116
- it('By default 5 heart buttons should be displayed in the preview tab', () => {
117
- // Verify that there are 5 heart buttons by default
118
- // You can use assertions to check the presence of heart buttons in the preview tab
119
- });
120
-
121
- it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
122
- // Verify that a 'Legend text' accordion is present and expanded by default
123
- });
124
-
125
- it('The legend text accordion should display the hearts in a list with all 5 hearts present and the respective number of hearts in highlighted state, no legend text should be displayed for the heart buttons', () => {
126
- // Verify that the legend text accordion displays hearts in a list with all 5 hearts present
127
- // Check that the respective number of hearts is highlighted
128
- // Ensure that no legend text is displayed for the heart buttons
129
- });
130
-
131
- it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective heart button in the legend text accordion', () => {
132
- // Switch to the edit tab
133
- // Add legend text for each heart button
134
- // Verify that the added legend text is displayed beside the respective heart button in the legend text accordion
135
- });
136
-
137
- it('CSS of heart buttons - unselected state', { tags: 'css' }, () => {
138
- // Verify the CSS of heart buttons in their unselected state
139
- });
140
-
141
- it('Accessibility of heart buttons - unselected state', { tags: 'a11y' }, () => {
142
- // Verify the accessibility of heart buttons in their unselected state
143
- });
144
-
145
- it('The user should be able to mark feedback by clicking on any heart button', () => {
146
- // Verify that the user can mark feedback by clicking on any heart button
147
- });
148
-
149
- it('CSS of heart buttons - selected state', { tags: 'css' }, () => {
150
- // Verify the CSS of heart buttons in their selected state
151
- });
152
-
153
- it('Accessibility of heart buttons - selected state', { tags: 'a11y' }, () => {
154
- // Verify the accessibility of heart buttons in their selected state
155
- });
156
- });
157
- });
158
-
159
- //edit tab -
160
- //different files for all scale styles
161
- //include all possible cases, default, add/delete edit tab and preview
@@ -1,308 +0,0 @@
1
- import { feedbackScalePage } from "../../../pages";
2
- import { colorPopupComponent } from "../../../pages/components";
3
- import abortEarlySetup from "../../../support/helpers/abortEarly";
4
- import utilities from "../../../support/helpers/utilities";
5
- const numbersDefaultColor = "rgb(107, 139, 255)";
6
- const css = Cypress.env('css');
7
-
8
- describe('Create item page: Feedback scale - Numbers feedback scale style - Edit and preview tab contents and functionality ', () => {
9
- before(() => {
10
- cy.loginAs('admin');
11
- });
12
-
13
- describe('Numbers feedback scale style - Edit tab contents', () => {
14
- abortEarlySetup();
15
- before(() => {
16
- feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
17
- cy.barsPreLoaderWait();
18
- });
19
-
20
- it('The user should be able to select "Numbers" feedback scale style from the feedback scale style dropdown', () => {
21
- feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
22
- feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
23
- });
24
-
25
- it('By default in the options stepper count input field, "5" should be displayed', () => {
26
- feedbackScalePage.steps.verifyCountInOptionsStepperInputField(5);
27
- });
28
-
29
- it('5 option accordions should be displayed with label "Option #" (# being a number from 1 to 5), Points and "Delete option" icon button, by default all option accordions should be in collapsed state', () => {
30
- for (let index = 0; index < 5; index++) {
31
- feedbackScalePage.steps.verifyOptionsAccordionProperties(index, { optionLabel: `Option ${index + 1}`, Points: `${index + 1}` });
32
- feedbackScalePage.steps.verifyOptionAccordionCollapsedState(index);
33
- };
34
- });
35
-
36
- it('The user should be able to expand any option accordion, on expanding the option accordion, a "Legend text" label and empty input field with placeholder text, "Enter legend text" should be displayed', () => {
37
- feedbackScalePage.steps.expandOptionAccordion(0);
38
- utilities.verifyInnerText(utilities.getNthElement(feedbackScalePage.legendTextLabel(), 0), 'Legend text');
39
- feedbackScalePage.steps.verifyLegendTextInputFieldPlaceholder(0);
40
- });
41
-
42
- it('The user should be able to enter text in the legend text input field, the placeholder text should disappear on entering the text', () => {
43
- feedbackScalePage.steps.addLegendText(0, 'I am uncomfortable with the learning target.');
44
- feedbackScalePage.steps.verifyLegendTextInputFieldPlaceholderNotExists(0);
45
- });
46
-
47
- it('When the user removes the added text from the legend input field, the placeholder text should appear again', () => {
48
- feedbackScalePage.steps.clearLegendTextInputField(0);
49
- feedbackScalePage.steps.verifyLegendTextInputFieldPlaceholder(0);
50
- });
51
-
52
- it('On expanding any other option accordion, the previously expanded accordion should continue to stay in expanded state', () => {
53
- feedbackScalePage.steps.expandOptionAccordion(1);
54
- feedbackScalePage.steps.verifyOptionAccordionExpandedState(0);
55
- feedbackScalePage.steps.verifyOptionAccordionExpandedState(1);
56
- });
57
- });
58
-
59
- describe('Numbers feedback scale style - Preview tab contents', () => {
60
- const legendTexts = ['Poor', 'Okay', 'Can do better', 'Good', 'Excellent'];
61
- abortEarlySetup();
62
- before(() => {
63
- feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
64
- cy.barsPreLoaderWait();
65
- feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
66
- feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
67
- feedbackScalePage.steps.switchToPreviewTab();
68
- });
69
-
70
- it('By default 5 number buttons with text "#" (# being a number from 1 to 5) should be displayed in the preview tab', () => {
71
- utilities.verifyElementCount(feedbackScalePage.feedbackButton(), 5);
72
- for (let index = 0; index < 5; index++) {
73
- feedbackScalePage.steps.verifyFeedbackButtonInPreviewTab(index, `${index + 1}`)
74
- };
75
- });
76
-
77
- feedbackScalePage.tests.verifyLegendAccordionDefaultState();
78
-
79
- feedbackScalePage.tests.verifyLegendAccordionCollapsedAndExpandedState();
80
-
81
- it('The legend accordion should display the number button, no legend text should be displayed for the number buttons', () => {
82
- for (let index = 0; index < 5; index++) {
83
- feedbackScalePage.steps.verifyNumberBlocksInLegendAccordion(index);
84
- };
85
- utilities.verifyElementVisibilityState(feedbackScalePage.legendTextPreviewTab(), 'notExist');
86
- });
87
-
88
- it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective number button in the legend accordion', () => {
89
- feedbackScalePage.steps.switchToEditTab();
90
- legendTexts.forEach((legendText, index) => {
91
- feedbackScalePage.steps.expandOptionAccordion(index);
92
- feedbackScalePage.steps.addLegendText(index, legendText);
93
- });
94
- feedbackScalePage.steps.switchToPreviewTab();
95
- legendTexts.forEach((legendText, buttonIndex) => {
96
- feedbackScalePage.steps.verifyNumberBlockFeedbackButtonLabelLegendTextInLegendAccordion(buttonIndex, legendText);
97
- });
98
- });
99
-
100
- it('CSS of number buttons - unselected state', { tags: 'css' }, () => {
101
- utilities.verifyCSS(feedbackScalePage.feedbackButtonNumberText(), {
102
- 'color': css.color.text,
103
- 'font-size': css.fontSize.extraLarge,
104
- 'font-weight': css.fontWeight.regular,
105
- });
106
- utilities.verifyCSS(feedbackScalePage.feedbackButton(), {
107
- 'background-color': css.color.transparent,
108
- 'border': `1px solid ${css.color.figDefaultComponentBorder}`
109
- });
110
- cy.log('Hover state CSS')
111
- utilities.hoverOverElement(utilities.getNthElement(feedbackScalePage.feedbackButton(), 0));
112
- utilities.verifyCSS(utilities.getNthElement(feedbackScalePage.feedbackButton(), 0), {
113
- 'background-color': css.color.transparent,
114
- 'border': `2px solid ${css.color.figDefaultComponentBorder}`
115
- });
116
- utilities.hoverAwayFromElement();
117
- });
118
-
119
- it('Accessibility of number buttons - unselected state', { tags: 'a11y' }, () => {
120
- cy.checkAccessibility(feedbackScalePage.feedbackButton().parents('[class*="question-preview-wrapper"]'));
121
- });
122
-
123
- it('The user should be able to mark feedback by clicking on any number button', () => {
124
- feedbackScalePage.steps.clickOnFeedbackButton(0);
125
- feedbackScalePage.steps.verifyFeedbackButtonSelectedState(0);
126
- });
127
-
128
- it('The user should be able to update the feedback by selecting other button, previously selected button should get unselected', () => {
129
- feedbackScalePage.steps.clickOnFeedbackButton(1);
130
- feedbackScalePage.steps.verifyFeedbackButtonSelectedState(1);
131
- feedbackScalePage.steps.verifyFeedbackButtonUnselectedState(0);
132
- });
133
-
134
- it('CSS of number buttons - selected state', { tags: 'css' }, () => {
135
- utilities.verifyCSS(utilities.getNthElement(feedbackScalePage.feedbackButtonNumberText(), 1), {
136
- 'color': css.color.text,
137
- 'font-size': css.fontSize.extraLarge,
138
- 'font-weight': css.fontWeight.bold,
139
- });
140
- utilities.verifyCSS(utilities.getNthElement(feedbackScalePage.feedbackButton(), 1), {
141
- 'background-color': "rgba(107, 139, 255, 0.1)",
142
- 'border': `2px solid ${css.color.figDefaultComponentBorder}`
143
- });
144
- utilities.verifyCSS(feedbackScalePage.legendAccordion().find('.customize_info_label'), {
145
- 'color': css.color.activeButtons,
146
- 'font-size': css.fontSize.normal,
147
- 'font-weight': css.fontWeight.regular
148
- });
149
- utilities.verifyCSS(feedbackScalePage.legendTextPreviewTab(), {
150
- 'color': css.color.text,
151
- 'font-size': css.fontSize.small,
152
- 'font-weight': css.fontWeight.regular
153
- });
154
- });
155
-
156
- it('Accessibility of number buttons - selected state', { tags: 'a11y' }, () => {
157
- cy.checkAccessibility(feedbackScalePage.feedbackButton().parents('[class*="question-preview-wrapper"]'));
158
- });
159
- });
160
-
161
- describe('Numbers feedback scale style - Add and delete options : Edit tab functionality', () => {
162
- abortEarlySetup();
163
- before(() => {
164
- feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
165
- cy.barsPreLoaderWait();
166
- feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
167
- feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
168
- });
169
-
170
- it('The user should be able to add a new option by increasing the stepper count in the options input field', () => {
171
- feedbackScalePage.steps.increaseOptionsInputStepperCount(1);
172
- feedbackScalePage.steps.verifyOptionsAccordionCount(6);
173
- });
174
-
175
- it('The newly added option should be displayed with label "Option 6", Points and "Delete option" icon button, by default the accordion should be in collapsed state', () => {
176
- feedbackScalePage.steps.verifyOptionsAccordionProperties(5, { optionLabel: 'Option 6', Points: '6' });
177
- feedbackScalePage.steps.verifyOptionAccordionCollapsedState(5);
178
- });
179
-
180
- it('The user should also be able to add a new option using the "+Add option" button, the count in the options stepper input field should also update accordingly', () => {
181
- feedbackScalePage.steps.addOption();
182
- feedbackScalePage.steps.verifyCountInOptionsStepperInputField(7);
183
- feedbackScalePage.steps.verifyOptionsAccordionCount(7);
184
- feedbackScalePage.steps.verifyOptionsAccordionProperties(6, { optionLabel: 'Option 7', Points: '7' });
185
- });
186
-
187
- it('When the user deletes an option accordion, then the remaining options should get updated accordingly, the count in the options stepper input field should also update accordingly', () => {
188
- feedbackScalePage.steps.deleteOptionAccordion(5);
189
- for (let index = 0; index < 6; index++) {
190
- feedbackScalePage.steps.verifyOptionsAccordionProperties(index, { optionLabel: `Option ${index + 1}`, Points: `${index + 1}` });
191
- };
192
- feedbackScalePage.steps.verifyCountInOptionsStepperInputField(6);
193
- });
194
-
195
- it('When the user decreases the options stepper count, the last option should get removed and the remaining options should get updated accordingly', () => {
196
- feedbackScalePage.steps.decreaseOptionsInputStepperCount(1);
197
- feedbackScalePage.steps.verifyCountInOptionsStepperInputField(5);
198
- for (let index = 0; index < 5; index++) {
199
- feedbackScalePage.steps.verifyOptionsAccordionProperties(index, { optionLabel: `Option ${index + 1}`, Points: `${index + 1}` });
200
- };
201
- feedbackScalePage.steps.verifyCountInOptionsStepperInputField(5);
202
- });
203
- });
204
-
205
- describe('Numbers feedback scale style - Add and delete options : Preview tab functionality', () => {
206
- abortEarlySetup();
207
- before(() => {
208
- feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
209
- cy.barsPreLoaderWait();
210
- feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
211
- feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
212
- });
213
-
214
- it('When the increases the stepper count in the options input field, the newly added feedback buttons should be displayed in the preview tab', () => {
215
- feedbackScalePage.steps.increaseOptionsInputStepperCount(1);
216
- feedbackScalePage.steps.switchToPreviewTab();
217
- feedbackScalePage.steps.verifyFeedbackButtonInPreviewTab(5, '6');
218
- feedbackScalePage.steps.verifyNumberBlocksInLegendAccordion(5);
219
- });
220
-
221
- it('When the user adds a new option using the "+Add option" button, the newly added feedback buttons should be displayed in the preview tab', () => {
222
- feedbackScalePage.steps.switchToEditTab();
223
- feedbackScalePage.steps.addOption();
224
- feedbackScalePage.steps.switchToPreviewTab();
225
- feedbackScalePage.steps.verifyFeedbackButtonInPreviewTab(6, '7');
226
- feedbackScalePage.steps.verifyNumberBlocksInLegendAccordion(6);
227
- });
228
-
229
- it('When the user deletes an option accordion, then the remaining feedback buttons should get updated accordingly in the preview tab', () => {
230
- feedbackScalePage.steps.switchToEditTab();
231
- feedbackScalePage.steps.deleteOptionAccordion(5);
232
- feedbackScalePage.steps.switchToPreviewTab();
233
- utilities.verifyElementCount(feedbackScalePage.feedbackButton(), 6);
234
- for (let index = 0; index < 6; index++) {
235
- feedbackScalePage.steps.verifyFeedbackButtonInPreviewTab(index, `${index + 1}`);
236
- feedbackScalePage.steps.verifyNumberBlocksInLegendAccordion(index);
237
- };
238
- });
239
-
240
- it('When the user decreases the options stepper count, then the last feedback button should get removed and the remaining options should get updated accordingly', () => {
241
- feedbackScalePage.steps.switchToEditTab();
242
- feedbackScalePage.steps.decreaseOptionsInputStepperCount(1);
243
- feedbackScalePage.steps.switchToPreviewTab();
244
- utilities.verifyElementCount(feedbackScalePage.feedbackButton(), 5);
245
- for (let index = 0; index < 5; index++) {
246
- feedbackScalePage.steps.verifyFeedbackButtonInPreviewTab(index, `${index + 1}`);
247
- feedbackScalePage.steps.verifyNumberBlocksInLegendAccordion(index);
248
- };
249
- });
250
- });
251
-
252
- describe('Numbers feedback scale style - Colors section contents', () => {
253
- const modifiedColor = 'rgba(255, 0, 0, 0.7)'
254
- abortEarlySetup();
255
- before(() => {
256
- feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
257
- cy.barsPreLoaderWait();
258
- feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
259
- feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
260
- });
261
-
262
- it('For "Numbers" feedback scale style, in the color section, a color block with "rgb(107, 139, 255)" color should be displayed. An edit icon and "Edit color" label should be displayed besides the color block"', () => {
263
- feedbackScalePage.steps.verifyColorPickerBlockColor(0, numbersDefaultColor);
264
- utilities.verifyInnerText(feedbackScalePage.editColorButton(), 'Edit color');
265
- utilities.verifyElementVisibilityState(feedbackScalePage.editColorButton(), 'visible');
266
- });
267
-
268
- it('When the user clicks on the "Edit color" button, a "Select color" popup should be displayed and the default selected color block should be in the selected state in the color popup', () => {
269
- feedbackScalePage.steps.editColor(0);
270
- colorPopupComponent.steps.verifySaturationPaletteColor('rgb(107, 139, 255)');
271
- colorPopupComponent.steps.verifyHuePaletteColor('rgb(0, 55, 255)');
272
- colorPopupComponent.steps.verifyHexValue('#6B8BFF');
273
- colorPopupComponent.steps.verifyOpacityInputFieldValue('100');
274
- colorPopupComponent.steps.verifyOpacitySliderValue('100');
275
- colorPopupComponent.steps.verifySelectedColorBlock(numbersDefaultColor);
276
- colorPopupComponent.steps.verifyRecommendedColorBlockSelectedState(8);
277
- });
278
-
279
- it('When the user modifies the selected color, the updated color should be displayed in the color block of the "Colors" section', () => {
280
- colorPopupComponent.steps.addInputToHexInputField('#ff0000');
281
- colorPopupComponent.steps.addInputToOpacityInputField('70');
282
- colorPopupComponent.steps.clickOnOkButton();
283
- feedbackScalePage.steps.verifyColorPickerBlockColor(0, modifiedColor);
284
- })
285
- });
286
-
287
- describe('Numbers feedback scale style - Colors : Preview tab functionality', () => {
288
- const modifiedColor = 'rgba(255, 0, 0, 0.1)'
289
- abortEarlySetup();
290
- before(() => {
291
- feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
292
- cy.barsPreLoaderWait();
293
- feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
294
- feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
295
- });
296
-
297
- it('When the user modifies the selected color for number buttons, then on marking the feedback in the preview tab, the feedback button should get highlighted with the modified color', () => {
298
- feedbackScalePage.steps.editColor(0);
299
- colorPopupComponent.steps.addInputToHexInputField('#ff0000');
300
- colorPopupComponent.steps.addInputToOpacityInputField('70');
301
- colorPopupComponent.steps.clickOnOkButton();
302
- feedbackScalePage.steps.switchToPreviewTab();
303
- feedbackScalePage.steps.clickOnFeedbackButton(1);
304
- feedbackScalePage.steps.verifyFeedbackButtonSelectedState(1);
305
- feedbackScalePage.steps.verifyFeedbackButtonSelectedStateColor(1, modifiedColor);
306
- });
307
- });
308
- });