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.
- package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +154 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneAlternateAnswerPopup.js +170 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneSettings.js +335 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +142 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +76 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +341 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettingsForGroupedLayout.js +241 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettingsForGroupedLayout.js +3 -3
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +350 -0
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +356 -0
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +402 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +242 -0
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +11 -16
- package/cypress/e2e/ILC/TextEntryMath/checkAnswerFunctionalityForAllViews.smoke.js +4 -6
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +3 -4
- package/cypress/fixtures/theme/ilc.json +2 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/correctIncorrectAnswerLabelComponent.js +1 -1
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +35 -5
- package/cypress/pages/components/imageCanvasComponent.js +1 -1
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/questionInputFieldComponent.js +31 -0
- package/cypress/pages/components/responseAreaSettingsPopupComponent.js +74 -0
- package/cypress/pages/drawingResponsePage.js +1 -1
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +318 -62
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -26
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +24 -1
- package/cypress/pages/simpleCalculatorPage.js +140 -10
- package/cypress/pages/textEntryMathPage.js +3 -2
- package/package.json +2 -2
@@ -0,0 +1,335 @@
|
|
1
|
+
import { dialogBoxBase, 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 drag and drop: Dropzone settings', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Dropzone settings - Contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
});
|
17
|
+
|
18
|
+
it('When the user clicks on a dropzone settings button, then dropzone settings popup should be displayed with the title \'Dropzone settings\'', () => {
|
19
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
20
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
21
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBoxTitle(), 'visible');
|
22
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Dropzone settings');
|
23
|
+
});
|
24
|
+
|
25
|
+
it('\'Width (px)\', \'Height (px)\' labels and input fields with default values should be displayed', () => {
|
26
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.responseAreaSettingsWidthLabel(), 'Width (px)');
|
27
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.responseAreaSettingsWidthLabel(), 'visible');
|
28
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.responseAreaSettingsWidthInputField(), 'visible');
|
29
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaSettingsWidthInputFieldValue(160);
|
30
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.responseAreaSettingsHeightLabel(), 'Height (px)');
|
31
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.responseAreaSettingsHeightLabel(), 'visible');
|
32
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.responseAreaSettingsHeightInputField(), 'visible');
|
33
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaSettingsHeightInputFieldValue(54);
|
34
|
+
});
|
35
|
+
|
36
|
+
it('The minimum allowed value for \'Width (px)\' and \'Height (px)\' input fields should be \'80\' and \'32\' respectively', () => {
|
37
|
+
fillInTheGapsDragAndDropPage.steps.verifyMinimumValueOfWidthAndHeightInputFields();
|
38
|
+
});
|
39
|
+
|
40
|
+
it('When user gives an input lower than \'80\' in \'Width (px)\' input field, then the input field value should be automatically set to 80', () => {
|
41
|
+
fillInTheGapsDragAndDropPage.steps.addInputToWidthInputField(50);
|
42
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaSettingsWidthInputFieldValue(80);
|
43
|
+
});
|
44
|
+
|
45
|
+
it('When user gives an input lower than \'32\' in \'Height (px)\' input field, then the input field value should be automatically set to 32', () => {
|
46
|
+
fillInTheGapsDragAndDropPage.steps.addInputToHeightInputField(30);
|
47
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaSettingsHeightInputFieldValue(32);
|
48
|
+
});
|
49
|
+
|
50
|
+
it('\'Word wrap\' and \'Set for all dropzones\' labels and checkboxes should be displayed and \'Set for all dropzones\' checkbox should be checked', () => {
|
51
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.dropzoneSettingsWordWrapLabel(), 'Word wrap');
|
52
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.dropzoneSettingsWordWrapLabel(), 'visible');
|
53
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.dropzoneSettingsWordWrapCheckbox(), 'exist');
|
54
|
+
fillInTheGapsDragAndDropPage.steps.verifyWordWrapCheckboxUnchecked();
|
55
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.dropzoneSettingsSetForAllDropzoneLabel(), 'Set for all dropzones');
|
56
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.dropzoneSettingsSetForAllDropzoneLabel(), 'visible');
|
57
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.dropzoneSettingsSetForAllDropzoneCheckbox(), 'exist');
|
58
|
+
fillInTheGapsDragAndDropPage.steps.verifySetForAllDropzoneCheckboxChecked();
|
59
|
+
});
|
60
|
+
|
61
|
+
it('\'OK\' and \'Cancel\' button should be displayed in the popup', () => {
|
62
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.responseAreaSettingsCancelButton(), 'Cancel');
|
63
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.responseAreaSettingsCancelButton(), 'visible');
|
64
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.responseAreaSettingsOkButton(), 'OK');
|
65
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.responseAreaSettingsOkButton(), 'visible');
|
66
|
+
});
|
67
|
+
|
68
|
+
it('When user updates any value and clicks on \'Cancel\' button, then the dropzone settings popup should close and the updated values should not be saved', () => {
|
69
|
+
fillInTheGapsDragAndDropPage.steps.addInputToWidthInputField(150);
|
70
|
+
fillInTheGapsDragAndDropPage.steps.addInputToHeightInputField(120);
|
71
|
+
fillInTheGapsDragAndDropPage.steps.checkWordWrappedCheckbox();
|
72
|
+
fillInTheGapsDragAndDropPage.steps.uncheckSetForAllDropzoneCheckbox();
|
73
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsCancelButton();
|
74
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
75
|
+
cy.log('Reopening dropzone settings popup and verifying changes not retained');
|
76
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
77
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaSettingsWidthInputFieldValue(160);
|
78
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaSettingsHeightInputFieldValue(54);
|
79
|
+
fillInTheGapsDragAndDropPage.steps.verifyWordWrapCheckboxUnchecked();
|
80
|
+
fillInTheGapsDragAndDropPage.steps.verifySetForAllDropzoneCheckboxChecked();
|
81
|
+
});
|
82
|
+
|
83
|
+
it('When user updates any value and clicks on \'OK\' button, then the dropzone settings popup should close and the updated values should not be saved', () => {
|
84
|
+
fillInTheGapsDragAndDropPage.steps.addInputToWidthInputField(150);
|
85
|
+
fillInTheGapsDragAndDropPage.steps.addInputToHeightInputField(120);
|
86
|
+
fillInTheGapsDragAndDropPage.steps.checkWordWrappedCheckbox();
|
87
|
+
fillInTheGapsDragAndDropPage.steps.uncheckSetForAllDropzoneCheckbox();
|
88
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsOkButton();
|
89
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
90
|
+
cy.log('Reopening dropzone settings popup and verifying changes are retained');
|
91
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
92
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaSettingsWidthInputFieldValue(150);
|
93
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaSettingsHeightInputFieldValue(120);
|
94
|
+
fillInTheGapsDragAndDropPage.steps.verifyWordWrapCheckboxChecked();
|
95
|
+
fillInTheGapsDragAndDropPage.steps.verifySetForAllDropzoneCheckboxUnchecked();
|
96
|
+
});
|
97
|
+
|
98
|
+
it('CSS of dropzone level alternate answer popup', { tags: 'css' }, () => {
|
99
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
100
|
+
'color': css.color.flyoutTitle,
|
101
|
+
'font-size': css.fontSize.heading,
|
102
|
+
'font-weight': css.fontWeight.semibold
|
103
|
+
});
|
104
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.responseAreaSettingsWidthLabel(), {
|
105
|
+
'color': css.color.labels,
|
106
|
+
'font-size': css.fontSize.normal,
|
107
|
+
'font-weight': css.fontWeight.semibold
|
108
|
+
});
|
109
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.responseAreaSettingsHeightLabel(), {
|
110
|
+
'color': css.color.labels,
|
111
|
+
'font-size': css.fontSize.normal,
|
112
|
+
'font-weight': css.fontWeight.semibold
|
113
|
+
});
|
114
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.responseAreaSettingsWidthInputField(), {
|
115
|
+
'color': css.color.text,
|
116
|
+
'font-size': css.fontSize.default,
|
117
|
+
'font-weight': css.fontWeight.regular
|
118
|
+
});
|
119
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.responseAreaSettingsHeightInputField(), {
|
120
|
+
'color': css.color.text,
|
121
|
+
'font-size': css.fontSize.default,
|
122
|
+
'font-weight': css.fontWeight.regular
|
123
|
+
});
|
124
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.dropzoneSettingsWordWrapLabel(), {
|
125
|
+
'color': css.color.labels,
|
126
|
+
'font-size': css.fontSize.normal,
|
127
|
+
'font-weight': css.fontWeight.regular
|
128
|
+
});
|
129
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.dropzoneSettingsWordWrapCheckbox().parent().find('.checkbox-icon-border-rect'), {
|
130
|
+
'fill': css.color.activeButtons
|
131
|
+
});
|
132
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.dropzoneSettingsSetForAllDropzoneLabel(), {
|
133
|
+
'color': css.color.labels,
|
134
|
+
'font-size': css.fontSize.normal,
|
135
|
+
'font-weight': css.fontWeight.regular
|
136
|
+
});
|
137
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.responseAreaSettingsCancelButton(), {
|
138
|
+
'color': css.color.whiteText,
|
139
|
+
'font-size': css.fontSize.default,
|
140
|
+
'font-weight': css.fontWeight.semibold,
|
141
|
+
'background-color': css.color.primaryBtnBg
|
142
|
+
});
|
143
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.responseAreaSettingsOkButton(), {
|
144
|
+
'color': css.color.secondaryBtn,
|
145
|
+
'font-size': css.fontSize.default,
|
146
|
+
'font-weight': css.fontWeight.semibold,
|
147
|
+
'background-color': css.color.transparent
|
148
|
+
});
|
149
|
+
});
|
150
|
+
|
151
|
+
it('Accessibility of dropzone level alternate answer popup', { tags: 'css' }, () => {
|
152
|
+
cy.checkAccessibility(fillInTheGapsDragAndDropPage.alternateAnswerPopup());
|
153
|
+
});
|
154
|
+
});
|
155
|
+
|
156
|
+
describe('Dropzone settings - Width and Height input field functionality in Edit tab', () => {
|
157
|
+
abortEarlySetup();
|
158
|
+
before(() => {
|
159
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
160
|
+
cy.barsPreLoaderWait();
|
161
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
162
|
+
});
|
163
|
+
|
164
|
+
it('When \'Set for all dropzones\' checkbox is checked, user updates the width input field value and clicks on OK, then width of all response areas in question input field should be updated', () => {
|
165
|
+
fillInTheGapsDragAndDropPage.steps.addInputToWidthInputField(120);
|
166
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsOkButton();
|
167
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaWidth(0, '120px');
|
168
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaWidth(1, '120px');
|
169
|
+
});
|
170
|
+
|
171
|
+
it('When \'Set for all dropzones\' checkbox is checked, user updates the width input field value, then width of dropzones in specify correct answer section should be updated', () => {
|
172
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneWidthSpecifyCorrectAnswerSection(0, '120px');
|
173
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneWidthSpecifyCorrectAnswerSection(1, '120px');
|
174
|
+
});
|
175
|
+
|
176
|
+
it('When \'Set for all dropzones\' checkbox is unchecked, user updates the width input field value and clicks on OK, then width of that particular response area in question input field should be updated', () => {
|
177
|
+
cy.log('Pre-step: Uncheck \'Set for all dropzones\' checkbox')
|
178
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
179
|
+
fillInTheGapsDragAndDropPage.steps.uncheckSetForAllDropzoneCheckbox();
|
180
|
+
fillInTheGapsDragAndDropPage.steps.addInputToWidthInputField(180);
|
181
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsOkButton();
|
182
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaWidth(0, '180px');
|
183
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaWidth(1, '120px');
|
184
|
+
});
|
185
|
+
|
186
|
+
it('When \'Set for all dropzones\' checkbox is checked, user updates the width input field value, then width of that particular dropzone in specify correct answer section should be updated', () => {
|
187
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneWidthSpecifyCorrectAnswerSection(0, '180px');
|
188
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneWidthSpecifyCorrectAnswerSection(1, '120px');
|
189
|
+
});
|
190
|
+
|
191
|
+
it('When \'Set for all dropzones\' checkbox is checked, user updates the height input field value and clicks on OK, then height of all response areas in question input field should be updated', () => {
|
192
|
+
cy.log('Pre-step: Check \'Set for all dropzones\' checkbox')
|
193
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
194
|
+
fillInTheGapsDragAndDropPage.steps.checkSetForAllDropzoneCheckbox();
|
195
|
+
fillInTheGapsDragAndDropPage.steps.addInputToHeightInputField(100);
|
196
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsOkButton();
|
197
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaHeight(0, '100px');
|
198
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaHeight(1, '100px');
|
199
|
+
});
|
200
|
+
|
201
|
+
it('When \'Set for all dropzones\' checkbox is checked, user updates the height input field value, then height of dropzones in specify correct answer section should be updated', () => {
|
202
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightSpecifyCorrectAnswerSection(0, '100px');
|
203
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightSpecifyCorrectAnswerSection(1, '100px');
|
204
|
+
});
|
205
|
+
|
206
|
+
it('When \'Set for all dropzones\' checkbox is unchecked, user updates the height input field value and clicks on OK, then height of that particular response area in question input field should be updated', () => {
|
207
|
+
cy.log('Pre-step: Uncheck \'Set for all dropzones\' checkbox')
|
208
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
209
|
+
fillInTheGapsDragAndDropPage.steps.uncheckSetForAllDropzoneCheckbox();
|
210
|
+
fillInTheGapsDragAndDropPage.steps.addInputToHeightInputField(125);
|
211
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsOkButton();
|
212
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaHeight(0, '125px');
|
213
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaHeight(1, '100px');
|
214
|
+
});
|
215
|
+
|
216
|
+
it('When \'Set for all dropzones\' checkbox is checked, user updates the height input field value, then height of that particular dropzone in specify correct answer section should be updated', () => {
|
217
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightSpecifyCorrectAnswerSection(0, '125px');
|
218
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightSpecifyCorrectAnswerSection(1, '100px');
|
219
|
+
});
|
220
|
+
});
|
221
|
+
|
222
|
+
describe('Dropzone settings - Width and Height input field functionality in Preview tab', () => {
|
223
|
+
abortEarlySetup();
|
224
|
+
before(() => {
|
225
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
226
|
+
cy.barsPreLoaderWait();
|
227
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
228
|
+
});
|
229
|
+
|
230
|
+
it('When \'Set for all dropzones\' checkbox is checked, user updates the width and height input field value and clicks on OK, then dimensions of all dropzones in preview tab should be updated', () => {
|
231
|
+
fillInTheGapsDragAndDropPage.steps.addInputToWidthInputField(120);
|
232
|
+
fillInTheGapsDragAndDropPage.steps.addInputToHeightInputField(150);
|
233
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsOkButton();
|
234
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
235
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneWidthPreviewTab(0, '120px');
|
236
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightPreviewTab(0, '150px');
|
237
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneWidthPreviewTab(1, '120px');
|
238
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightPreviewTab(1, '150px');
|
239
|
+
});
|
240
|
+
|
241
|
+
it('When \'Set for all dropzones\' checkbox is unchecked, user updates the width and height input field value and clicks on OK, then dimensions of that particular dropzone in in preview tab should be updated', () => {
|
242
|
+
cy.log('Pre-step: Uncheck \'Set for all dropzones\' checkbox')
|
243
|
+
fillInTheGapsDragAndDropPage.steps.switchToEditTab();
|
244
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
245
|
+
fillInTheGapsDragAndDropPage.steps.uncheckSetForAllDropzoneCheckbox();
|
246
|
+
fillInTheGapsDragAndDropPage.steps.addInputToWidthInputField(180);
|
247
|
+
fillInTheGapsDragAndDropPage.steps.addInputToHeightInputField(130);
|
248
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsOkButton();
|
249
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
250
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneWidthPreviewTab(0, '180px');
|
251
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightPreviewTab(0, '130px');
|
252
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneWidthPreviewTab(1, '120px');
|
253
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightPreviewTab(1, '150px');
|
254
|
+
});
|
255
|
+
});
|
256
|
+
|
257
|
+
describe('Dropzone settings - Word wrap edit tab functionality', () => {
|
258
|
+
abortEarlySetup();
|
259
|
+
before(() => {
|
260
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
261
|
+
cy.barsPreLoaderWait();
|
262
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(['Branches of a plant have flowers which in turn have petals', 'Leaves grow on the branches of a plant which in turn grow on the stem']);
|
263
|
+
});
|
264
|
+
|
265
|
+
it('When \'Word wrap\' checkbox is unchecked and user drops a long text option in specify correct answer dropzone, then the dropped long text option should be incompletely displayed in the dropzone with an ellipses at the end and a tooltip which displays the entire option', () => {
|
266
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Branches of a plant have flowers which in turn have petals': 0 });
|
267
|
+
fillInTheGapsDragAndDropPage.steps.verifyOptionTextNotWordWrappedInDropzoneSpecifyCorrectAnswerSection(0);
|
268
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneOptionTooltipSpecifyCorrectAnswerSection(0, 'Branches of a plant have flowers which in turn have petals');
|
269
|
+
});
|
270
|
+
|
271
|
+
it('When \'Set for all dropzones\' checkbox is checked and user checks the \'Word wrap\' checkbox, then the wordwrap should be applied to all dropzones in specify correct answer section', () => {
|
272
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
273
|
+
fillInTheGapsDragAndDropPage.steps.checkWordWrappedCheckbox();
|
274
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsOkButton();
|
275
|
+
fillInTheGapsDragAndDropPage.steps.verifyOptionTextIsWordWrappedInDropzoneSpecifyCorrectAnswerSection(0);
|
276
|
+
});
|
277
|
+
|
278
|
+
it('When the \'Word wrap\' checkbox is checked and user drops a long text option in specify correct answer dropzone, then the dropped long text option should be word wrapped and the height of the dropzone should increase to accommodate the long text option', () => {
|
279
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightWhenLongTextIsDroppedInSpecifyCorrectAnswerSection();
|
280
|
+
fillInTheGapsDragAndDropPage.steps.verifyOptionTextIsWordWrappedInDropzoneSpecifyCorrectAnswerSection(1);
|
281
|
+
});
|
282
|
+
|
283
|
+
it('When \'Set for all dropzones\' checkbox is unchecked and user unchecks the \'Word wrap\' checkbox, then the wordwrap property should only be removed from that particular dropzone and its height should return to its original value', () => {
|
284
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
285
|
+
fillInTheGapsDragAndDropPage.steps.uncheckSetForAllDropzoneCheckbox();
|
286
|
+
fillInTheGapsDragAndDropPage.steps.uncheckWordWrappedCheckbox();
|
287
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsOkButton();
|
288
|
+
fillInTheGapsDragAndDropPage.steps.verifyOptionTextNotWordWrappedInDropzoneSpecifyCorrectAnswerSection(0);
|
289
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightSpecifyCorrectAnswerSection(0, '54px');
|
290
|
+
});
|
291
|
+
});
|
292
|
+
|
293
|
+
describe('Dropzone settings - Word wrap preview tab functionality', () => {
|
294
|
+
abortEarlySetup();
|
295
|
+
before(() => {
|
296
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
297
|
+
cy.barsPreLoaderWait();
|
298
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(['Branches of a plant have flowers which in turn have petals', 'Leaves grow on the branches of a plant which in turn grow on the stem']);
|
299
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
300
|
+
});
|
301
|
+
|
302
|
+
it('When \'Word wrap\' checkbox is unchecked and user drops a long text option in specify correct answer dropzone, then the dropped long text option should be incompletely displayed in the dropzone with an ellipses at the end and a tooltip which displays the entire option', () => {
|
303
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Branches of a plant have flowers which in turn have petals': 0 });
|
304
|
+
fillInTheGapsDragAndDropPage.steps.verifyOptionTextNotWordWrappedInDropzonePreviewTab(0);
|
305
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneOptionTooltipPreviewTab(0, 'Branches of a plant have flowers which in turn have petals');
|
306
|
+
});
|
307
|
+
|
308
|
+
it('When \'Set for all dropzones\' checkbox is checked and user checks the \'Word wrap\' checkbox, then wordwrap should be applied to all dropzones in specify correct answer section', () => {
|
309
|
+
fillInTheGapsDragAndDropPage.steps.switchToEditTab();
|
310
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
311
|
+
fillInTheGapsDragAndDropPage.steps.checkWordWrappedCheckbox();
|
312
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsOkButton();
|
313
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
314
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Branches of a plant have flowers which in turn have petals': 0 });
|
315
|
+
fillInTheGapsDragAndDropPage.steps.verifyOptionTextIsWordWrappedInDropzonePreviewTab(0);
|
316
|
+
});
|
317
|
+
|
318
|
+
it('When the \'Word wrap\' checkbox is checked and user drops a long text option in specify correct answer dropzone, then the dropped long text option should be word wrapped and the height of the dropzone should increase to accommodate the long text option', () => {
|
319
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightWhenLongTextIsDroppedInPreviewTab();
|
320
|
+
fillInTheGapsDragAndDropPage.steps.verifyOptionTextIsWordWrappedInDropzonePreviewTab(1);
|
321
|
+
});
|
322
|
+
|
323
|
+
it('When \'Set for all dropzones\' checkbox is unchecked and user unchecks the \'Word wrap\' checkbox, then the wordwrap property should only be removed from that particular dropzone and its height should return to its original value', () => {
|
324
|
+
fillInTheGapsDragAndDropPage.steps.switchToEditTab();
|
325
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsButton(0);
|
326
|
+
fillInTheGapsDragAndDropPage.steps.uncheckSetForAllDropzoneCheckbox();
|
327
|
+
fillInTheGapsDragAndDropPage.steps.uncheckWordWrappedCheckbox();
|
328
|
+
fillInTheGapsDragAndDropPage.steps.clickOnResponseAreaSettingsOkButton();
|
329
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
330
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Branches of a plant have flowers which in turn have petals': 0 });
|
331
|
+
fillInTheGapsDragAndDropPage.steps.verifyOptionTextNotWordWrappedInDropzoneSpecifyCorrectAnswerSection(0);
|
332
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneHeightPreviewTab(0, '54px');
|
333
|
+
});
|
334
|
+
});
|
335
|
+
});
|
@@ -0,0 +1,142 @@
|
|
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
|
+
describe('Create item page - Fill in the gaps with text: Question instructions, question input field', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question instructions input field - Edit tab', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
});
|
17
|
+
|
18
|
+
fillInTheGapsDragAndDropPage.tests.verifyQuestionInstructionsInputFieldEditTab();
|
19
|
+
});
|
20
|
+
|
21
|
+
describe('Question instructions input field - Preview tab', () => {
|
22
|
+
abortEarlySetup();
|
23
|
+
before(() => {
|
24
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
25
|
+
cy.barsPreLoaderWait();
|
26
|
+
});
|
27
|
+
|
28
|
+
fillInTheGapsDragAndDropPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
29
|
+
});
|
30
|
+
|
31
|
+
describe('Question input field - Edit tab', () => {
|
32
|
+
abortEarlySetup();
|
33
|
+
before(() => {
|
34
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
35
|
+
cy.barsPreLoaderWait();
|
36
|
+
});
|
37
|
+
|
38
|
+
it('\'Question\' label and input field should be displayed and by default in the question input field, sample \'Lorem Ipsum\' text along with two response areas should be present', () => {
|
39
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.questionLabel(), 'Question');
|
40
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.questionInputField(), 'Lorem ipsum dolor sit amet, \n1\nclose\n onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget \n2\nclose\n tempus tellus dapibus.');
|
41
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropPage.responseArea(), 2);
|
42
|
+
});
|
43
|
+
|
44
|
+
it('The response area should be displayed with a settings button, numeric count and a close button in the question input field', () => {
|
45
|
+
for (let index = 0; index < 2; index++) {
|
46
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaContents(index)
|
47
|
+
};
|
48
|
+
});
|
49
|
+
|
50
|
+
it('CSS of Question input field contents', { tags: 'css' }, () => {
|
51
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.questionInputField(), {
|
52
|
+
'color': css.color.text,
|
53
|
+
'font-size': css.fontSize.default,
|
54
|
+
'font-weight': css.fontWeight.regular
|
55
|
+
});
|
56
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.responseArea().find('.add_response_element'), {
|
57
|
+
'background-color': css.color.figActiveComponentBg,
|
58
|
+
'border': `1px solid ${css.color.activeButtons}`
|
59
|
+
});
|
60
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.responseAreaNumeration(), {
|
61
|
+
'color': css.color.liText,
|
62
|
+
'font-size': '32px',
|
63
|
+
'font-weight': css.fontWeight.regular
|
64
|
+
});
|
65
|
+
fillInTheGapsDragAndDropPage.responseAreaCloseButton()
|
66
|
+
.verifyPseudoClassBeforeProperty('color', css.color.activeButtons)
|
67
|
+
});
|
68
|
+
|
69
|
+
it('When the user has not focused inside the question input field, the \'add text container\' button should be in disabled state', () => {
|
70
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaButtonDisabled();
|
71
|
+
});
|
72
|
+
|
73
|
+
it('When the user focuses in the question input field, the \'+add text container\' button should get enabled, and when the user clicks on the \'+add text container\' button, a response area in the question input field, a dropzone along with \'Dropzone #\' label in the \'Specify correct answer\' section, a new \'aria label for dropzones\' input field in the additional settings should get added', () => {
|
74
|
+
fillInTheGapsDragAndDropPage.steps.focusInQuestionInputField();
|
75
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaButtonEnabled();
|
76
|
+
fillInTheGapsDragAndDropPage.steps.clickOnAddResponseAreaButton();
|
77
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropPage.responseArea(), 3);
|
78
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaContents(2);
|
79
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropPage.dropzoneSpecifyCorrectAnswerSection(), 3);
|
80
|
+
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsDragAndDropPage.dropzoneLabelSpecifyCorrectAnswerSection(), 2), 'Dropzone 3');
|
81
|
+
fillInTheGapsDragAndDropPage.steps.expandAdditonalSettings();
|
82
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropPage.enterAriaLabelInputField(), 3);
|
83
|
+
});
|
84
|
+
|
85
|
+
it('When the user clicks on the \'close\' button present on a response area, the response area in the question input field should get removed and the count of the response areas present in the question input field should get updated accordingly, response field along with \'Response #\' label in the \'specify correct answer\' section, \'Response #\' accordion in the additional settings accordion and the respective response field in the \'Preview tab\' should also get removed', () => {
|
86
|
+
cy.log('Switching to edit tab')
|
87
|
+
fillInTheGapsDragAndDropPage.steps.switchToEditTab();
|
88
|
+
fillInTheGapsDragAndDropPage.steps.deleteAResponseArea(1);
|
89
|
+
cy.log('Checking if 3rd response area gets removed from the question input field and the numeric counts get updated')
|
90
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropPage.responseArea(), 2);
|
91
|
+
for (let index = 0; index < 2; index++) {
|
92
|
+
fillInTheGapsDragAndDropPage.steps.verifyResponseAreaContents(index)
|
93
|
+
};
|
94
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropPage.dropzoneSpecifyCorrectAnswerSection(), 2);
|
95
|
+
for (let index = 0; index < 2; index++) {
|
96
|
+
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsDragAndDropPage.dropzoneLabelSpecifyCorrectAnswerSection(), index), `Dropzone ${index + 1}`);
|
97
|
+
};
|
98
|
+
});
|
99
|
+
|
100
|
+
it('When the user removes all response areas from the question input field, an error message \'Error: Minimum one response token is required.\' should be displayed', () => {
|
101
|
+
cy.log('Switching to edit tab')
|
102
|
+
fillInTheGapsDragAndDropPage.steps.switchToEditTab();
|
103
|
+
fillInTheGapsDragAndDropPage.steps.deleteAResponseArea(0);
|
104
|
+
fillInTheGapsDragAndDropPage.steps.deleteAResponseArea(0);
|
105
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.errorMessage(), 'Error: Minimum one response token is required.')
|
106
|
+
});
|
107
|
+
|
108
|
+
fillInTheGapsDragAndDropPage.tests.verifyErrorMessageCSSAndA11y();
|
109
|
+
|
110
|
+
fillInTheGapsDragAndDropPage.tests.addResponseAreaAndVerifyMinimumOneAreaRequiredErrorMessageNotExist();
|
111
|
+
|
112
|
+
fillInTheGapsDragAndDropPage.tests.verifyQuestionInputFieldPlaceholderText();
|
113
|
+
});
|
114
|
+
|
115
|
+
describe('Question input field - Preview tab', () => {
|
116
|
+
abortEarlySetup();
|
117
|
+
before(() => {
|
118
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
119
|
+
cy.barsPreLoaderWait();
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When the user adds a new response area in the question input field, the added response area should be displayed in the preview tab', () => {
|
123
|
+
fillInTheGapsDragAndDropPage.steps.addResponseArea();
|
124
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
125
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropPage.dropzonePreviewTab(), 3);
|
126
|
+
});
|
127
|
+
|
128
|
+
it('When the user edits the question input field text, the modified text should be visible in the preview tab', () => {
|
129
|
+
fillInTheGapsDragAndDropPage.steps.switchToEditTab();
|
130
|
+
fillInTheGapsDragAndDropPage.steps.addInputToQuestionInputField('Lorem ipsum');
|
131
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
132
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.questionContainerPreviewTab(), 'Lorem ipsum dolor sit amet, \n onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget \n tempus tellus dapibus.\nLorem ipsum');
|
133
|
+
});
|
134
|
+
|
135
|
+
it('When the user deletes a response area, it should get deleted from the question preview', () => {
|
136
|
+
fillInTheGapsDragAndDropPage.steps.switchToEditTab();
|
137
|
+
fillInTheGapsDragAndDropPage.steps.deleteAResponseArea(2);
|
138
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
139
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.questionContainerPreviewTab(), 'Lorem ipsum dolor sit amet, \n onsectetur adipiscing elit. Ut pellentesque tincidunt ornare. Integer porttitor est quis urna porttitor,eget \n tempus tellus dapibus.Lorem ipsum');
|
140
|
+
});
|
141
|
+
});
|
142
|
+
});
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { dialogBoxBase, fillInTheGapsDragAndDropPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const options = ['Flower', 'Leaves'];
|
5
|
+
|
6
|
+
describe('Create item page - Fill in the gaps drag and drop: Header section and Saving question', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Header section contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
15
|
+
});
|
16
|
+
|
17
|
+
fillInTheGapsDragAndDropPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Fill in the gaps with drag and drop');
|
18
|
+
});
|
19
|
+
|
20
|
+
describe('Tabs section', () => {
|
21
|
+
abortEarlySetup();
|
22
|
+
before(() => {
|
23
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
24
|
+
});
|
25
|
+
|
26
|
+
fillInTheGapsDragAndDropPage.tests.verifyTabsSection();
|
27
|
+
});
|
28
|
+
|
29
|
+
describe('Cancel button', () => {
|
30
|
+
abortEarlySetup();
|
31
|
+
before(() => {
|
32
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
33
|
+
});
|
34
|
+
|
35
|
+
fillInTheGapsDragAndDropPage.tests.verifyCancelButton('fill in the gaps with drag and drop')
|
36
|
+
});
|
37
|
+
|
38
|
+
describe('Save Question button', () => {
|
39
|
+
abortEarlySetup();
|
40
|
+
before(() => {
|
41
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
42
|
+
cy.barsPreLoaderWait();
|
43
|
+
});
|
44
|
+
|
45
|
+
describe('Validation error messages', () => {
|
46
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
47
|
+
|
48
|
+
it('Validation error messages should be displayed below required input fields', () => {
|
49
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionInstructionsErrorMessage();
|
50
|
+
fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(0);
|
51
|
+
fillInTheGapsDragAndDropPage.steps.verifyOptionsInputFieldErrorMessage(1);
|
52
|
+
fillInTheGapsDragAndDropPage.steps.verifyPointsFieldErrorMessage();
|
53
|
+
fillInTheGapsDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
|
54
|
+
fillInTheGapsDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorMessage();
|
55
|
+
});
|
56
|
+
|
57
|
+
it('Validation error messages should disappear when required input fields are filled', () => {
|
58
|
+
fillInTheGapsDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options in the correct dropzone');
|
59
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(options);
|
60
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Flower': 0, 'Leaves': 1 });
|
61
|
+
fillInTheGapsDragAndDropPage.steps.allotPoints(10);
|
62
|
+
fillInTheGapsDragAndDropPage.steps.verifyErrorMessageIsNotDisplayed();
|
63
|
+
fillInTheGapsDragAndDropPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
|
64
|
+
});
|
65
|
+
|
66
|
+
fillInTheGapsDragAndDropPage.tests.verifyCreateItemWrapperContentsA11y();
|
67
|
+
});
|
68
|
+
|
69
|
+
describe('Saving a question', () => {
|
70
|
+
it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
71
|
+
fillInTheGapsDragAndDropPage.steps.saveAQuestionAndVerifySnackbar();
|
72
|
+
});
|
73
|
+
fillInTheGapsDragAndDropPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
74
|
+
});
|
75
|
+
});
|
76
|
+
});
|