itemengine-cypress-automation 1.0.131 → 1.0.133-7thMarchFixes-0e78080.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -2
  2. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +154 -0
  3. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneAlternateAnswerPopup.js +170 -0
  4. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneSettings.js +335 -0
  5. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +142 -0
  6. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +76 -0
  7. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +8 -8
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +341 -0
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettingsForGroupedLayout.js +241 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +1 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettingsForGroupedLayout.js +3 -3
  13. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +350 -0
  14. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +356 -0
  15. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +402 -0
  16. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +4 -4
  17. package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +242 -0
  18. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +11 -16
  19. package/cypress/e2e/ILC/TextEntryMath/checkAnswerFunctionalityForAllViews.smoke.js +4 -6
  20. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +3 -4
  21. package/cypress/fixtures/theme/ilc.json +2 -0
  22. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
  23. package/cypress/pages/components/correctIncorrectAnswerLabelComponent.js +1 -1
  24. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +35 -5
  25. package/cypress/pages/components/imageCanvasComponent.js +1 -1
  26. package/cypress/pages/components/index.js +2 -1
  27. package/cypress/pages/components/questionInputFieldComponent.js +31 -0
  28. package/cypress/pages/components/responseAreaSettingsPopupComponent.js +74 -0
  29. package/cypress/pages/drawingResponsePage.js +1 -1
  30. package/cypress/pages/fillInTheGapsDragAndDropPage.js +318 -62
  31. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -26
  32. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +24 -1
  33. package/cypress/pages/simpleCalculatorPage.js +140 -10
  34. package/cypress/pages/textEntryMathPage.js +3 -2
  35. package/package.json +2 -2
@@ -236,10 +236,9 @@ describe('Preview of Audio response for bar audio recorder style', () => {
236
236
  utilities.verifyInnerText(audioResponsePage.recordingStatusText(), 'Recording...');
237
237
  utilities.verifyElementVisibilityState(audioResponsePage.barPreviewRetakeButton(), 'visible');
238
238
  utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
239
- utilities.verifyElementVisibilityState(audioResponsePage.previewVolumeMeter(), 'visible');
240
239
  utilities.verifyElementVisibilityState(audioResponsePage.barPreviewPlaybackTime(), 'visible');
241
240
  utilities.verifyElementVisibilityState(audioResponsePage.playbackProgressBar(), 'visible');
242
- audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:10', '00:10');
241
+ audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:00', '00:10');
243
242
  });
244
243
  });
245
244
 
@@ -0,0 +1,154 @@
1
+ import { fillInTheGapsDragAndDropPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ const fontSizeDropdownOptions = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
7
+ const fontSizes = ['12px', '14px', '16px', '18px', '22px', '26px'];
8
+
9
+ describe('Create item page - Fill in the gaps with drag and drop: Additional Settings accordion', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ describe('Additional Settings accordion', () => {
15
+ abortEarlySetup();
16
+ before(() => {
17
+ fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');;
18
+ cy.barsPreLoaderWait();
19
+ });
20
+
21
+ fillInTheGapsDragAndDropPage.tests.verifyAdditonalSettingsAccordionProperties();
22
+ });
23
+
24
+ describe('Additional settings: Font size contents', () => {
25
+ abortEarlySetup();
26
+ before(() => {
27
+ fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');;
28
+ cy.barsPreLoaderWait();
29
+ fillInTheGapsDragAndDropPage.steps.expandAdditonalSettings();
30
+ });
31
+
32
+ fillInTheGapsDragAndDropPage.tests.verifyFontSizeSectionContents();
33
+ });
34
+
35
+ describe('Additional settings: Font size functionality edit tab', () => {
36
+ abortEarlySetup();
37
+ before(() => {
38
+ fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');;
39
+ cy.barsPreLoaderWait();
40
+ fillInTheGapsDragAndDropPage.steps.addQuestionInstructions();
41
+ fillInTheGapsDragAndDropPage.steps.expandAdditonalSettings();
42
+ });
43
+
44
+ fontSizeDropdownOptions.forEach((option, fontsIndex) => {
45
+ it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${option} accordingly`, () => {
46
+ fillInTheGapsDragAndDropPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
47
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.fontSizeDropdown(), `${option}`);
48
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.optionContainerOptionsSpecifyCorrectAnswerSection(), {
49
+ 'font-size': fontSizes[fontsIndex]
50
+ });
51
+ });
52
+ });
53
+ });
54
+
55
+ describe('Additional settings: Font size functionality preview tab', () => {
56
+ abortEarlySetup();
57
+ before(() => {
58
+ fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');;
59
+ cy.barsPreLoaderWait();
60
+ fillInTheGapsDragAndDropPage.steps.addQuestionInstructions();
61
+ fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(['Petals', 'Leaves']);
62
+ fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0, 'Leaves': 1 });
63
+ fillInTheGapsDragAndDropPage.steps.allotPoints(20);
64
+ fillInTheGapsDragAndDropPage.steps.expandAdditonalSettings();
65
+ });
66
+
67
+ fontSizeDropdownOptions.forEach((option, fontsIndex) => {
68
+ it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${option} accordingly`, () => {
69
+ fillInTheGapsDragAndDropPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
70
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.fontSizeDropdown(), `${option}`);
71
+ fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
72
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.questionInstructionsText(), {
73
+ 'font-size': fontSizes[fontsIndex]
74
+ });
75
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.questionContainerPreviewTab(), {
76
+ 'font-size': fontSizes[fontsIndex]
77
+ });
78
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.optionContainerOptionsPreviewTab(), {
79
+ 'font-size': fontSizes[fontsIndex]
80
+ });
81
+ fillInTheGapsDragAndDropPage.steps.switchToGradingView();
82
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.dropzoneNumeration(), {
83
+ 'font-size': fontSizes[fontsIndex]
84
+ });
85
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctAnswersLabel(), {
86
+ 'font-size': fontSizes[fontsIndex]
87
+ });
88
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctAnswersNumeration(), {
89
+ 'font-size': fontSizes[fontsIndex]
90
+ });
91
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctAnswersOptions(), {
92
+ 'font-size': fontSizes[fontsIndex]
93
+ });
94
+ fillInTheGapsDragAndDropPage.steps.switchToEditTab();
95
+ });
96
+ });
97
+ });
98
+
99
+ describe('Setting tab: Accessibility section', () => {
100
+ abortEarlySetup();
101
+ before(() => {
102
+ fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');;
103
+ fillInTheGapsDragAndDropPage.steps.expandAdditonalSettings();
104
+ });
105
+
106
+ it('When the user expands additional settings accordion then \'Accessibility\' label should be displayed', () => {
107
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.accessibilityLabel(), 'Accessibility');
108
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.accessibilityLabel(), 'visible');
109
+ });
110
+
111
+ it('In \'Accessibility\' section, \'Flag this question as non-accessible\' label with checkbox should be displayed and it should be unchecked by default', () => {
112
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.flagNonAccessibleCheckbox(), 'exist');
113
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.flagNonAccessibleLabel(), 'Flag this question as non-accessible');
114
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.flagNonAccessibleLabel(), 'visible');
115
+ fillInTheGapsDragAndDropPage.steps.verifyFlagThisItemNonAccessibleCheckboxIsUnchecked();
116
+ });
117
+
118
+
119
+ it('User should be able to check the \'Flag this question as non-accessible\' checkbox', () => {
120
+ fillInTheGapsDragAndDropPage.steps.checkFlagThisItemNonAccessibleCheckbox();
121
+ });
122
+
123
+ it('CSS of \'Accessibility\' section', { tags: 'css' }, () => {
124
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.accessibilityLabel(), {
125
+ 'color': css.color.labels,
126
+ 'font-size': css.fontSize.default,
127
+ 'font-weight': css.fontWeight.semibold
128
+ });
129
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.flagNonAccessibleLabel(), {
130
+ 'color': css.color.labelText,
131
+ 'font-size': css.fontSize.normal,
132
+ 'font-weight': css.fontWeight.regular
133
+ });
134
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.flagNonAccessibleCheckbox().parents('.icon-checkbox-selected').find('.checkbox-icon-border-rect'), {
135
+ 'fill': css.color.activeButtons
136
+ });
137
+ });
138
+
139
+ it('Accessibility of checked \'Flag this question as non-accessible\' checkbox and \'Alternate accessible item id\' input field', { tags: 'a11y' }, () => {
140
+ cy.checkAccessibility(fillInTheGapsDragAndDropPage.flagNonAccessibleCheckbox());
141
+ });
142
+ });
143
+
144
+ describe('Additional Settings: Details section', () => {
145
+ abortEarlySetup();
146
+ before(() => {
147
+ fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');;
148
+ cy.barsPreLoaderWait();
149
+ fillInTheGapsDragAndDropPage.steps.expandAdditonalSettings();
150
+ });
151
+
152
+ fillInTheGapsDragAndDropPage.tests.verifyDetailsSection();
153
+ });
154
+ });
@@ -0,0 +1,170 @@
1
+ import { fillInTheGapsDragAndDropPage } from "../../../pages";
2
+ import utilities from "../../../support/helpers/utilities";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('Create item page - Fill in the gaps with text: Dropzone level alternate answer popup', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Dropzone level alternate answer popup - Edit tab', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
15
+ cy.barsPreLoaderWait();
16
+ fillInTheGapsDragAndDropPage.steps.addOption();
17
+ fillInTheGapsDragAndDropPage.steps.addOption();
18
+ fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(['Petals', 'Leaves', 'Roots', 'Stem']);
19
+ });
20
+
21
+ it('By default a disabled \'Add alternate\' button should be displayed besides each dropzone in specify correct answer section', () => {
22
+ fillInTheGapsDragAndDropPage.steps.verifyDefaultAddAlternateAnswerButtonIsDisplayed(0);
23
+ fillInTheGapsDragAndDropPage.steps.verifyDefaultAddAlternateAnswerButtonIsDisplayed(1);
24
+ });
25
+
26
+ it('CSS of disabled \'Add alternate\' button', { tags: 'css' }, () => {
27
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.addAlternateButtonSpecifyCorrectAnswer(), {
28
+ 'color': css.color.secondaryBtnDisabled,
29
+ 'font-size': css.fontSize.default,
30
+ 'font-weight': css.fontWeight.regular
31
+ });
32
+ });
33
+
34
+ it('Accessibility of of disabled \'Add alternate\' button', { tags: 'css' }, () => {
35
+ cy.checkAccessibility(fillInTheGapsDragAndDropPage.addAlternateButtonSpecifyCorrectAnswer());
36
+ });
37
+
38
+ it('When the user drops an option in the dropzone, then \'Add alternate\' button should be enabled', () => {
39
+ fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0 });
40
+ utilities.verifyElementNotDisabled(utilities.getNthElement(fillInTheGapsDragAndDropPage.addAlternateButtonSpecifyCorrectAnswer(), 0));
41
+ utilities.verifyElementDisabled(utilities.getNthElement(fillInTheGapsDragAndDropPage.addAlternateButtonSpecifyCorrectAnswer(), 1));
42
+ });
43
+
44
+ it('CSS of enabled \'Add alternate\' button', { tags: 'css' }, () => {
45
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.addAlternateButtonSpecifyCorrectAnswer(), {
46
+ 'color': css.color.secondaryBtnActive,
47
+ 'font-size': css.fontSize.default,
48
+ 'font-weight': css.fontWeight.regular
49
+ });
50
+ });
51
+
52
+ it('Accessibility of of enabled \'Add alternate\' button', { tags: 'css' }, () => {
53
+ cy.checkAccessibility(fillInTheGapsDragAndDropPage.addAlternateButtonSpecifyCorrectAnswer());
54
+ });
55
+
56
+ it('When the user clicks on \'Add alternate\' button of a dropzone, then a popup should be displayed with the title \'Dropzone # alternate answer(s)\' and help text \'Select alternate answer(s).\'', () => {
57
+ fillInTheGapsDragAndDropPage.steps.clickOnAddAlternateButton(0);
58
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.alternateAnswerPopupTitle(), 'Dropzone 1 alternate answer(s)');
59
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.alternateAnswerPopupTitle(), 'visible');
60
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.alternateAnswerPopupHelpText(), 'Select alternate answer(s).');
61
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.alternateAnswerPopupHelpText(), 'visible');
62
+ });
63
+
64
+ it('The \'Dropzone # alternate answer(s)\' popup should display all the draggable options, except for the one already placed in the corresponding drop zone', () => {
65
+ fillInTheGapsDragAndDropPage.steps.verifyDropzoneAlternateAnswerPopupOptions(['Leaves', 'Roots', 'Stem']);
66
+ });
67
+
68
+ it('User should be able to select an option by clicking on it', () => {
69
+ fillInTheGapsDragAndDropPage.steps.selectAlternateAnswerInAlternateAnswerPopup(['Leaves']);
70
+ });
71
+
72
+ it('User should be able to deselect an option by clicking on it', () => {
73
+ fillInTheGapsDragAndDropPage.steps.deselectAlternateAnswerInAlternateAnswerPopup(['Leaves']);
74
+ });
75
+
76
+ it('User should be able to select multiple alternate answer options in the dropzone level alternate answer popup', () => {
77
+ fillInTheGapsDragAndDropPage.steps.selectAlternateAnswerInAlternateAnswerPopup(['Leaves', 'Roots']);
78
+ });
79
+
80
+ it('\'Save\' and \'Cancel\' button should be displayed in the popup', () => {
81
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.alternateAnswerPopupCancelButton(), 'Cancel');
82
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.alternateAnswerPopupCancelButton(), 'visible');
83
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.alternateAnswerPopupSaveButton(), 'Save');
84
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.alternateAnswerPopupSaveButton(), 'visible');
85
+ });
86
+
87
+ it('When the user clicks on \'Cancel\' button, then popup should be closed and the changes made by the user should not be saved', () => {
88
+ fillInTheGapsDragAndDropPage.steps.CancelDropzoneAlternateAnswersPopup();
89
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.alternateAnswerPopup(), 'notExist');
90
+ });
91
+
92
+ it('When the user has selected alternate options in the popup and clicks on \'Save\' button, then popup should be closed and the number of selected alternate options should be displayed beside the \'Add alternate\' button in the format \'# selected\'', () => {
93
+ fillInTheGapsDragAndDropPage.steps.clickOnAddAlternateButton(0);
94
+ fillInTheGapsDragAndDropPage.steps.selectAlternateAnswerInAlternateAnswerPopup(['Leaves']);
95
+ fillInTheGapsDragAndDropPage.steps.saveSelectedAlternateAnswers();
96
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.selectedAlternateAnswerCountSpecifyCorrectAnswer(), '1 selected');
97
+ });
98
+
99
+ it('User should be able to change the selected alternate options and the number of selected alternate options should be updated accordingly', () => {
100
+ fillInTheGapsDragAndDropPage.steps.clickOnAddAlternateButton(0);
101
+ fillInTheGapsDragAndDropPage.steps.selectAlternateAnswerInAlternateAnswerPopup(['Roots']);
102
+ fillInTheGapsDragAndDropPage.steps.saveSelectedAlternateAnswers();
103
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.selectedAlternateAnswerCountSpecifyCorrectAnswer(), '2 selected');
104
+ });
105
+
106
+ it('CSS of dropzone level alternate answer popup', { tags: 'css' }, () => {
107
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.selectedAlternateAnswerCountSpecifyCorrectAnswer(), {
108
+ 'color': css.color.alternateAnswerCount,
109
+ 'font-size': css.fontSize.default,
110
+ 'font-weight': css.fontWeight.regular
111
+ });
112
+ fillInTheGapsDragAndDropPage.steps.clickOnAddAlternateButton(0);
113
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.alternateAnswerPopupTitle(), {
114
+ 'color': css.color.flyoutTitle,
115
+ 'font-size': css.fontSize.heading,
116
+ 'font-weight': css.fontWeight.semibold
117
+ });
118
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.alternateAnswerPopupHelpText(), {
119
+ 'color': css.color.helperText,
120
+ 'font-size': css.fontSize.normal,
121
+ 'font-weight': css.fontWeight.normal,
122
+ 'font-style': 'italic'
123
+ });
124
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.alternateAnswerPopupOptions().eq(0), {
125
+ 'color': css.color.activeButtons,
126
+ 'font-size': css.fontSize.default,
127
+ 'font-weight': css.fontWeight.regular,
128
+ 'border': `1px solid ${css.color.activeComponentBorder}`
129
+ });
130
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.alternateAnswerPopupOptions().eq(2), {
131
+ 'color': css.color.unselectedOptionText,
132
+ 'font-size': css.fontSize.default,
133
+ 'font-weight': css.fontWeight.regular,
134
+ 'border': `1px solid ${css.color.draggableOptionBorder}`
135
+ });
136
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.alternateAnswerPopupCancelButton(), {
137
+ 'color': css.color.whiteText,
138
+ 'font-size': css.fontSize.default,
139
+ 'font-weight': css.fontWeight.semibold,
140
+ 'background-color': css.color.primaryBtnBg
141
+ });
142
+ utilities.verifyCSS(fillInTheGapsDragAndDropPage.alternateAnswerPopupSaveButton(), {
143
+ 'color': css.color.secondaryBtn,
144
+ 'font-size': css.fontSize.default,
145
+ 'font-weight': css.fontWeight.semibold,
146
+ 'background-color': css.color.transparent
147
+ });
148
+ });
149
+
150
+ it('Accessibility of dropzone level alternate answer popup', { tags: 'css' }, () => {
151
+ cy.checkAccessibility(fillInTheGapsDragAndDropPage.alternateAnswerPopup());
152
+ });
153
+
154
+ it('When user opens the alternate answer popup for another dropzone, then alternate answer popup with the title and options as per the corresponding dropzone should be displayed', () => {
155
+ fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Leaves': 1 });
156
+ fillInTheGapsDragAndDropPage.steps.clickOnAddAlternateButton(1);
157
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.alternateAnswerPopupTitle(), 'Dropzone 2 alternate answer(s)');
158
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.alternateAnswerPopupHelpText(), 'Select alternate answer(s).');
159
+ fillInTheGapsDragAndDropPage.steps.verifyDropzoneAlternateAnswerPopupOptions(['Petals', 'Roots', 'Stem']);
160
+ cy.log('Post-step: Close the alternate answers popup');
161
+ fillInTheGapsDragAndDropPage.steps.CancelDropzoneAlternateAnswersPopup();
162
+ });
163
+
164
+ it('When user removes the option from the dropzone, then the add alternate button should be disabled again', () => {
165
+ fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
166
+ utilities.verifyElementDisabled(utilities.getNthElement(fillInTheGapsDragAndDropPage.addAlternateButtonSpecifyCorrectAnswer(), 0));
167
+ utilities.verifyElementNotDisabled(utilities.getNthElement(fillInTheGapsDragAndDropPage.addAlternateButtonSpecifyCorrectAnswer(), 1));
168
+ });
169
+ });
170
+ });