itemengine-cypress-automation 1.0.47 → 1.0.50
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettings.js +1 -1139
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsBasic.js +202 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsCustomSpecialCharachters.js +120 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsMultilineResponse.js +189 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsResponseAccordions.js +431 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsStudentResponseAreaAndLayout.js +262 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAllOrNothingScoring.js +1 -763
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAllOrNothingWithAlternateAnswer.js +613 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAllOrNothingWithAlternateAnswerMatchFromAllResponsesTrue.js +172 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextConditionalCheckboxes.js +0 -154
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js +1 -76
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextMatchFromAllResponses.js +162 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialDifferentWeightsScoring.js +0 -999
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialDifferentWeightsWithAlternateAnswer.js +849 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialDifferentWeightsWithAlternateAnswerMatchFromAllResponsesTrue.js +171 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialEqualWeightsScoring.js +0 -885
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialEqualWeightsWithAlternateAnswer.js +738 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialEqualWeightsWithAlternateAnswerMatchFromAllResponsesTrue.js +168 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextSupportedFileTypes.js +86 -0
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +246 -0
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/allOrNothingCorrectPointsEqualToAlternatePoints.js +246 -0
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +246 -0
- package/cypress/e2e/ILC/ListOrdering/{listOrderingAllOrNothingScoring.js → ListOrderingScoringFiles/allOrNothingScoring.js} +3 -3
- package/cypress/e2e/ILC/ListOrdering/{listOrderingManuallyAndNonScoredScoring.js → ListOrderingScoringFiles/manuallyAndNonScoredScoring.js} +3 -3
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialDifferentWeightsAlternatePointsGreaterThanCorrectPoints.js +316 -0
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialDifferentWeightsCorrectPointsEqualToAlternatePoints.js +287 -0
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialDifferentWeightsCorrectPointsGreaterThanAlternatePoints.js +316 -0
- package/cypress/e2e/ILC/ListOrdering/{listOrderingPartialDifferentWeightsScoring.js → ListOrderingScoringFiles/partialDifferentWeightsScoring.js} +3 -3
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialEqualWeightsAlternatePointsGreaterThanCorrectPoints.js +286 -0
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialEqualWeightsCorrectPointsEqualToAlternatePoints.js +258 -0
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialEqualWeightsCorrectPointsGreaterThanAlternatePoints.js +287 -0
- package/cypress/e2e/ILC/ListOrdering/{listOrderingPartialEqualWeightsScoring.js → ListOrderingScoringFiles/partialEqualWeightsScoring.js} +3 -3
- package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +261 -0
- package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/allOrNothingCorrectPointsEqualToAlternatePoints.js +261 -0
- package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +261 -0
- package/cypress/e2e/ILC/ListSorting/{listSortingAllOrNothingScoring.js → ListSortingScoringFiles/allOrNothingScoring.js} +3 -3
- package/cypress/e2e/ILC/ListSorting/{listSortingManuallyAndNonScoredScoring.js → ListSortingScoringFiles/manuallyAndNonScoredScoring.js} +3 -3
- package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialDifferentWeightsAlternatePointsGreaterThanCorrectPoints.js +338 -0
- package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialDifferentWeightsCorrectPointsEqualToAlternatePoints.js +303 -0
- package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialDifferentWeightsCorrectPointsGreaterThanAlternatePoints.js +337 -0
- package/cypress/e2e/ILC/ListSorting/{listSortingPartialDifferentWeightsScoring.js → ListSortingScoringFiles/partialDifferentWeightsScoring.js} +3 -3
- package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialEqualWeightsAlternatePointsGreaterThanCorrectPoints.js +307 -0
- package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialEqualWeightsCorrectPointsEqualToAlternatePoints.js +272 -0
- package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialEqualWeightsCorrectPointsGreaterThanAlternatePoints.js +307 -0
- package/cypress/e2e/ILC/ListSorting/{listSortingPartialEqualWeightsScoring.js → ListSortingScoringFiles/partialEqualWeightsScoring.js} +3 -3
- package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
- package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
- package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
- package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
- package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
- package/package.json +1 -1
- package/cypress/e2e/ILC/ListOrdering/listOrderingAllOrNothingScoringWithAlternateAnswer.js +0 -712
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialDifferentWeightsScoringWithAlternateAnswer.js +0 -895
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialEqualWeightsScoringWithAlternateAnswer.js +0 -807
- package/cypress/e2e/ILC/ListSorting/listSortingAllOrNothingScoringWithAlternateAnswer.js +0 -759
- package/cypress/e2e/ILC/ListSorting/listSortingPartialDifferentWeightsScoringWithAlternateTab.js +0 -952
- package/cypress/e2e/ILC/ListSorting/listSortingPartialEqualWeightsScoringWithAlternateAnswer.js +0 -860
@@ -0,0 +1,431 @@
|
|
1
|
+
import { specialOrMathCharacters } from "../../../fixtures/specialAndMathCharacters";
|
2
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
|
7
|
+
let symbolsString = specialOrMathCharacters['specialCharacters'].characters.map((icon) => icon.symbol);
|
8
|
+
symbolsString = symbolsString.join('');
|
9
|
+
|
10
|
+
describe('Fill In the gaps over image - text - Additional settings', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
//Failing due to https://redmine.zeuslearning.com/issues/546987, https://redmine.zeuslearning.com/issues/546981
|
16
|
+
describe('Additional settings - \'Advanced settings for individual response area\' section contents', () => {
|
17
|
+
abortEarlySetup();
|
18
|
+
before(() => {
|
19
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
20
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
21
|
+
cy.barsPreLoaderWait();
|
22
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
23
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
24
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
25
|
+
});
|
26
|
+
|
27
|
+
it('When the user has not added any response container, response accordion should not be displayed', () => {
|
28
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseAccordionWrapper(), 'notExist');
|
29
|
+
});
|
30
|
+
|
31
|
+
it('When the user adds response container, \'Advanced settings for individual response area\' label along with response accordion should be displayed', () => {
|
32
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
33
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
34
|
+
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordionWrapper(), 2);
|
35
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.advanceSettingForIndividualResponsesLabel(), 'Advanced settings for individual response area');
|
36
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.advanceSettingForIndividualResponsesLabel(), 'visible');
|
37
|
+
});
|
38
|
+
|
39
|
+
it('The response accordion should have a label \'Response #\', by default the response accordion should be collapsed and by clicking on the response accordion, user should be able to expand the accordion', () => {
|
40
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionLabel(0);
|
41
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionLabel(1);
|
42
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionCollapsedState(0);
|
43
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionCollapsedState(1);
|
44
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
45
|
+
});
|
46
|
+
|
47
|
+
it('\'Placeholder text\' label and input field should be displayed and by default, the input field should be empty', () => {
|
48
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderTextLabelAndInputFieldResponseAccordion(0);
|
49
|
+
});
|
50
|
+
|
51
|
+
it('\'Type of answer input\' label and dropdown should be displayed and in \'Type of answer input\' dropdown \'Text\' option should be selected by default', () => {
|
52
|
+
fillInTheGapsOverImageTextPage.steps.verifyTypeOfAnswerLabelAndDropdownResponseAccordion(0);
|
53
|
+
});
|
54
|
+
|
55
|
+
it('\'Pointer\' label and dropdown should be displayed and in \'Type of answer input\' dropdown \'Left\' option should be selected by default', () => {
|
56
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointerLabelAndDropdownResponseAccordion(0);
|
57
|
+
});
|
58
|
+
|
59
|
+
it('\'Height (px)\' and \'Width (px)\' labels and input fields should be displayed and by default, the input fields should be empty', () => {
|
60
|
+
fillInTheGapsOverImageTextPage.steps.verifyHeightAndWidthLabelAndInputFieldResponseAccordion(0);
|
61
|
+
});
|
62
|
+
|
63
|
+
//Note: The CSS of labels and response fields are being verified in their respective describes, so not verifying them here again
|
64
|
+
|
65
|
+
it('Accessibility of \'Advanced settings for individual response area\' section contents', { tags: 'a11y' }, () => {
|
66
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.responseAccordionWrapper());
|
67
|
+
});
|
68
|
+
});
|
69
|
+
|
70
|
+
describe('Response accordions: Placeholder text - Set correct answer section', () => {
|
71
|
+
abortEarlySetup();
|
72
|
+
before(() => {
|
73
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
74
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
75
|
+
cy.barsPreLoaderWait();
|
76
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
77
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
78
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
79
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
80
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
81
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
82
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1);
|
83
|
+
});
|
84
|
+
|
85
|
+
it('When the user has not set placeholder text in the Response accordion then placeholder should not be displayed in \'Set correct answer\' section', () => {
|
86
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(0);
|
87
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(1);
|
88
|
+
});
|
89
|
+
|
90
|
+
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelNotVisibleOnResponseAccordion('Placeholder text');
|
91
|
+
|
92
|
+
it('When the user has set a placeholder text in either response accordion then a placeholder text should be displayed for the respective response in \'Set correct answer\' section', () => {
|
93
|
+
fillInTheGapsOverImageTextPage.steps.setPlaceholderTextInResponseAccordion(0, 'Enter response here');
|
94
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseField(0, 'Enter response here');
|
95
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(1);
|
96
|
+
});
|
97
|
+
|
98
|
+
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelVisibleOnResponseAccordion('Placeholder text');
|
99
|
+
|
100
|
+
it('CSS of Custom label', { tags: 'css' }, () => {
|
101
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseAccordionCustomLabel(), {
|
102
|
+
'color': css.color.activeButtons,
|
103
|
+
'font-size': css.fontSize.normal,
|
104
|
+
'font-weight': css.fontWeight.medium,
|
105
|
+
'border': `1px solid ${css.color.primaryBtnBorder}`
|
106
|
+
});
|
107
|
+
});
|
108
|
+
|
109
|
+
it('When the user removes the placeholder text from the individual responses, then the placeholder attribute of the response fields should get updated accordingly in \'Set correct answer\' section', () => {
|
110
|
+
fillInTheGapsOverImageTextPage.steps.clearPlaceholderTextInResponseAccordion(0);
|
111
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(0);
|
112
|
+
});
|
113
|
+
|
114
|
+
it('When the user has set placeholder text in the individual response areas, then it should override the placeholder text set in the \'Advanced settings for all response areas\' in the \'Set correct answer\' section', () => {
|
115
|
+
fillInTheGapsOverImageTextPage.steps.setResponseFieldPlaceholderTextGlobal('Global placeholder');
|
116
|
+
fillInTheGapsOverImageTextPage.steps.setPlaceholderTextInResponseAccordion(0, 'Enter response here');
|
117
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseField(0, 'Enter response here');
|
118
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseField(1, 'Global placeholder');
|
119
|
+
});
|
120
|
+
|
121
|
+
//Note: not possible to check css of placeholder since it is added as an attribute, properties of placeholder is not visible in dev tools
|
122
|
+
|
123
|
+
it('Accessibility of \'Placeholder text\' in \'Set correct answer\' section', { tags: 'a11y' }, () => {
|
124
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.responseFieldSetCorrectAnswerSection().parents('.response-input-field'));
|
125
|
+
});
|
126
|
+
|
127
|
+
it('When the user enters text in the response field, then the placeholder text should disappear and on clearing the input field the placeholder text should re-appear for the set correct answer section', () => {
|
128
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, 'Flower');
|
129
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(0);
|
130
|
+
fillInTheGapsOverImageTextPage.steps.clearResponseFieldSetCorrectAnswerSection(0);
|
131
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseField(0, 'Enter response here');
|
132
|
+
});
|
133
|
+
|
134
|
+
it('When the user clears the placeholder text input field, the placeholder text should get removed from the set correct answer section response fields', () => {
|
135
|
+
fillInTheGapsOverImageTextPage.steps.clearPlaceholderTextInResponseAccordion(0);
|
136
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInSetCorrectAnswerSectionResponseFieldNotExists(0);
|
137
|
+
});
|
138
|
+
});
|
139
|
+
|
140
|
+
describe('Response accordions: Placeholder text - Preview tab', () => {
|
141
|
+
abortEarlySetup();
|
142
|
+
before(() => {
|
143
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
144
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
145
|
+
cy.barsPreLoaderWait();
|
146
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
147
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
148
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
149
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
150
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
151
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0)
|
152
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1)
|
153
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
154
|
+
});
|
155
|
+
|
156
|
+
it('When the user has not set placeholder text in the Response accordion then placeholder should not be displayed in preview tab response fields', () => {
|
157
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(0);
|
158
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(1);
|
159
|
+
});
|
160
|
+
|
161
|
+
it('When the user has set a placeholder text in either individual response accordion a placeholder text should be displayed for the respective response in preview tab', () => {
|
162
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
163
|
+
fillInTheGapsOverImageTextPage.steps.setPlaceholderTextInResponseAccordion(0, 'Enter response here');
|
164
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
165
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseField(0, 'Enter response here');
|
166
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(1);
|
167
|
+
});
|
168
|
+
|
169
|
+
it('When the user removes the placeholder text from individual responses the Placeholders should get updated accordingly for both the responses in preview tab', () => {
|
170
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
171
|
+
fillInTheGapsOverImageTextPage.steps.clearPlaceholderTextInResponseAccordion(0);
|
172
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
173
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(0);
|
174
|
+
});
|
175
|
+
|
176
|
+
it('When the user has set placeholder text in the individual response area, then it should override the placeholder text set in the \'Advanced settings for all response areas\' in the preview tab response fields', () => {
|
177
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
178
|
+
fillInTheGapsOverImageTextPage.steps.setResponseFieldPlaceholderTextGlobal('Global placeholder');
|
179
|
+
fillInTheGapsOverImageTextPage.steps.setPlaceholderTextInResponseAccordion(0, 'Enter response here');
|
180
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
181
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseField(0, 'Enter response here');
|
182
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseField(1, 'Global placeholder');
|
183
|
+
});
|
184
|
+
|
185
|
+
//Note: not possible to check css of placeholder since it is added as an attribute, properties of placeholder is not visible in dev tools
|
186
|
+
|
187
|
+
it('Accessibility of \'Placeholder text\' in preview tab', { tags: 'a11y' }, () => {
|
188
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.responseFieldPreviewTab().parents('.response-input-field'))
|
189
|
+
});
|
190
|
+
|
191
|
+
it('When the user enters text in the response field, then the placeholder text should disappear and on clearing the input field the placeholder text should re-appear in the preview tab', () => {
|
192
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, 'Flower');
|
193
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(0);
|
194
|
+
fillInTheGapsOverImageTextPage.steps.clearResponseFieldPreviewTab(0);
|
195
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseField(0, 'Enter response here');
|
196
|
+
});
|
197
|
+
|
198
|
+
it('When the user clears the placeholder text input field, the placeholder text should get removed from the preview tab response fields', () => {
|
199
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
200
|
+
fillInTheGapsOverImageTextPage.steps.clearPlaceholderTextInResponseAccordion(0);
|
201
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
202
|
+
fillInTheGapsOverImageTextPage.steps.verifyPlaceholderAttributeInPreviewTabResponseFieldNotExists(0);
|
203
|
+
});
|
204
|
+
});
|
205
|
+
|
206
|
+
//Failing due to https://redmine.zeuslearning.com/issues/547573
|
207
|
+
describe('Response accordions: Type of answer input - Set correct answer section', () => {
|
208
|
+
abortEarlySetup();
|
209
|
+
before(() => {
|
210
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
211
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
212
|
+
cy.barsPreLoaderWait();
|
213
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
214
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
215
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
216
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
217
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
218
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
219
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1);
|
220
|
+
});
|
221
|
+
|
222
|
+
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelNotVisibleOnResponseAccordion('Type of answer input');
|
223
|
+
|
224
|
+
it('When the user has set \'Text\' option in the response accordion, then user should be able to enter alpha-numeric characters in the \'Set correct answer\' section', () => {
|
225
|
+
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdownInResponseAccordion(0);
|
226
|
+
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Text');
|
227
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, 'Response 1');
|
228
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(0, 'Response 1');
|
229
|
+
});
|
230
|
+
|
231
|
+
it('When the user has set \'Number\' option the response accordion, then user should be able to enter only numeric characters in the \'Set correct answer\' section', () => {
|
232
|
+
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdownInResponseAccordion(1);
|
233
|
+
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Number');
|
234
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, 'Response 1');
|
235
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(1, '1');
|
236
|
+
});
|
237
|
+
|
238
|
+
it('When the user has set \'Number\' option in the \'Advanced settings for all response areas\' then both the options in the Response accordions should change to \'Number\'', () => {
|
239
|
+
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdown();
|
240
|
+
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Number');
|
241
|
+
fillInTheGapsOverImageTextPage.steps.verifySelectedOptionInTypeOfAnswerDropdownInResponseAccordion(0, 'Number');
|
242
|
+
fillInTheGapsOverImageTextPage.steps.verifySelectedOptionInTypeOfAnswerDropdownInResponseAccordion(1, 'Number');
|
243
|
+
});
|
244
|
+
|
245
|
+
it('When the user has set \'Text\' option in the response accordion then it should override the \'Number\' option set in the \'Advanced settings for all response areas\' and user should be able to enter responses accordingly in the \'Set correct answer\' section', () => {
|
246
|
+
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdownInResponseAccordion(0);
|
247
|
+
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Text');
|
248
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, '1 Response');
|
249
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(0, '1 Response');
|
250
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, '1 Response');
|
251
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(1, '1');
|
252
|
+
});
|
253
|
+
|
254
|
+
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelVisibleOnResponseAccordion('Type of answer input');
|
255
|
+
});
|
256
|
+
|
257
|
+
describe('Response accordions: Type of answer input - Preview tab', () => {
|
258
|
+
abortEarlySetup();
|
259
|
+
before(() => {
|
260
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
261
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
262
|
+
cy.barsPreLoaderWait();
|
263
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
264
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
265
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
266
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
267
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
268
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
269
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1);
|
270
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
271
|
+
});
|
272
|
+
|
273
|
+
it('When the user has set \'Text\' option in the response accordion, then user should be able to enter alpha-numeric characters in preview tab response fields', () => {
|
274
|
+
fillInTheGapsOverImageTextPage.steps.verifySelectedOptionInTypeOfAnswerDropdownInResponseAccordion(0, 'Text');
|
275
|
+
fillInTheGapsOverImageTextPage.steps.verifySelectedOptionInTypeOfAnswerDropdownInResponseAccordion(1, 'Text');
|
276
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
277
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, '1 Flower');
|
278
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, '1 Flower');
|
279
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, '2 Leaves');
|
280
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(1, '2 Leaves');
|
281
|
+
});
|
282
|
+
|
283
|
+
it('When the user has set \'Number\' option in the response accordion, then the user should be able to enter only numeric characters in preview tab response fields', () => {
|
284
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
285
|
+
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdownInResponseAccordion(1);
|
286
|
+
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Number');
|
287
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
288
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, '1 Flower');
|
289
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, '1 Flower');
|
290
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, '2 Leaves');
|
291
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(1, '2');
|
292
|
+
});
|
293
|
+
|
294
|
+
it('When the user has set \'Text\' option in the response accordion, then it should override the \'Number\' option set in \'Advanced settings for all response areas\' and user should be able to enter responses accordingly in the preview tab section', () => {
|
295
|
+
cy.log('Pre step: Setting \'Number\' option in \'Advanced settings for all response areas\'')
|
296
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
297
|
+
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdown();
|
298
|
+
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Number');
|
299
|
+
fillInTheGapsOverImageTextPage.steps.clickOnTypeOfAnswerDropdownInResponseAccordion(0);
|
300
|
+
fillInTheGapsOverImageTextPage.steps.selectTypeOfAnswerDropdownOption('Text');
|
301
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
302
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, '1 Flower');
|
303
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, '1 Flower');
|
304
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, '2 Leaves');
|
305
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(1, '2');
|
306
|
+
});
|
307
|
+
});
|
308
|
+
|
309
|
+
describe('Response accordions: Height and Width - Set correct answer section', () => {
|
310
|
+
abortEarlySetup();
|
311
|
+
before(() => {
|
312
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
313
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
314
|
+
cy.barsPreLoaderWait();
|
315
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
316
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
317
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
318
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
319
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
320
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
321
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1);
|
322
|
+
});
|
323
|
+
|
324
|
+
it('When the user has not set \'Height\' and \'Width\' for response fields then the default dimension of the response field in the \'Set correct answer\' section response fields should be (197x46)px', () => {
|
325
|
+
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldSetCorrectAnswerSection(0, '46px');
|
326
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(0, '13.7em');
|
327
|
+
});
|
328
|
+
|
329
|
+
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelNotVisibleOnResponseAccordion('Height and Width');
|
330
|
+
|
331
|
+
it('When the user has set \'Height\' for the response field then the height of the response field should get updated accordingly in the \'Set correct answer\' section', () => {
|
332
|
+
fillInTheGapsOverImageTextPage.steps.setHeightInResponseAccordion(0, 100);
|
333
|
+
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldSetCorrectAnswerSection(0, '100px');
|
334
|
+
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldSetCorrectAnswerSection(1, '46px');
|
335
|
+
});
|
336
|
+
|
337
|
+
fillInTheGapsOverImageTextPage.tests.verifyCustomLabelVisibleOnResponseAccordion('Height and Width');
|
338
|
+
|
339
|
+
it('When the user has set \'Width\' for the response field then the Width of the response field should get updated accordingly in the \'Set correct answer\' section', () => {
|
340
|
+
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 100);
|
341
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(0, '100px');
|
342
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(1, '13.7em');
|
343
|
+
});
|
344
|
+
|
345
|
+
it('When the user has set width below 80px then the width should remain 80px in the \'Set correct answer\' section', () => {
|
346
|
+
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 20);
|
347
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(0, '80px');
|
348
|
+
});
|
349
|
+
|
350
|
+
it('When the user has set width above 400px then the width should remain 400px in the \'Set correct answer\' section', () => {
|
351
|
+
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 800);
|
352
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(0, '400px');
|
353
|
+
});
|
354
|
+
|
355
|
+
it('When the user has set \'Height\' and \'Width\' in the individual responses accordion then it should override the \'Height\' and \'Width\'set in the \'Advanced settings for all response areas\' in the \'Set correct answer\' section', () => {
|
356
|
+
fillInTheGapsOverImageTextPage.steps.setResponseFieldWidthGlobal(250);
|
357
|
+
fillInTheGapsOverImageTextPage.steps.setResponseFieldHeightGlobal(180);
|
358
|
+
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 175);
|
359
|
+
fillInTheGapsOverImageTextPage.steps.setHeightInResponseAccordion(0, 120);
|
360
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(0, '175px');
|
361
|
+
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldSetCorrectAnswerSection(0, '120px');
|
362
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldSetCorrectAnswerSection(1, '250px');
|
363
|
+
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldSetCorrectAnswerSection(1, '180px');
|
364
|
+
});
|
365
|
+
});
|
366
|
+
|
367
|
+
describe('Response accordions: Height and Width - Preview tab', () => {
|
368
|
+
abortEarlySetup();
|
369
|
+
before(() => {
|
370
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
371
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
372
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
373
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
374
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
375
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
376
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
377
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(0);
|
378
|
+
fillInTheGapsOverImageTextPage.steps.expandResponseAccordion(1);
|
379
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
380
|
+
});
|
381
|
+
|
382
|
+
it('When the user has not set \'Height\' and \'Width\' for the response accordion then the default dimension of the response field in the preview tab response field should be (197x46)px', () => {
|
383
|
+
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldPreviewTab(0, '46px')
|
384
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(0, '13.7em');
|
385
|
+
});
|
386
|
+
|
387
|
+
it('When the user has set \'Height\' for the response field then the height of the preview tab response field should get updated accordingly', () => {
|
388
|
+
cy.log('Pre step: Switch to Edit tab')
|
389
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
390
|
+
fillInTheGapsOverImageTextPage.steps.setHeightInResponseAccordion(0, 100);
|
391
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
392
|
+
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldPreviewTab(0, '100px');
|
393
|
+
});
|
394
|
+
|
395
|
+
it('When the user has set \'Width\' for the response field then the width of the preview tab response field should get updated accordingly', () => {
|
396
|
+
cy.log('Pre step: Switch to Edit tab')
|
397
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
398
|
+
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 100);
|
399
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
400
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(0, '100px');
|
401
|
+
});
|
402
|
+
|
403
|
+
it('When the user has set width below 80px then the width of the preview tab response field should remain 80px', () => {
|
404
|
+
cy.log('Pre step: Switch to Edit tab')
|
405
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
406
|
+
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 20);
|
407
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
408
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(0, '80px');
|
409
|
+
});
|
410
|
+
|
411
|
+
it('When the user has set width above 400px then the width of the preview tab response field should remain 400px', () => {
|
412
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
413
|
+
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 800);
|
414
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
415
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(0, '400px');
|
416
|
+
});
|
417
|
+
|
418
|
+
it('When the user has set \'Height\' and \'Width\' in the individual responses accordion then it should override the \'Height\' and \'Width\'set in the \'Advanced settings for all response areas\' for the preview tab response fields', () => {
|
419
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
420
|
+
fillInTheGapsOverImageTextPage.steps.setResponseFieldWidthGlobal(250);
|
421
|
+
fillInTheGapsOverImageTextPage.steps.setResponseFieldHeightGlobal(180);
|
422
|
+
fillInTheGapsOverImageTextPage.steps.setWidthInResponseAccordion(0, 175);
|
423
|
+
fillInTheGapsOverImageTextPage.steps.setHeightInResponseAccordion(0, 120);
|
424
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
425
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(0, '175px');
|
426
|
+
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldPreviewTab(0, '120px');
|
427
|
+
fillInTheGapsOverImageTextPage.steps.verifyWidthResponseFieldPreviewTab(1, '250px');
|
428
|
+
fillInTheGapsOverImageTextPage.steps.verifyHeightResponseFieldPreviewTab(1, '180px');
|
429
|
+
});
|
430
|
+
});
|
431
|
+
});
|