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,202 @@
|
|
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
|
+
const correctTabAnswerArray = ['Flower', 'Leaf'];
|
7
|
+
const incorrectAnswerArray = ['Root', 'Branch'];
|
8
|
+
const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
|
9
|
+
const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
|
10
|
+
let symbolsString = specialOrMathCharacters['specialCharacters'].characters.map((icon) => icon.symbol);
|
11
|
+
symbolsString = symbolsString.join('');
|
12
|
+
|
13
|
+
describe('Fill In the gaps over image - text - Additional settings', () => {
|
14
|
+
before(() => {
|
15
|
+
cy.loginAs('admin');
|
16
|
+
});
|
17
|
+
|
18
|
+
describe('Additional settings accordion', () => {
|
19
|
+
abortEarlySetup();
|
20
|
+
before(() => {
|
21
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
22
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
23
|
+
});
|
24
|
+
|
25
|
+
fillInTheGapsOverImageTextPage.tests.verifyAdditonalSettingsAccordionProperties();
|
26
|
+
});
|
27
|
+
|
28
|
+
describe('Additional settings: Font size - Contents and functionality in set correct answer section', () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
32
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
33
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
34
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
35
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
36
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
37
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
38
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
39
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
40
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
41
|
+
});
|
42
|
+
|
43
|
+
fillInTheGapsOverImageTextPage.tests.verifyFontSizeSectionContents();
|
44
|
+
|
45
|
+
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
46
|
+
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the set correct answer section should change to ${option}`, () => {
|
47
|
+
fillInTheGapsOverImageTextPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
|
48
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.fontSizeDropdown(), `${option}`);
|
49
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseFieldSetCorrectAnswerSection(), {
|
50
|
+
'font-size': font[count]
|
51
|
+
});
|
52
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.highlightNumeration(), {
|
53
|
+
'font-size': font[count]
|
54
|
+
});
|
55
|
+
});
|
56
|
+
});
|
57
|
+
});
|
58
|
+
|
59
|
+
describe('Additional settings: Font size - functionality in preview tab', () => {
|
60
|
+
abortEarlySetup();
|
61
|
+
before(() => {
|
62
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
63
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
64
|
+
cy.barsPreLoaderWait();
|
65
|
+
fillInTheGapsOverImageTextPage.steps.addQuestionInstructions();
|
66
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
67
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
68
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
69
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
70
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
71
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
72
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
73
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
74
|
+
});
|
75
|
+
|
76
|
+
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
77
|
+
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${option} accordingly`, () => {
|
78
|
+
fillInTheGapsOverImageTextPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
|
79
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.fontSizeDropdown(), `${option}`);
|
80
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
81
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.questionInstructionsText(), {
|
82
|
+
'font-size': fontSizes[fontsIndex]
|
83
|
+
});
|
84
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseFieldPreviewTab(), {
|
85
|
+
'font-size': fontSizes[fontsIndex]
|
86
|
+
});
|
87
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
88
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.previewTabCorrectAnswerLabel(), {
|
89
|
+
'font-size': fontSizes[fontsIndex]
|
90
|
+
});
|
91
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.responseNumeration(), {
|
92
|
+
'font-size': fontSizes[fontsIndex]
|
93
|
+
});
|
94
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.previewTabCorrectAnswerResponseWrapper(), {
|
95
|
+
'font-size': fontSizes[fontsIndex]
|
96
|
+
});
|
97
|
+
fillInTheGapsOverImageTextPage.steps.uncheckShowCorrectAnswerCheckbox();
|
98
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
99
|
+
});
|
100
|
+
});
|
101
|
+
});
|
102
|
+
|
103
|
+
describe('Additional settings: Check answer', () => {
|
104
|
+
abortEarlySetup();
|
105
|
+
before(() => {
|
106
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
107
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
108
|
+
cy.barsPreLoaderWait();
|
109
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
110
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
111
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
112
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
113
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
114
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
115
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
116
|
+
});
|
117
|
+
|
118
|
+
fillInTheGapsOverImageTextPage.tests.verifyCheckAnswerSectionAndPreviewTabCheckAnswerButton();
|
119
|
+
});
|
120
|
+
|
121
|
+
describe('Additional settings: Check answer - Functionality', () => {
|
122
|
+
abortEarlySetup();
|
123
|
+
before(() => {
|
124
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
125
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
126
|
+
cy.barsPreLoaderWait();
|
127
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
128
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
129
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
130
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
131
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
132
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
133
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
134
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
135
|
+
fillInTheGapsOverImageTextPage.steps.setMaximumCheckAnswerAttempts(2);
|
136
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
137
|
+
});
|
138
|
+
|
139
|
+
fillInTheGapsOverImageTextPage.tests.verifyCheckAnswerButtonFunctionalityWhenQuestionIsUnattempted();
|
140
|
+
|
141
|
+
it('When the user attempts the question partially correct, then on clicking on the \'Check answer\' button, green check-mark icon should be displayed besides the correct response, red cross-mark should be displayed besides incorrect response and \'Incorrect answer\' label should be displayed below the question preview', () => {
|
142
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
143
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[0]);
|
144
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
145
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
146
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
147
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
148
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
149
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
150
|
+
});
|
151
|
+
|
152
|
+
it('When the user attempts the question correctly, then on clicking on the \'Check answer\' button, green check-mark icon should be displayed besides the correct response and \'Correct answer\' label should be displayed below the question preview', () => {
|
153
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
154
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, correctTabAnswerArray[0]);
|
155
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
156
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
157
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
158
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
|
159
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
160
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
161
|
+
});
|
162
|
+
|
163
|
+
fillInTheGapsOverImageTextPage.tests.verifyDisabledCheckAnswerButtonWithCSSAnda11y();
|
164
|
+
|
165
|
+
it('When the user updates the value of Maximum check answer attempts input field, it should get reflected on the Preview tab', () => {
|
166
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
167
|
+
fillInTheGapsOverImageTextPage.steps.clearMaximumCheckAnswerAttemptsInputField();
|
168
|
+
fillInTheGapsOverImageTextPage.steps.addInputToMaximumCheckAnswerAttemptsInputField(1);
|
169
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
170
|
+
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
171
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
172
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, correctTabAnswerArray[0]);
|
173
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
174
|
+
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonDisabled();
|
175
|
+
});
|
176
|
+
|
177
|
+
it('When the \'Maximum check answer attempts\' input field is empty and user switches to Preview tab, then the \'Check Answer\' button should be enabled and user should be able to check answer multiple times', () => {
|
178
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
179
|
+
fillInTheGapsOverImageTextPage.steps.clearMaximumCheckAnswerAttemptsInputField()
|
180
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
181
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
182
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, correctTabAnswerArray[0]);
|
183
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
184
|
+
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
185
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, incorrectAnswerArray[0]);
|
186
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[0]);
|
187
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
188
|
+
fillInTheGapsOverImageTextPage.steps.verifyCheckAnswerButtonEnabled();
|
189
|
+
});
|
190
|
+
});
|
191
|
+
|
192
|
+
describe('Additional settings: Details section', () => {
|
193
|
+
abortEarlySetup();
|
194
|
+
before(() => {
|
195
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
196
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
197
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
198
|
+
});
|
199
|
+
|
200
|
+
fillInTheGapsOverImageTextPage.tests.verifyDetailsSection();
|
201
|
+
});
|
202
|
+
});
|
@@ -0,0 +1,120 @@
|
|
1
|
+
import { specialOrMathCharacters } from "../../../fixtures/specialAndMathCharacters";
|
2
|
+
import { dialogBoxBase, fillInTheGapsOverImageTextPage } from "../../../pages";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
let customSpecialCharacters = [':', ')', '`']
|
6
|
+
let symbolsString = specialOrMathCharacters['specialCharacters'].characters.map((icon) => icon.symbol);
|
7
|
+
symbolsString = symbolsString.join('');
|
8
|
+
|
9
|
+
describe('Fill In the gaps over image - text - Additional settings', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Additional settings: Custom special characters section - Contents and set correct answer section', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
18
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
19
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
20
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
21
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
22
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
23
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
24
|
+
});
|
25
|
+
|
26
|
+
fillInTheGapsOverImageTextPage.tests.verifyAdditionalSettingsCustomSpecialCharactersSection();
|
27
|
+
|
28
|
+
it('When the user has enabled the \'Display special characters\' functionality, then the \'Special characters\' button should be displayed when user focuses in any response field in \'Set correct answer\' section ', () => {
|
29
|
+
fillInTheGapsOverImageTextPage.steps.verifySpecialCharacterButtonNotVisibleInResponseFieldSetCorrectAnswerSection(0);
|
30
|
+
fillInTheGapsOverImageTextPage.steps.focusAndVerifySpecialCharactersButtonInResponseFieldSetCorrectAnswerSection(0);
|
31
|
+
});
|
32
|
+
|
33
|
+
it('When the user has added no input to the \'Custom special characters\' input field then the default Special characters flyout should be displayed on clicking the \'Special characters\' button in the response field', () => {
|
34
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSpecialCharactersButtonSetCorrectAnswerSection(0);
|
35
|
+
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutHeaderContents();
|
36
|
+
});
|
37
|
+
|
38
|
+
fillInTheGapsOverImageTextPage.tests.verifySpecialCharactersFlyoutSymbols();
|
39
|
+
|
40
|
+
it(`When the user clicks on a symbol in the ${specialOrMathCharacters['specialCharacters'].popupTitle} popup, then that symbol should be inserted in the response field`, () => {
|
41
|
+
cy.log('Clicking on all symbols.');
|
42
|
+
fillInTheGapsOverImageTextPage.steps.clickingOnSpecialCharactersSymbolsFromFlyout();
|
43
|
+
dialogBoxBase.steps.closeWarningPopup();
|
44
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(0, symbolsString)
|
45
|
+
});
|
46
|
+
|
47
|
+
it('When the \'Display special characters\' checkbox is checked then user should be able to enter value in the \'Custom special characters\' input field', () => {
|
48
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInCustomSpecialCharactersInputField(':)`');
|
49
|
+
});
|
50
|
+
|
51
|
+
it('When the user clicks on the \'Special characters\' button in the response field, then a flyout with the title \'Special characters\' and close button should be displayed, the flyout should contain all the added Special characters entered in the \'Custom special characters\' input field', () => {
|
52
|
+
fillInTheGapsOverImageTextPage.steps.focusAndVerifySpecialCharactersButtonInResponseFieldSetCorrectAnswerSection(1);
|
53
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSpecialCharactersButtonSetCorrectAnswerSection(1);
|
54
|
+
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutHeaderContents();
|
55
|
+
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutIcons(customSpecialCharacters);
|
56
|
+
});
|
57
|
+
|
58
|
+
it('When the user clicks on the characters then they should be added to the set correct answer response field', () => {
|
59
|
+
fillInTheGapsOverImageTextPage.steps.clickingOnSpecialCharactersSymbolsFromFlyout();
|
60
|
+
dialogBoxBase.steps.closeWarningPopup();
|
61
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(1, ':)`');
|
62
|
+
});
|
63
|
+
});
|
64
|
+
|
65
|
+
describe('Additional settings: Custom special characters section - Preview tab', () => {
|
66
|
+
abortEarlySetup();
|
67
|
+
before(() => {
|
68
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
69
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
70
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
71
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
72
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
73
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
74
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
75
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
76
|
+
});
|
77
|
+
|
78
|
+
it('When the \'Custom special characters\' functionality is disabled then the \'Special characters\' button should not be displayed in the preview tab response field', () => {
|
79
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.previewTabResponseFieldSpecialCharactersButton(), 'notExist');
|
80
|
+
});
|
81
|
+
|
82
|
+
it('When the user has enabled the \'Custom special characters\' functionality then the \'Special characters\' button should be displayed when user focuses in any response field in the preview tab', () => {
|
83
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
84
|
+
fillInTheGapsOverImageTextPage.steps.checkDisplaySpecialCharactersCheckbox();
|
85
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
86
|
+
fillInTheGapsOverImageTextPage.steps.verifySpecialCharacterButtonNotVisibleInResponseFieldPreviewTab(0);
|
87
|
+
fillInTheGapsOverImageTextPage.steps.focusAndVerifySpecialCharactersButtonInResponseFieldPreviewTab(0);
|
88
|
+
});
|
89
|
+
|
90
|
+
it('When the user has added no input to the \'Custom special characters\' input field then the default Special characters flyout should be displayed on clicking the \'Special characters\' button in the response field', () => {
|
91
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSpecialCharactersButtonPreviewTab(0);
|
92
|
+
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutHeaderContents();
|
93
|
+
});
|
94
|
+
|
95
|
+
fillInTheGapsOverImageTextPage.tests.verifySpecialCharactersFlyoutSymbols()
|
96
|
+
|
97
|
+
it(`When the user clicks on a symbol in the ${specialOrMathCharacters['specialCharacters'].popupTitle} popup, then that symbol should be inserted in the response field`, () => {
|
98
|
+
fillInTheGapsOverImageTextPage.steps.clickingOnSpecialCharactersSymbolsFromFlyout();
|
99
|
+
dialogBoxBase.steps.closeWarningPopup();
|
100
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, symbolsString);
|
101
|
+
});
|
102
|
+
|
103
|
+
it('When the user specifies custom special characters and clicks on the \'Special characters\' button in the preview tab response field, then a flyout with the title \'Special characters\' and close button should be displayed, the flyout should contain all the added Special characters entered in the \'Custom special characters\' input field', () => {
|
104
|
+
cy.log('Adding custom special characters')
|
105
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
106
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInCustomSpecialCharactersInputField(':)`');
|
107
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
108
|
+
fillInTheGapsOverImageTextPage.steps.focusAndVerifySpecialCharactersButtonInResponseFieldPreviewTab(1);
|
109
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSpecialCharactersButtonPreviewTab(1);
|
110
|
+
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutHeaderContents();
|
111
|
+
fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersFlyoutIcons(customSpecialCharacters);
|
112
|
+
});
|
113
|
+
|
114
|
+
it('When the user clicks on the characters then they should be added to the preview tab input field', () => {
|
115
|
+
fillInTheGapsOverImageTextPage.steps.clickingOnSpecialCharactersSymbolsFromFlyout();
|
116
|
+
dialogBoxBase.steps.closeWarningPopup();
|
117
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(1, ':)`');
|
118
|
+
});
|
119
|
+
});
|
120
|
+
});
|
@@ -0,0 +1,189 @@
|
|
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
|
+
let symbolsString = specialOrMathCharacters['specialCharacters'].characters.map((icon) => icon.symbol);
|
7
|
+
symbolsString = symbolsString.join('');
|
8
|
+
|
9
|
+
describe('Fill In the gaps over image - text - Additional settings', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Additional settings: Multiline response - Contents and set correct answer section', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
18
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
19
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
20
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
21
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
22
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
23
|
+
});
|
24
|
+
|
25
|
+
it('\'Multiline response\' functionality label and checkbox should be displayed and by default it should be unchecked', () => {
|
26
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.multilineResponseLabel(), 'Multiline response');
|
27
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.multilineResponseLabel(), 'visible');
|
28
|
+
fillInTheGapsOverImageTextPage.steps.verifyMultilineResponseCheckboxNotChecked();
|
29
|
+
});
|
30
|
+
|
31
|
+
it('CSS of \'Multiline response\' section - unchecked state', { tags: 'css' }, () => {
|
32
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.multilineResponseLabel(), {
|
33
|
+
'color': css.color.labelText,
|
34
|
+
'font-size': css.fontSize.normal,
|
35
|
+
'font-weight': css.fontWeight.regular
|
36
|
+
});
|
37
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.multilineResponseCheckbox().parent().find('svg'), {
|
38
|
+
'fill': css.color.uncheckedCheckbox
|
39
|
+
});
|
40
|
+
});
|
41
|
+
|
42
|
+
//Note: a11y covered in Additional settings accordion, verifyAdditonalSettingsAccordionProperties
|
43
|
+
|
44
|
+
it('When the \'Multiline response\' functionality is disabled, the response fields should not have \'textarea\' field in \'Set correct answer\' section', () => {
|
45
|
+
fillInTheGapsOverImageTextPage.steps.verifyMultilineResponseForResponseFieldSetCorrectAnswerSectionDisabled();
|
46
|
+
});
|
47
|
+
|
48
|
+
it('When \'Multiline response\' functionality is disabled then the user should not be able to enter a multiline response in the \'Set correct answer\' section', () => {
|
49
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, 'l{enter}o{enter}r{enter}e{enter}m');
|
50
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(0, 'lorem');
|
51
|
+
});
|
52
|
+
|
53
|
+
it('When the \'Multiline response\' functionality is enabled, the response field should have \'textarea\' field in \'Set correct answer\' section', () => {
|
54
|
+
fillInTheGapsOverImageTextPage.steps.checkMultilineResponseCheckbox();
|
55
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseFieldSetCorrectAnswerSection(), 'notExist');
|
56
|
+
});
|
57
|
+
|
58
|
+
it('When the \'Multiline response\' functionality is enabled then the user should be able to add Multiline responses in the \'Set correct answer\' section', () => {
|
59
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'l{enter}o{enter}r{enter}e{enter}m');
|
60
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'l\no\nr\ne\nm');
|
61
|
+
});
|
62
|
+
|
63
|
+
it('CSS of \'Multiline response\' section - checked state', { tags: 'css' }, () => {
|
64
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.multilineResponseCheckbox().parent().find('svg g g'), {
|
65
|
+
'fill': css.color.activeButtons
|
66
|
+
});
|
67
|
+
});
|
68
|
+
|
69
|
+
it('Accessibility of \'Multiline response\' section - checked state', { tags: 'a11y' }, () => {
|
70
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.multilineResponseCheckbox().parents('.additional-settings-container'));
|
71
|
+
});
|
72
|
+
|
73
|
+
it('When the \'Multiline response\' functionality is enabled then the user should be able to enter multiline characters including the line breaks up to the set character limit', () => {
|
74
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'l{enter}o{enter}r{enter}e{enter}m{enter}e{enter}s{enter}u{enter}m{enter}l{enter}nam');
|
75
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'l\no\nr\ne\nm\ne\ns\nu\nm\nl\n');
|
76
|
+
});
|
77
|
+
|
78
|
+
//Failing due to https://redmine.zeuslearning.com/issues/547598
|
79
|
+
it('When the user disables the Multiline response functionality, the added input in the response field should appear in a single line in \'Set correct answer\' section', () => {
|
80
|
+
fillInTheGapsOverImageTextPage.steps.uncheckMultilineResponseCheckbox();
|
81
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldSetCorrectAnswerSection(0, 'loremesuml');
|
82
|
+
});
|
83
|
+
});
|
84
|
+
|
85
|
+
describe('Additional settings: Multiline response - Preview tab', () => {
|
86
|
+
abortEarlySetup();
|
87
|
+
before(() => {
|
88
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
89
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
90
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
91
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
92
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
93
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
94
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
95
|
+
});
|
96
|
+
|
97
|
+
it('When the \'Multiline response\' functionality is disabled, the response field should not have \'textarea\' field in preview tab', () => {
|
98
|
+
fillInTheGapsOverImageTextPage.steps.verifyMultilineResponseForResponseFieldPreviewTabDisabled();
|
99
|
+
});
|
100
|
+
|
101
|
+
it('When \'Multiline response\' functionality is disabled, the user should not be able to add multiline response in the preview tab response field', () => {
|
102
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, 'l{enter}o{enter}r{enter}e{enter}m');
|
103
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseFieldPreviewTab(0, 'lorem');
|
104
|
+
});
|
105
|
+
|
106
|
+
it('When the \'Multiline response\' functionality is enabled, the response field should have \'textarea\' field in the preview tab', () => {
|
107
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
108
|
+
fillInTheGapsOverImageTextPage.steps.checkMultilineResponseCheckbox();
|
109
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
110
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseFieldPreviewTab(), 'notExist');
|
111
|
+
});
|
112
|
+
|
113
|
+
it('When the \'Multiline response\' functionality is enabled then the user should be able to add Multiline responses in the preview tab', () => {
|
114
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(0, 'l{enter}o{enter}r{enter}e{enter}m');
|
115
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaPreviewTab(0, 'l\no\nr\ne\nm');
|
116
|
+
});
|
117
|
+
|
118
|
+
it('When the \'Multiline response\' functionality is enabled then the user should be able to enter multiline characters including the line breaks up to the set character limit in the preview tab', () => {
|
119
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(0, 'l{enter}o{enter}r{enter}e{enter}m{enter}e{enter}s{enter}u{enter}m{enter}l{enter}nam');
|
120
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaPreviewTab(0, 'l\no\nr\ne\nm\ne\ns\nu\nm\nl\n');
|
121
|
+
});
|
122
|
+
});
|
123
|
+
|
124
|
+
//Failing due to https://redmine.zeuslearning.com/issues/547600
|
125
|
+
describe('Additional settings: Scoring for multiline response', () => {
|
126
|
+
abortEarlySetup();
|
127
|
+
before(() => {
|
128
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
129
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
130
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
131
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
132
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
133
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
134
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
135
|
+
fillInTheGapsOverImageTextPage.steps.checkMultilineResponseCheckbox();
|
136
|
+
});
|
137
|
+
|
138
|
+
it('When the user has enabled the Multiline functionality then user should be able to set multiline correct answers and points in the \'Set correct answer\' section', () => {
|
139
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'R{enter}e{enter}s{enter}p{enter}o{enter}n{enter}s{enter}e{enter}1');
|
140
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaSetCorrectAnswerSection(0, 'R\ne\ns\np\no\nn\ns\ne\n1');
|
141
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaSetCorrectAnswerSection(1, 'Response 2')
|
142
|
+
fillInTheGapsOverImageTextPage.steps.verifyTextInMultilineResponseAreaSetCorrectAnswerSection(1, 'Response 2');
|
143
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
144
|
+
});
|
145
|
+
|
146
|
+
it('When the user enters the correct multiline and single line response in the preview tab then full points should be awarded and on selecting show correct answer checkbox, correct icons should be displayed beside response areas, \'Correct answer\' label and correct answer border should be displayed below the question preview and no correct answer container should be displayed', () => {
|
147
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
148
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(0, 'R{enter}e{enter}s{enter}p{enter}o{enter}n{enter}s{enter}e{enter}1');
|
149
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(1, 'Response 2')
|
150
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
151
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(10, 10);
|
152
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
153
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
154
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
155
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
156
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
157
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
|
158
|
+
fillInTheGapsOverImageTextPage.steps.uncheckShowCorrectAnswerCheckbox();
|
159
|
+
});
|
160
|
+
|
161
|
+
it('When the user enters a single line response instead of a multiline response then 0 points should be awarded and on selecting show correct answer checkbox, incorrect icons should be displayed beside response areas, \'Incorrect answer\' label and incorrect answer border should be displayed below the question preview and correct answer container along with correct answers for responses marked incorrect should be displayed', () => {
|
162
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
163
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(0, 'Response 1');
|
164
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(1, 'Response 2');
|
165
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(0, 10);
|
166
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
167
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
168
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
169
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
170
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
171
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount(['R\ne\ns\np\no\nn\ns\ne\n1'], ['1']);
|
172
|
+
fillInTheGapsOverImageTextPage.steps.uncheckShowCorrectAnswerCheckbox();
|
173
|
+
});
|
174
|
+
|
175
|
+
it('When the user enters a multiline response instead of a single line response then 0 points should be awarded and on selecting show correct answer checkbox, incorrect icons should be displayed beside response areas, \'Incorrect answer\' label and incorrect answer border should be displayed below the question preview and correct answer container along with correct answers for responses marked incorrect should be displayed', () => {
|
176
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
177
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(0, 'R{enter}e{enter}s{enter}p{enter}o{enter}n{enter}s{enter}e{enter}1');
|
178
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInMultilineResponseAreaPreviewTab(1, 'R{enter}e{enter}s{enter}p{enter}o{enter}n{enter}s{enter}e{enter}2');
|
179
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(0, 10);
|
180
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
181
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
182
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
183
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
184
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
185
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount(['Response 2'], ['2']);
|
186
|
+
fillInTheGapsOverImageTextPage.steps.uncheckShowCorrectAnswerCheckbox();
|
187
|
+
});
|
188
|
+
});
|
189
|
+
});
|