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
@@ -1,178 +0,0 @@
1
- import { highlightPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
-
6
- describe('Create Item page - Highlight: Question Instructions and Question section', () => {
7
- before(() => {
8
- cy.loginAs('admin');
9
- });
10
-
11
- describe('Question Instructions input field - Edit tab', () => {
12
- abortEarlySetup();
13
- before(() => {
14
- cy.log('Navigating to Highlight question type');
15
- highlightPage.steps.navigateToCreateQuestion('highlight');
16
- cy.barsPreLoaderWait();
17
- });
18
-
19
- highlightPage.tests.verifyQuestionInstructionsInputFieldEditTab();
20
- });
21
-
22
- describe('Question Instructions input field - Preview tab', () => {
23
- abortEarlySetup();
24
- before(() => {
25
- cy.log('Navigating to Highlight question type');
26
- highlightPage.steps.navigateToCreateQuestion('highlight');
27
- cy.barsPreLoaderWait();
28
- });
29
-
30
- highlightPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
31
- });
32
-
33
- describe('Question input field - Edit tab', () => {
34
- abortEarlySetup();
35
- before(() => {
36
- highlightPage.steps.navigateToCreateQuestion('highlight');
37
- cy.barsPreLoaderWait();
38
- });
39
-
40
- it('\'Question\' label and input field should be displayed and by default in the question input field, sample \'Lorem Ipsum\' text should be present', () => {
41
- utilities.verifyInnerText(highlightPage.questionLabel(), 'Question');
42
- utilities.verifyInnerText(highlightPage.questionInputField(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n\n\n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n\n\n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
43
- });
44
-
45
- it('The default sample \'Lorem Ipsum\' text in the question input field should also be displayed in Highlight options section and Set correct answer section in the Edit tab.', () => {
46
- utilities.verifyInnerText(highlightPage.highlightOptionsSectionTextWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
47
- utilities.verifyInnerText(highlightPage.setCorrectAnswerTextWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
48
- });
49
-
50
- it('When the user removes all the text from the question input field and focuses out of it, an error message \'Error: Question is required.\' should be displayed', () => {
51
- highlightPage.steps.clearQuestionInputField();
52
- highlightPage.steps.focusOutOfQuestionInputField();
53
- utilities.verifyInnerText(highlightPage.errorMessage(), 'Error: Question is required.');
54
- highlightPage.steps.verifyErroredStateOfQuestionInputField();
55
- });
56
-
57
- highlightPage.tests.verifyCSSAnda11yOfErrorMessage();
58
-
59
- it('The user should be able to give input in the question input field, then the error message should disappear and the updated question should be displayed in Highlight options section and Set correct answer section in the Edit tab', () => {
60
- cy.log('Add Image to Question input field')
61
- highlightPage.steps.focusInQuestionInputField();
62
- highlightPage.steps.selectImageOptionFromCKEditorToolbar();
63
- highlightPage.steps.addImageToInputField();
64
- highlightPage.steps.verifyImageAndAltTextInQuestionInputField();
65
- highlightPage.steps.addInputToQuestionInputField('{enter}');
66
- cy.log('Add equation to Question input field')
67
- highlightPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
68
- highlightPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
69
- highlightPage.steps.verifyEquationInQuestionInputField();
70
- highlightPage.steps.addInputToQuestionInputField('{rightarrow}{enter}');
71
- cy.log('Add bold text to input field')
72
- highlightPage.steps.focusInQuestionInputField();
73
- highlightPage.steps.selectBoldOptionFromCKEditorToolbar();
74
- highlightPage.steps.addInputToQuestionInputField('This is Bold text input.');
75
- highlightPage.steps.verifyBoldTextInQuestionInputField();
76
- highlightPage.steps.addInputToQuestionInputField('{enter}');
77
- cy.log('Add link to Question input field')
78
- highlightPage.steps.selectLinkOptionFromCKEditorToolbar();
79
- highlightPage.steps.addLinkToInputField();
80
- highlightPage.steps.verifyLinkInQuestionInputField();
81
- utilities.verifyElementVisibilityState(highlightPage.errorMessage(), 'notExist');
82
- highlightPage.steps.focusOutOfQuestionInputField();
83
- });
84
-
85
- it('CSS of Question label and Question input field contents', { tags: 'css' }, () => {
86
- utilities.verifyCSS(highlightPage.questionLabel(), {
87
- 'color': css.color.sectionHeading,
88
- 'font-size': css.fontSize.normal,
89
- 'font-weight': css.fontWeight.semibold
90
- });
91
- utilities.verifyCSS(highlightPage.questionInputField(), {
92
- 'color': css.color.text,
93
- 'font-size': css.fontSize.default,
94
- 'font-weight': css.fontWeight.regular,
95
- 'border': `1px solid ${css.color.figDefaultComponentBorder}`
96
- });
97
- utilities.verifyCSS(highlightPage.questionInputField().find('a'), {
98
- 'color': css.color.linkText,
99
- 'font-size': css.fontSize.default,
100
- 'font-weight': css.fontWeight.bold
101
- });
102
- });
103
-
104
- it('Image, equation, bold text and link added in Question input field should be properly displayed in highlight options section', () => {
105
- highlightPage.steps.verifyImageAndAltTextInHighlightOptionsSection();
106
- highlightPage.steps.verifyEquationInHighlightOptionsSection();
107
- highlightPage.steps.verifyBoldTextInHighlightOptionsSection();
108
- highlightPage.steps.verifyLinkInHighlightOptionsSection();
109
- });
110
-
111
- it('Image, equation, bold text and link added in Question input field should be properly displayed in set correct answer section', () => {
112
- highlightPage.steps.verifyImageAndAltTextInSetCorrectAnswerSection();
113
- highlightPage.steps.verifyEquationInSetCorrectAnswerSection();
114
- highlightPage.steps.verifyBoldTextInSetCorrectAnswerSection();
115
- highlightPage.steps.verifyLinkInSetCorrectAnswerSection();
116
- });
117
- });
118
-
119
- describe('Question field - Preview tab', () => {
120
- abortEarlySetup();
121
- before(() => {
122
- highlightPage.steps.navigateToCreateQuestion('highlight');
123
- cy.barsPreLoaderWait();
124
- });
125
-
126
- it('In Preview tab, the sample \'Lorem Ipsum\' text should be displayed in the question field', () => {
127
- highlightPage.steps.switchToPreviewTab()
128
- utilities.verifyInnerText(highlightPage.previewTabQuestionContainer(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
129
- });
130
-
131
- it('The user should be able to edit text in the question input field and the updated question should be displayed in the preview tab', () => {
132
- cy.log('Switching to edit tab')
133
- highlightPage.steps.switchToEditTab();
134
- highlightPage.steps.clearQuestionInputField();
135
- cy.log('Add Image to Question input field')
136
- highlightPage.steps.focusInQuestionInputField();
137
- highlightPage.steps.selectImageOptionFromCKEditorToolbar();
138
- highlightPage.steps.addImageToInputField();
139
- highlightPage.steps.verifyImageAndAltTextInQuestionInputField();
140
- highlightPage.steps.addInputToQuestionInputField('{enter}');
141
- cy.log('Add equation to Question input field')
142
- highlightPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
143
- highlightPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
144
- highlightPage.steps.verifyEquationInQuestionInputField();
145
- highlightPage.steps.addInputToQuestionInputField('{rightarrow}{enter}');
146
- cy.log('Add bold text to input field')
147
- highlightPage.steps.focusInQuestionInputField();
148
- highlightPage.steps.selectBoldOptionFromCKEditorToolbar();
149
- highlightPage.steps.addInputToQuestionInputField('This is Bold text input.');
150
- highlightPage.steps.verifyBoldTextInQuestionInputField();
151
- highlightPage.steps.addInputToQuestionInputField('{enter}');
152
- cy.log('Add link to Question input field')
153
- highlightPage.steps.selectLinkOptionFromCKEditorToolbar();
154
- highlightPage.steps.addLinkToInputField();
155
- highlightPage.steps.verifyLinkInQuestionInputField();
156
- cy.log('Switching to preview tab')
157
- highlightPage.steps.switchToPreviewTab();
158
- highlightPage.steps.verifyImageAndAltTextInPreviewTab();
159
- highlightPage.steps.verifyEquationInPreviewTab();
160
- highlightPage.steps.verifyBoldTextInPreviewTab();
161
- highlightPage.steps.verifyLinkInPreviewTab();
162
- });
163
-
164
- //Failing due to https://redmine.zeuslearning.com/issues/537907
165
- it('CSS of \'Preview tab\' when image, equation, bold text and link are added', { tags: 'css' }, () => {
166
- utilities.verifyCSS(highlightPage.previewTabQuestionContainer().find('strong'), {
167
- 'color': css.color.labels,
168
- 'font-size': css.fontSize.default,
169
- 'font-weight': css.fontWeight.bold
170
- });
171
- utilities.verifyCSS(highlightPage.previewTabQuestionContainer().find('a'), {
172
- 'color': css.color.linkText,
173
- 'font-size': css.fontSize.default,
174
- 'font-weight': css.fontWeight.bold
175
- });
176
- });
177
- });
178
- });
@@ -1,125 +0,0 @@
1
- import constants from "../../../fixtures/constants";
2
- import { highlightImagePage } from "../../../pages";
3
- import { uploadImageSectionComponent } from "../../../pages/components/uploadImageSectionComponent";
4
- import abortEarlySetup from "../../../support/helpers/abortEarly";
5
- import utilities from "../../../support/helpers/utilities";
6
-
7
- describe('Create Item page - Highlight image: Question instructions, edit tab contents and image popup', () => {
8
- before(() => {
9
- cy.loginAs('admin');
10
- });
11
-
12
- describe('Question instructions input field - Edit tab', () => {
13
- abortEarlySetup();
14
- before(() => {
15
- cy.log('Navigating to highlight image question type');
16
- highlightImagePage.steps.navigateToCreateQuestion('highlight image');
17
- });
18
-
19
- highlightImagePage.tests.verifyQuestionInstructionsInputFieldEditTab();
20
- });
21
-
22
- describe('Question instructions input field - Preview tab', () => {
23
- abortEarlySetup();
24
- before(() => {
25
- cy.log('Navigating to Highlight image question type');
26
- highlightImagePage.steps.navigateToCreateQuestion('highlight image');
27
- });
28
-
29
- highlightImagePage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
30
- });
31
-
32
- describe('Highlight image - Edit tab default contents', () => {
33
- abortEarlySetup();
34
- before(() => {
35
- cy.log('Navigating to highlight image question type');
36
- highlightImagePage.steps.navigateToCreateQuestion('highlight image');
37
- });
38
-
39
- it('\'Highlight image\' title should be displayed', () => {
40
- utilities.verifyInnerText(highlightImagePage.highlightImageLabel(), 'Highlight image');
41
- utilities.verifyElementVisibilityState(highlightImagePage.highlightImageLabel(), 'visible');
42
- });
43
-
44
- uploadImageSectionComponent.tests.uploadImageEditTabContents();
45
- });
46
-
47
- describe('Upload image - device popup contents', () => {
48
- abortEarlySetup();
49
- before(() => {
50
- cy.log('Navigating to highlight image question type');
51
- highlightImagePage.steps.navigateToCreateQuestion('highlight image');
52
- });
53
-
54
- uploadImageSectionComponent.tests.verifyUploadImagePopupImageTitle();
55
-
56
- uploadImageSectionComponent.tests.uploadImagePopupContents(500, 500);
57
-
58
- uploadImageSectionComponent.tests.verifyButtonReplaceInImagePopup();
59
- });
60
-
61
- //Failing due to https://redmine.zeuslearning.com/issues/547305
62
- describe('Upload image popup contents functionality', () => {
63
- abortEarlySetup();
64
- before(() => {
65
- cy.log('Navigating to highlight image question type');
66
- highlightImagePage.steps.navigateToCreateQuestion('highlight image');
67
- uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
68
- });
69
-
70
- uploadImageSectionComponent.tests.uploadImageHeightWidthAspectRatioAndResetDimensionsFunctionality(500, 500);
71
-
72
- uploadImageSectionComponent.tests.uploadImageReplaceButtonFunctionality();
73
-
74
- it('When user selects the \'Cancel\' button the image should not be uploaded', () => {
75
- uploadImageSectionComponent.steps.clickOnImagePopupCancelButton();
76
- utilities.verifyElementVisibilityState(highlightImagePage.highlighImageCanvas(), 'notExist');
77
- });
78
-
79
- it('When user uploads an image and selects \'Ok\' button the image should be displayed in the highlight image section', () => {
80
- uploadImageSectionComponent.steps.uploadFile('highlightImage.jpg');
81
- uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
82
- uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
83
- utilities.verifyElementVisibilityState(highlightImagePage.highlighImageCanvas(), 'visible');
84
- });
85
- });
86
-
87
- describe('Upload image - source URL popup contents', () => {
88
- abortEarlySetup();
89
- before(() => {
90
- cy.log('Navigating to highlight image question type');
91
- highlightImagePage.steps.navigateToCreateQuestion('highlight image');
92
- });
93
-
94
- uploadImageSectionComponent.tests.verifyUploadImageSourceURLTitle();
95
-
96
- uploadImageSectionComponent.tests.verifyUploadImageSourceURLDefaultLabelAndInputField();
97
-
98
- uploadImageSectionComponent.tests.uploadImagePopupContents(650, 684);
99
- });
100
-
101
- describe('Upload image \'Source URL\' popup contents functionality', () => {
102
- abortEarlySetup();
103
- before(() => {
104
- cy.log('Navigating to highlight image question type');
105
- highlightImagePage.steps.navigateToCreateQuestion('highlight image');
106
- uploadImageSectionComponent.steps.clickOnSourceURL();
107
- uploadImageSectionComponent.steps.uploadImageUsingSourceURL(constants.flowerImage);
108
- });
109
-
110
- uploadImageSectionComponent.tests.uploadImageHeightWidthAspectRatioAndResetDimensionsFunctionality(650, 684);
111
-
112
- it('When user selects the \'Cancel\' button the image should not be uploaded', () => {
113
- uploadImageSectionComponent.steps.clickOnImagePopupCancelButton();
114
- utilities.verifyElementVisibilityState(highlightImagePage.highlighImageCanvas(), 'notExist');
115
- });
116
-
117
- it('When user uploads an image and selects \'Ok\' button the image should be displayed in the highlight image section', () => {
118
- uploadImageSectionComponent.steps.clickOnSourceURL();
119
- uploadImageSectionComponent.steps.uploadImageUsingSourceURL(constants.flowerImage);
120
- uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
121
- uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
122
- utilities.verifyElementVisibilityState(highlightImagePage.highlighImageCanvas(), 'visible');
123
- });
124
- });
125
- });
@@ -1,117 +0,0 @@
1
- import { listMatchingPage, listMatchingScoring } from "../../../../pages";
2
- import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
-
4
- describe('Create Item page - List Matching - grouped options layout - All or nothing scoring', () => {
5
- before(() => {
6
- cy.loginAs('admin');
7
- });
8
-
9
- describe('Show correct answer', () => {
10
- abortEarlySetup();
11
- before(() => {
12
- cy.log('Navigate to list matching question type and fill the option input fields in grouped options layout');
13
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
14
- cy.barsPreLoaderWait();
15
- listMatchingPage.steps.setQuestionStemsAndGroupedOptionsForScoringWithoutAlternateTab();
16
- listMatchingPage.steps.switchToPreviewTab();
17
- });
18
-
19
- listMatchingScoring.tests.verifyShowCorrectAnswerBasicFunctionality();
20
- });
21
-
22
- describe('Question Preview: AutoScored - All or Nothing - grouped options layout', () => {
23
- abortEarlySetup();
24
- before(() => {
25
- cy.log('Navigate to List matching question type, fill the necessary details and points and switch to preview tab');
26
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
27
- cy.barsPreLoaderWait();
28
- listMatchingPage.steps.setQuestionStemsAndGroupedOptionsForScoringWithoutAlternateTab();
29
- listMatchingPage.steps.allotPoints(20);
30
- listMatchingPage.steps.setCorrectAnswersForScoringWithoutAlternateTab();
31
- listMatchingPage.steps.expandAdditonalSettings();
32
- listMatchingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
33
- listMatchingPage.steps.switchToPreviewTab();
34
- });
35
-
36
- listMatchingScoring.tests.verifyAutoScoredAllOrNothingScoring();
37
-
38
- listMatchingScoring.tests.verifyMinimumScoreAwardedIfAttemptedForIncorrectAnswer('20');
39
- });
40
-
41
- describe('Question Preview: AutoScored - All or Nothing grouped options layout with identical response options', () => {
42
- abortEarlySetup();
43
- before(() => {
44
- cy.log('Navigate to List Matching question type, fill the necessary details and points and switch to preview tab');
45
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
46
- cy.barsPreLoaderWait();
47
- listMatchingPage.steps.deleteStem(2);
48
- listMatchingPage.steps.addInputToAllStemFields(['Stem 1', 'Stem 2']);
49
- listMatchingPage.steps.selectResponseOptionsLayout('Grouped');
50
- listMatchingPage.steps.addGroupTitle(0, 'Group 1');
51
- listMatchingPage.steps.deleteResponseOptionInputField(2);
52
- listMatchingPage.steps.addInputToOptionsForGroupedResponseLayout(0, ['Identical correct answer for stem 1', 'Incorrect answer 1']);
53
- listMatchingPage.steps.addGroup();
54
- listMatchingPage.steps.addGroupTitle(1, 'Group 2');
55
- listMatchingPage.steps.addInputToOptionsForGroupedResponseLayout(1, ['Identical correct answer for stem 1', 'Correct answer for stem 2']);
56
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Identical correct answer for stem 1', 0);
57
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Correct answer for stem 2', 1);
58
- listMatchingPage.steps.allotPoints(20);
59
- listMatchingPage.steps.expandAdditonalSettings();
60
- listMatchingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
61
- listMatchingPage.steps.switchToPreviewTab();
62
- });
63
-
64
- it('Case: When user has identical options to give as input', () => {
65
- cy.log('Both the identical options should be visible in the response options section and when user clicks on \'Show correct answer\' checkbox only one of the identical options should be displayed in the correct answer container as the correct answer');
66
- listMatchingPage.steps.verifyOptionsInPreviewTab(['Identical correct answer for stem 1', 'Incorrect answer 1', 'Identical correct answer for stem 1', 'Correct answer for stem 2']);
67
- listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
68
- listMatchingPage.steps.verifyCorrectAnswerStemOptionsInCorrectAnswerContainerAndCount(['Identical correct answer for stem 1', 'Correct answer for stem 2'], ['1', '2']);
69
-
70
- cy.log('Post-step: Unchecking show correct answer checkbox');
71
- listMatchingPage.steps.uncheckShowCorrectAnswerCheckbox();
72
-
73
- cy.log('When the user gives the correct answer as input and user selects the show correct answer checkbox, green check-mark icon should be displayed besides both the responses, correct answer container should not be displayed and user should be awarded with full points');
74
-
75
- cy.log('Answering the stem 1 with the correct identical option');
76
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Identical correct answer for stem 1', 0);
77
-
78
- cy.log('Answering the response 2 with the correct option');
79
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Correct answer for stem 2', 1);
80
- listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
81
- listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(0);
82
- listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
83
- listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
84
- listMatchingPage.previewScoreText()
85
- .verifyInnerText('20/20');
86
-
87
- cy.log('Post-step: Unchecking show correct answer checkbox');
88
- listMatchingPage.steps.uncheckShowCorrectAnswerCheckbox();
89
-
90
- cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides responses and correct answer container should not be displayed');
91
- listMatchingPage.steps.checkAnswer();
92
- listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(0);
93
- listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
94
- listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
95
-
96
- cy.log('When the user gives correct input to the response but with a different identical option and user selects the show correct answer checkbox, then red cross-mark icon should be displayed besides the different identical response, correct answer container should be displayed with the user response marked incorrect and user should be awarded with zero points');
97
-
98
- cy.log('Answering the response 1 with a different correct identical option');
99
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInPreviewTab('Identical correct answer for stem 1', 0);
100
- listMatchingPage.steps.checkShowCorrectAnswerCheckbox();
101
- listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
102
- listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
103
- listMatchingPage.previewScoreText()
104
- .verifyInnerText('0/20');
105
- listMatchingPage.steps.verifyCorrectAnswerStemOptionsInCorrectAnswerContainerAndCount(['Identical correct answer for stem 1'], ['1']);
106
-
107
- cy.log('Post-step: Unchecking show correct answer checkbox');
108
- listMatchingPage.steps.uncheckShowCorrectAnswerCheckbox();
109
-
110
- cy.log('When user clicks on \'Check answer\' button, then then red cross-mark icon should be displayed besides the different identical response and correct answer container should not be displayed')
111
- listMatchingPage.steps.checkAnswer()
112
- listMatchingPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
113
- listMatchingPage.steps.verifyCorrectOptionCheckmarkIcon(1);
114
- listMatchingPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
115
- });
116
- });
117
- });
@@ -1,207 +0,0 @@
1
- import { listMatchingPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- const css = Cypress.env('css');
4
-
5
- const optionsForGroup2 = ['Response 5', 'Response 6'];
6
- let optionsForThreeResponses = ['Response 1', 'Response 2', 'Response 3'];
7
- let optionsForFourResponses = ['Response 1', 'Response 2', 'Response 3', 'Response 4'];
8
-
9
- describe('Create Item Page: List matching: Grouped response layout - Edit tab', () => {
10
- before(() => {
11
- cy.loginAs('admin');
12
- });
13
-
14
- describe('\'Grouped\' response options layout - Edit tab section contents', () => {
15
- abortEarlySetup();
16
- before(() => {
17
- cy.log('Navigating to List Matching question type');
18
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
19
- cy.barsPreLoaderWait();
20
- });
21
-
22
- listMatchingPage.tests.verifyGroupedOptionsContentAndFunctionality();
23
- });
24
-
25
- describe('\'Grouped\' response options layout - Set correct answer section contents', () => {
26
- abortEarlySetup();
27
- before(() => {
28
- cy.log('Navigating to List Matching question type');
29
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
30
- cy.barsPreLoaderWait();
31
- listMatchingPage.steps.selectResponseOptionsLayout('Grouped');
32
- });
33
-
34
- it('When the user has not entered text in the \'Group title\' input field then no group title should be displayed for the group in the response options container of the \'Set Correct Answer\' section', () => {
35
- listMatchingPage.setCorrectAnswerSectionGroupedResponseTitle()
36
- .should('not.exist');
37
- });
38
-
39
- it('When the user enters text in the \'Group title\' input field, a group title should be displayed for the group in the response options container of the \'Set Correct Answer\' section', () => {
40
- listMatchingPage.steps.addGroupTitle(0, 'Group title A');
41
- listMatchingPage.setCorrectAnswerSectionGroupedResponseTitle()
42
- .should('have.text', 'Group title A');
43
- });
44
-
45
- it('When the user has not entered text in the options input field then three empty draggable options along with drag handles should be displayed as a group in the response options container of the \'Set Correct Answer\' section', () => {
46
- listMatchingPage.steps.verifyGroupedResponseContainerContentsInSetCorrectAnswerSection(0, ['', '', '']);
47
- listMatchingPage.steps.verifyDragIconVisibleInOptionsInSetCorrectAnswerSection();
48
- });
49
-
50
- it('When the user enters text in options input fields then the entered text should be displayed in the respective draggable options in a group in the response options container of the \'Set Correct Answer\' section', () => {
51
- listMatchingPage.steps.addInputToOptionsForDragAndDropFields(optionsForThreeResponses);
52
- cy.wait(500);
53
- listMatchingPage.steps.verifyGroupedResponseContainerContentsInSetCorrectAnswerSection(0, optionsForThreeResponses);
54
- });
55
-
56
- //Failing due to https://redmine.zeuslearning.com/issues/541421
57
- it('CSS of \'Grouped\' container in the \'Set Correct Answer\' section', { tags: 'css' }, () => {
58
- listMatchingPage.setCorrectAnswerSectionGroupedResponseContainer()
59
- .should('have.css', 'border', `1px solid ${css.color.defaultDropdownBorder}`);
60
- listMatchingPage.draggableOption()
61
- .should('have.css', 'border', `1px solid ${css.color.figDefaultComponentBorder}`)
62
- .find('.question-text-wrapper')
63
- .verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
64
- listMatchingPage.draggableOption()
65
- .find('.drag-indicator-icon')
66
- .should('have.css', 'fill', `${css.color.activeButtons}`);
67
- });
68
-
69
- it('Accessibility of \'Grouped\' container in the \'Set Correct Answer\' section', { tags: 'a11y' }, () => {
70
- cy.checkAccessibility(listMatchingPage.setCorrectAnswerSectionGroupedResponseContainer());
71
- });
72
-
73
- it('When the user adds an option using \'Add Option\' button then the added option should be displayed along with drag handle inside the group in the response options container of the \'Set Correct Answer\' section', () => {
74
- listMatchingPage.steps.addOption();
75
- listMatchingPage.steps.verifyCountOfDraggableOptionsInSetCorrectAnswerSection('List matching', 4);
76
- listMatchingPage.steps.verifyDefaultStateOfDraggableOptionsInSetCorrectAnswerSection('List matching', 3);
77
- cy.log('Checking that input text to the newly added option is displayed in the response options container of the \'Set Correct Answer\' section')
78
- listMatchingPage.steps.addInputToOptionForDragAndDropInputField(optionsForFourResponses[3], 3);
79
- cy.wait(500);
80
- listMatchingPage.steps.verifyGroupedResponseContainerContentsInSetCorrectAnswerSection(0, optionsForFourResponses);
81
- });
82
-
83
- it('When the user deletes an option then the deleted option should get removed from the group in the response options container of the \'Set Correct Answer\' section', () => {
84
- listMatchingPage.steps.deleteResponseOptionInputField(3);
85
- cy.log('verifying the text of draggable options after deleting an option')
86
- listMatchingPage.steps.verifyGroupedResponseContainerContentsInSetCorrectAnswerSection(0, optionsForThreeResponses);
87
- });
88
-
89
- it('When the user adds a new group, the new group should be displayed in the response options container of the \'Set Correct Answer\' section', () => {
90
- listMatchingPage.steps.addGroup();
91
- listMatchingPage.steps.verifyCountOfGroupsInSetCorrectAnswerSection(2);
92
- listMatchingPage.steps.verifyGroupedResponseContainerContentsInSetCorrectAnswerSection(1, ['', '']);
93
- });
94
-
95
- it('When the user deletes a group, then the deleted group should get removed from the response options container as well as from the response areas (if any) of the \'Set Correct Answer\' section', () => {
96
- cy.log('Pre step: Entering text into the text fields of group 2 response container')
97
- listMatchingPage.steps.addInputToOptionsForGroupedResponseLayout(1, optionsForGroup2);
98
- listMatchingPage.steps.addGroupTitle(1, 'Group title B');
99
- cy.log('Setting a correct answer option')
100
- listMatchingPage.steps.clickAndDropOptionInStemResponseAreaInSetCorrectAnswerSection('Response 2', 0);
101
- cy.log('Deleting the 1st group')
102
- listMatchingPage.steps.deleteGroup(0);
103
- listMatchingPage.steps.verifyCountOfGroupsInSetCorrectAnswerSection(1);
104
- listMatchingPage.steps.verifyErroredStateOfEmptyResponseFieldInSetCorrectAnswerSection(0);
105
- cy.log('verifying the contents of group 2 after deleting group 1')
106
- listMatchingPage.steps.verifyGroupedResponseOptionsInSetCorrectAnswerSection(0, 'Group title B', optionsForGroup2);
107
- });
108
- });
109
-
110
- describe('\'Grouped\' response options layout - Preview tab contents', () => {
111
- abortEarlySetup();
112
- before(() => {
113
- cy.log('Navigating to List Matching question type');
114
- listMatchingPage.steps.navigateToCreateQuestion('list matching');
115
- cy.barsPreLoaderWait();
116
- listMatchingPage.steps.selectResponseOptionsLayout('Grouped');
117
- listMatchingPage.steps.switchToPreviewTab();
118
- });
119
-
120
- it('When the user has not entered text in the \'Group title\' input field then no group title should be displayed for the group in the response options container of the \'Preview tab\'', () => {
121
- listMatchingPage.previewTabGroupedResponseTitle()
122
- .should('not.exist');
123
- });
124
-
125
- it('When the user enters text in the \'Group title\' input field, a group title should be displayed for the group in the response options container of the \'Preview tab\'', () => {
126
- cy.log('Pre step: Switching to edit tab')
127
- listMatchingPage.steps.switchToEditTab();
128
- listMatchingPage.steps.addGroupTitle(0, 'Group title A');
129
- listMatchingPage.steps.switchToPreviewTab();
130
- listMatchingPage.previewTabGroupedResponseTitle()
131
- .should('have.text', 'Group title A');
132
- });
133
-
134
- it('When the user has not entered text in the options input field then three empty draggable options along with drag handles should be displayed as a group in the response options container of the \'Preview tab\'', () => {
135
- listMatchingPage.steps.verifyGroupedResponseContainerContentsInPreviewTab(0, ['', '', '']);
136
- });
137
-
138
- it('When the user enters text in options input fields then the entered text should be displayed in the respective draggable options in the response options container of the \'Preview tab\'', () => {
139
- cy.log('Pre step: Switching to edit tab')
140
- listMatchingPage.steps.switchToEditTab();
141
- listMatchingPage.steps.addInputToOptionsForDragAndDropFields(optionsForThreeResponses);
142
- listMatchingPage.steps.switchToPreviewTab();
143
- listMatchingPage.steps.verifyGroupedResponseContainerContentsInPreviewTab(0, optionsForThreeResponses);
144
- });
145
-
146
- it('CSS of \'Grouped\' container in the response options container of the \'Preview tab\'', { tags: 'css' }, () => {
147
- listMatchingPage.previewTabGroupedResponseContainer()
148
- .should('have.css', 'border', `1px solid ${css.color.defaultDropdownBorder}`)
149
- .within(() => {
150
- listMatchingPage.draggableOption()
151
- .should('have.css', 'border', `1px solid ${css.color.figDefaultComponentBorder}`)
152
- .find('.drag-indicator-icon')
153
- .should('have.css', 'fill', `${css.color.activeButtons}`);
154
- });
155
- });
156
-
157
- it('Accessibility of \'Grouped\' container in the response options container of the \'Preview tab\'', { tags: 'a11y' }, () => {
158
- cy.checkAccessibility(listMatchingPage.previewTabGroupedResponseContainer());
159
- });
160
-
161
- it('When the user adds an option using \'Add Option\' button then the added option should be displayed inside the group in the response options container of the \'Preview tab\'', () => {
162
- cy.log('Pre step: Switching to edit tab')
163
- listMatchingPage.steps.switchToEditTab();
164
- listMatchingPage.steps.addOption();
165
- listMatchingPage.steps.switchToPreviewTab();
166
- listMatchingPage.steps.verifyCountOfDraggableOptionsInPreviewTab('List matching', 4);
167
- listMatchingPage.steps.verifyDefaultStateOfDraggableOptionsInPreviewTab('List matching', 3);
168
- cy.log('Checking that input text to the newly added option is displayed in the option in Preview tab section')
169
- listMatchingPage.steps.switchToEditTab();
170
- listMatchingPage.steps.addInputToOptionForDragAndDropInputField(optionsForFourResponses[3], 3);
171
- listMatchingPage.steps.switchToPreviewTab();
172
- listMatchingPage.steps.verifyGroupedResponseContainerContentsInPreviewTab(0, optionsForFourResponses);
173
- });
174
-
175
- it('When the user deletes an option then the deleted option should get removed from the group in the response options container of the \'Preview tab\'', () => {
176
- cy.log('Pre step: Switching to edit tab')
177
- listMatchingPage.steps.switchToEditTab();
178
- listMatchingPage.steps.deleteResponseOptionInputField(3);
179
- cy.log('Checking the deleted option should not exist in the Preview tab')
180
- listMatchingPage.steps.switchToPreviewTab();
181
- cy.log('verifying the text of draggable options after deleting an option')
182
- listMatchingPage.steps.verifyGroupedResponseContainerContentsInPreviewTab(0, optionsForThreeResponses);
183
- });
184
-
185
- it('When the user adds a new group, the new group should be displayed in the response options container of the \'Preview tab\'', () => {
186
- cy.log('Pre step: Switching to edit tab')
187
- listMatchingPage.steps.switchToEditTab();
188
- listMatchingPage.steps.addGroup();
189
- listMatchingPage.steps.switchToPreviewTab();
190
- listMatchingPage.steps.verifyCountOfGroupsInPreviewTab(2);
191
- listMatchingPage.steps.verifyGroupedResponseContainerContentsInPreviewTab(1, ['', '']);
192
- });
193
-
194
- it('When the user deletes a group, it should get removed from response options container of the \'Preview tab\'', () => {
195
- cy.log('Pre step: Switching to edit tab')
196
- listMatchingPage.steps.switchToEditTab();
197
- cy.log('Pre step: Entering text into the text fields of group 2 response container')
198
- listMatchingPage.steps.addInputToOptionsForGroupedResponseLayout(1, optionsForGroup2)
199
- listMatchingPage.steps.addGroupTitle(1, 'Group title B');
200
- listMatchingPage.steps.deleteGroup(0);
201
- listMatchingPage.steps.switchToPreviewTab();
202
- listMatchingPage.steps.verifyCountOfGroupsInPreviewTab(1);
203
- listMatchingPage.steps.verifyGroupedResponseContainerContentsInPreviewTab(0, optionsForGroup2);
204
- listMatchingPage.steps.verifyGroupTitleInPreviewTab(0, 'Group title B');
205
- });
206
- });
207
- })