itemengine-cypress-automation 1.0.115 → 1.0.116
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/{barRecorderStyle.js → barRecorderStyle.smoke.js} +181 -179
- package/cypress/e2e/ILC/AudioResponseNew/{compactRecorderStyle.js → compactRecorderStyle.smoke.js} +178 -177
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +2 -1
- package/cypress/e2e/ILC/AudioResponseNew/{standardRecorderStyle.js → standardRecorderStyle.smoke.js} +197 -195
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +3 -3
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +5 -5
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +17 -17
- package/cypress/e2e/ILC/DrawingResponse/{drawingResponsePreviewTabContents.js → drawingResponsePreviewTabContents.smoke.js} +3 -3
- package/cypress/e2e/ILC/EssayResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +1 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsBasic.js +0 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +0 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabScoringSection.js +276 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +73 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingPenaltyScoring.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/conditionalCheckboxScoring.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +2 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +1 -1
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/pages/audioResponsePage.js +13 -6
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +0 -27
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +2 -2
- package/cypress/pages/components/commonComponents.js +1 -1
- package/cypress/pages/components/figOverImageCanvasComponent.js +1 -1
- package/cypress/pages/components/playbackControlsBaseComponent.js +3 -1
- package/cypress/pages/components/scoringSectionBaseEditTab.js +0 -9
- package/cypress/pages/drawingResponsePage.js +2 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +14 -16
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +112 -3
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -1
- package/cypress/pages/readingRulerPage.js +1 -1
- package/cypress/pages/shortTextResponsePage.js +8 -8
- package/package.json +2 -2
@@ -34,6 +34,7 @@ describe('Create item page - Essay response: Grading view, Correct answer view c
|
|
34
34
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Italic (Ctrl+I)');
|
35
35
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Underline (Ctrl+U)');
|
36
36
|
essayResponsePage.steps.enterInputInResponseField('This is a test for grading view preview contents');
|
37
|
+
essayResponsePage.steps.focusOutOfResponseField();
|
37
38
|
studentViewPage.steps.submitResponse();
|
38
39
|
studentViewPage.steps.clickOnGoToGradingViewButton();
|
39
40
|
});
|
@@ -16,7 +16,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
16
16
|
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
|
17
17
|
abortEarlySetup();
|
18
18
|
before(() => {
|
19
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
20
19
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
21
20
|
cy.barsPreLoaderWait();
|
22
21
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -16,7 +16,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
16
16
|
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
|
17
17
|
abortEarlySetup();
|
18
18
|
before(() => {
|
19
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
20
19
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
21
20
|
cy.barsPreLoaderWait();
|
22
21
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -19,7 +19,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: All or n
|
|
19
19
|
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are more than \'Alternate answer\' points', () => {
|
20
20
|
abortEarlySetup();
|
21
21
|
before(() => {
|
22
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
23
22
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
24
23
|
cy.barsPreLoaderWait();
|
25
24
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js
CHANGED
@@ -15,7 +15,6 @@ describe('Create item page -Fill in the gaps over image with dropdown: All or no
|
|
15
15
|
describe('Question preview: Auto scored - All or nothing: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
|
16
16
|
abortEarlySetup();
|
17
17
|
before(() => {
|
18
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
19
18
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
20
19
|
cy.barsPreLoaderWait();
|
21
20
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -15,7 +15,6 @@ describe('Create Item page - Fill in the gaps over image with dropdown: Manually
|
|
15
15
|
describe('Question Preview: Manually Scored', () => {
|
16
16
|
abortEarlySetup();
|
17
17
|
before(() => {
|
18
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
19
18
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
20
19
|
cy.barsPreLoaderWait();
|
21
20
|
fillInTheGapsOverImageDropdownPage.steps.addTextInQuestionInstructionsInputField('fill in the gaps');
|
@@ -31,7 +30,7 @@ describe('Create Item page - Fill in the gaps over image with dropdown: Manually
|
|
31
30
|
it('In Preview tab, question instructions, uploaded image and dropdowns should be displayed in the preview tab', () => {
|
32
31
|
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionInstructionsTextPreviewTab('fill in the gaps');
|
33
32
|
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.canvasImageInPreviewTab(), 'visible');
|
34
|
-
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.dropdownPreviewTab(),
|
33
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.dropdownPreviewTab(), 2);
|
35
34
|
fillInTheGapsOverImageDropdownPage.steps.verifyTextInDropdownsInPreviewTab([{ dropdownIndex: 0, dropdownText: '' }, { dropdownIndex: 1, dropdownText: '' }]);
|
36
35
|
});
|
37
36
|
|
@@ -41,7 +40,6 @@ describe('Create Item page - Fill in the gaps over image with dropdown: Manually
|
|
41
40
|
describe('Question Preview: Non Scored', () => {
|
42
41
|
abortEarlySetup();
|
43
42
|
before(() => {
|
44
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
45
43
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
46
44
|
cy.barsPreLoaderWait();
|
47
45
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -16,7 +16,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
16
16
|
describe('Question preview: Auto scored - Partial different weights - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
|
17
17
|
abortEarlySetup();
|
18
18
|
before(() => {
|
19
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
20
19
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
21
20
|
cy.barsPreLoaderWait();
|
22
21
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsBasic.js
CHANGED
@@ -14,7 +14,6 @@ describe('Create item page - Fill in the gaps over image - dropdown: Partial dif
|
|
14
14
|
describe('Auto scored - Partial different weights', () => {
|
15
15
|
abortEarlySetup();
|
16
16
|
before(() => {
|
17
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
18
17
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
19
18
|
cy.barsPreLoaderWait();
|
20
19
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -96,7 +95,6 @@ describe('Create item page - Fill in the gaps over image - dropdown: Partial dif
|
|
96
95
|
describe('Question preview: Auto scored - Partial different weights: Minimum scoring', () => {
|
97
96
|
abortEarlySetup();
|
98
97
|
before(() => {
|
99
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
100
98
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
101
99
|
cy.barsPreLoaderWait();
|
102
100
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -162,7 +160,6 @@ describe('Create item page - Fill in the gaps over image - dropdown: Partial dif
|
|
162
160
|
describe('Question preview: Auto scored - Partial different weights: Rounding', () => {
|
163
161
|
abortEarlySetup();
|
164
162
|
before(() => {
|
165
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
166
163
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
167
164
|
cy.barsPreLoaderWait();
|
168
165
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -17,7 +17,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
17
17
|
describe('Question preview: Auto scored - Partial different weight - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
|
18
18
|
abortEarlySetup();
|
19
19
|
before(() => {
|
20
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
21
20
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
22
21
|
cy.barsPreLoaderWait();
|
23
22
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -16,7 +16,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
16
16
|
describe('Question preview: Auto scored - Partial different weights - When \'Correct answer\' points are greater than \'Alternative answer\' points', () => {
|
17
17
|
abortEarlySetup();
|
18
18
|
before(() => {
|
19
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
20
19
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
21
20
|
cy.barsPreLoaderWait();
|
22
21
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js
CHANGED
@@ -14,7 +14,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
14
14
|
describe('Auto scored - Partial equal weights', () => {
|
15
15
|
abortEarlySetup();
|
16
16
|
before(() => {
|
17
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
18
17
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
19
18
|
cy.barsPreLoaderWait();
|
20
19
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -32,7 +31,7 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
32
31
|
});
|
33
32
|
|
34
33
|
it('When the user selects \'Grading\' view without attempting the question, response area numeration should be displayed, correct answers section should be displayed with correct answers and respective response area numeration', () => {
|
35
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(0,
|
34
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(0, 10);
|
36
35
|
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
37
36
|
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
38
37
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
@@ -97,7 +96,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
97
96
|
describe('Question preview: Auto scored - Partial equal weights: Minimum scoring', () => {
|
98
97
|
abortEarlySetup();
|
99
98
|
before(() => {
|
100
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
101
99
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
102
100
|
cy.barsPreLoaderWait();
|
103
101
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -110,7 +108,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
110
108
|
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
111
109
|
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
112
110
|
fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
113
|
-
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
114
111
|
});
|
115
112
|
|
116
113
|
it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
|
@@ -18,7 +18,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
18
18
|
describe('Question preview: Auto scored - Partial equal weights - When \'Alternative\' points are more than \'Correct\' points', () => {
|
19
19
|
abortEarlySetup();
|
20
20
|
before(() => {
|
21
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
22
21
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
23
22
|
cy.barsPreLoaderWait();
|
24
23
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -19,7 +19,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
19
19
|
describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
|
20
20
|
abortEarlySetup();
|
21
21
|
before(() => {
|
22
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
23
22
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
24
23
|
cy.barsPreLoaderWait();
|
25
24
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -18,7 +18,6 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
|
|
18
18
|
describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are more than \'Alternate answer\' points', () => {
|
19
19
|
abortEarlySetup();
|
20
20
|
before(() => {
|
21
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
22
21
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
23
22
|
cy.barsPreLoaderWait();
|
24
23
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -20,7 +20,6 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
20
20
|
describe('Question preview modes: Student view and Grading view', () => {
|
21
21
|
abortEarlySetup();
|
22
22
|
before(() => {
|
23
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
24
23
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
25
24
|
cy.barsPreLoaderWait();
|
26
25
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -55,7 +54,6 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
55
54
|
before(() => {
|
56
55
|
switch (view) {
|
57
56
|
case 'Question preview':
|
58
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
59
57
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
60
58
|
cy.barsPreLoaderWait();
|
61
59
|
fillInTheGapsOverImageDropdownPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
@@ -188,7 +186,6 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
188
186
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
189
187
|
abortEarlySetup();
|
190
188
|
before(() => {
|
191
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
192
189
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
193
190
|
cy.barsPreLoaderWait();
|
194
191
|
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
@@ -36,7 +36,6 @@ describe('Create item page - Fill in the gaps over image - dropdown - Check answ
|
|
36
36
|
before(() => {
|
37
37
|
switch (view) {
|
38
38
|
case 'Question preview':
|
39
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
40
39
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
41
40
|
cy.barsPreLoaderWait();
|
42
41
|
fillInTheGapsOverImageDropdownPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
@@ -0,0 +1,276 @@
|
|
1
|
+
import { fillInTheGapsOverImageDropdownPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const optionsForDropdown = ['Flower', 'Petal', 'Stem', 'Branch'];
|
7
|
+
|
8
|
+
describe('Create item page - Fill in the gaps over image with dropdown: Scoring section', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Scoring section contents', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
});
|
19
|
+
|
20
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyScoringTypeLabelAndDropdown('Auto scored');
|
21
|
+
|
22
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyScoringSubtypeContentsForMultipleResponseTypeQuestion();
|
23
|
+
});
|
24
|
+
|
25
|
+
describe('Auto scored: All or nothing scoring - Scoring section', () => {
|
26
|
+
abortEarlySetup();
|
27
|
+
before(() => {
|
28
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
29
|
+
cy.barsPreLoaderWait();
|
30
|
+
});
|
31
|
+
|
32
|
+
it('When the user has selected \'All or nothing\' scoring subtype, minimum scoring and penalty points dropdown should be displayed in the scoring section', () => {
|
33
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
34
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
35
|
+
});
|
36
|
+
});
|
37
|
+
|
38
|
+
describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
|
39
|
+
abortEarlySetup();
|
40
|
+
before(() => {
|
41
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
42
|
+
cy.barsPreLoaderWait();
|
43
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
44
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
45
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
46
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
|
47
|
+
});
|
48
|
+
|
49
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
50
|
+
|
51
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyPointsLabelAndInputField();
|
52
|
+
});
|
53
|
+
|
54
|
+
describe('Auto scored: Partial - equal weights scoring - Scoring section', () => {
|
55
|
+
abortEarlySetup();
|
56
|
+
before(() => {
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
58
|
+
cy.barsPreLoaderWait();
|
59
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
60
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
61
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
62
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
|
63
|
+
});
|
64
|
+
|
65
|
+
it('User should be able to select \'Partial - equal weights\' scoring type', () => {
|
66
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
67
|
+
});
|
68
|
+
|
69
|
+
it('When the user has switched to \'Partial - equal weights\' scoring, then \'Penalty scoring\', \'Minimum scoring\' and \'Rounding\' label and dropdown should be displayed in the \'Scoring\' section, \'Round negative scores to zero\' label and checkbox should not be displayed in the \'Scoring\' section', () => {
|
70
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
71
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
72
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyRoundingLabelAndDropdownDefaultState();
|
73
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
74
|
+
});
|
75
|
+
});
|
76
|
+
|
77
|
+
describe('Auto scored: Partial - equal weights scoring - Specify correct answer section', () => {
|
78
|
+
abortEarlySetup();
|
79
|
+
before(() => {
|
80
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
81
|
+
cy.barsPreLoaderWait();
|
82
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
83
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
84
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
85
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
|
86
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(80);
|
87
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
88
|
+
});
|
89
|
+
|
90
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
91
|
+
|
92
|
+
it('\'Points per response\' label should be displayed and a \'-\'', () => {
|
93
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPointsPerResponseLabel();
|
94
|
+
});
|
95
|
+
|
96
|
+
it('When the user gives a score input to \'Points\' input field, then the score should be equally divided among the dropdowns in \'Points per response\' label', () => {
|
97
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(6);
|
98
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('2');
|
99
|
+
});
|
100
|
+
|
101
|
+
it('When the user inserts one more dropdown, then points per response should get updated accordingly', () => {
|
102
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(60);
|
103
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('1.5');
|
104
|
+
});
|
105
|
+
|
106
|
+
it('When the user deletes a dropdown, then points per response should get updated accordingly', () => {
|
107
|
+
fillInTheGapsOverImageDropdownPage.steps.removeResponseArea(3);
|
108
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('2');
|
109
|
+
});
|
110
|
+
|
111
|
+
it('When user deletes a dropdown option, then points per response should not be changed', () => {
|
112
|
+
fillInTheGapsOverImageDropdownPage.steps.deleteOption(3);
|
113
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('2');
|
114
|
+
});
|
115
|
+
|
116
|
+
it('When the user switches to \'All or nothing\' scoring, the \'Points per response\' label and the points displayed for individual responses should not be displayed and the points displayed in \'Points\' input field should remain unchanged', () => {
|
117
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('All or nothing');
|
118
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.pointsPerResponseLabel(), 'notExist');
|
119
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPointsFieldValue(6);
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When the user updates the entered points in \'All or nothing\' scoring type and switches to \'Partial equal weights\' scoring type, then the points should be equally divided and displayed besides each correct option', () => {
|
123
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(12);
|
124
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
125
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('4');
|
126
|
+
});
|
127
|
+
|
128
|
+
it('CSS of \'Points per response\' label and its displayed score', { tags: 'css' }, () => {
|
129
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.pointsPerResponseLabel(), {
|
130
|
+
'color': css.color.labels,
|
131
|
+
'font-size': css.fontSize.normal,
|
132
|
+
'font-weight': css.fontWeight.semibold
|
133
|
+
});
|
134
|
+
});
|
135
|
+
});
|
136
|
+
|
137
|
+
describe('Auto scored: Partial - different weights scoring - Scoring section', () => {
|
138
|
+
abortEarlySetup();
|
139
|
+
before(() => {
|
140
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
141
|
+
cy.barsPreLoaderWait();
|
142
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
143
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
144
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
145
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
|
146
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(80);
|
147
|
+
});
|
148
|
+
|
149
|
+
it('User should be able to select \'Partial - different weights\' scoring', () => {
|
150
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
151
|
+
});
|
152
|
+
|
153
|
+
it('When the user has switched to \'Partial - different weights\' scoring, then \'Penalty scoring\', \'Minimum scoring\' and \'Rounding\' labels and dropdowns, \'Round negative scores to zero\' label and checkbox should not be displayed in the \'Scoring\' section', () => {
|
154
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
155
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
156
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyRoundingLabelAndDropdownDefaultState();
|
157
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
158
|
+
});
|
159
|
+
});
|
160
|
+
|
161
|
+
describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
|
162
|
+
abortEarlySetup();
|
163
|
+
before(() => {
|
164
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
165
|
+
cy.barsPreLoaderWait();
|
166
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
167
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
168
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
169
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
|
170
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
171
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown);
|
172
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, optionsForDropdown[0]);
|
173
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, optionsForDropdown[1]);
|
174
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
175
|
+
});
|
176
|
+
|
177
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
178
|
+
|
179
|
+
it('When the user has switched to \'Partial - different weights\' scoring, then \'Points\' label should be displayed and a points input field should be displayed besides each dropdown', () => {
|
180
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.pointsLabel(), 'Points');
|
181
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.pointsLabel(), 'visible');
|
182
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.pointsInputField(), 2);
|
183
|
+
});
|
184
|
+
|
185
|
+
it('By default the \'Points\' input field should be empty', () => {
|
186
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPartialDifferentWeightsPointsInputFieldIsEmpty();
|
187
|
+
});
|
188
|
+
|
189
|
+
it('User should be able to set points in the \'Points\' input fields', () => {
|
190
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 2.3, 1: 3.4 });
|
191
|
+
});
|
192
|
+
|
193
|
+
it('CSS of \'Points\' label and \'Points\' input fields', { tags: 'css' }, () => {
|
194
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.pointsLabel(), {
|
195
|
+
'color': css.color.labels,
|
196
|
+
'font-size': css.fontSize.normal,
|
197
|
+
'font-weight': css.fontWeight.semibold
|
198
|
+
});
|
199
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.pointsInputField(), {
|
200
|
+
'color': css.color.text,
|
201
|
+
'font-size': css.fontSize.default,
|
202
|
+
'font-weight': css.fontWeight.regular
|
203
|
+
});
|
204
|
+
});
|
205
|
+
|
206
|
+
it('When the user switches to \'All or nothing\' scoring, the points added for individual responses in Partial - different weights scoring should get summed up in the \'All or nothing scoring\' points input field', () => {
|
207
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('All or nothing');
|
208
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPointsFieldValue(5.7);
|
209
|
+
});
|
210
|
+
|
211
|
+
it('When the user updates the entered points in \'All or nothing\' scoring type and switches to \'Partial different weights\' scoring type, then the points should be equally divided and displayed besides each correct option', () => {
|
212
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(9);
|
213
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
214
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPartialDifferentWeightsPointsInputFieldValue([4.5, 4.5]);
|
215
|
+
});
|
216
|
+
});
|
217
|
+
|
218
|
+
describe('Manually scored scoring - Scoring section', () => {
|
219
|
+
abortEarlySetup();
|
220
|
+
before(() => {
|
221
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
222
|
+
cy.barsPreLoaderWait();
|
223
|
+
});
|
224
|
+
|
225
|
+
it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
|
226
|
+
fillInTheGapsOverImageDropdownPage.steps.expandScoringTypeDropdown();
|
227
|
+
fillInTheGapsOverImageDropdownPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
228
|
+
});
|
229
|
+
|
230
|
+
it('When the user has selected \'Manually scored\' scoring type, then the specify correct answer section should not be displayed', () => {
|
231
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.specifyCorrectAnswerLabel(), 'notExist');
|
232
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.specifyCorrectAnswerSectionWrapper(), 'notExist');
|
233
|
+
});
|
234
|
+
|
235
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyScoringSectionContentsForManuallyScoredScoringType();
|
236
|
+
|
237
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyPointsFieldErrorState();
|
238
|
+
|
239
|
+
it('When user has selected \'Manually scored\' scoring type, then in scoring section \'Minimum scoring\' label and dropdown should be visible', () => {
|
240
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
241
|
+
});
|
242
|
+
});
|
243
|
+
|
244
|
+
describe('Non scored scoring - Scoring section', () => {
|
245
|
+
abortEarlySetup();
|
246
|
+
before(() => {
|
247
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
248
|
+
cy.barsPreLoaderWait();
|
249
|
+
});
|
250
|
+
|
251
|
+
it('User should be able to select \'Non scored\' scoring type from scoring type dropdown', () => {
|
252
|
+
fillInTheGapsOverImageDropdownPage.steps.expandScoringTypeDropdown();
|
253
|
+
fillInTheGapsOverImageDropdownPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
254
|
+
});
|
255
|
+
|
256
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyScoringSectionContentsForNonScoredScoringType();
|
257
|
+
});
|
258
|
+
|
259
|
+
describe('Non scored scoring - Specify correct answer section', () => {
|
260
|
+
abortEarlySetup();
|
261
|
+
before(() => {
|
262
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
263
|
+
cy.barsPreLoaderWait();
|
264
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
265
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
266
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
267
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
|
268
|
+
fillInTheGapsOverImageDropdownPage.steps.expandScoringTypeDropdown();
|
269
|
+
fillInTheGapsOverImageDropdownPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
270
|
+
});
|
271
|
+
|
272
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
|
273
|
+
|
274
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyPointsLabelAndInputFieldForNonScoredScoringType();
|
275
|
+
});
|
276
|
+
});
|
package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js
CHANGED
@@ -20,7 +20,6 @@ describe('Create item page - Fill in the gaps over image - dropdown - Preview co
|
|
20
20
|
before(() => {
|
21
21
|
switch (view) {
|
22
22
|
case 'Question preview':
|
23
|
-
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
24
23
|
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
25
24
|
cy.barsPreLoaderWait();
|
26
25
|
fillInTheGapsOverImageDropdownPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import { fillInTheGapsOverImageDropdownPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
const optionsForDropdown = ['Flower', 'Petal', 'Stem', 'Branch'];
|
5
|
+
|
6
|
+
describe('Create Item page - Fill in the gaps over image - dropdown: Specify correct answer, Alternative correct answer', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Specify correct answer section - Header and \'Correct\' accordion', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
17
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
18
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
19
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
20
|
+
});
|
21
|
+
|
22
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('fill in the gaps over image - dropdown');
|
23
|
+
|
24
|
+
fillInTheGapsOverImageDropdownPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
25
|
+
});
|
26
|
+
|
27
|
+
describe('Specify correct answer section - \'Alternate\' accordion', () => {
|
28
|
+
abortEarlySetup();
|
29
|
+
before(() => {
|
30
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
31
|
+
cy.barsPreLoaderWait();
|
32
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
33
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
34
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
35
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown);
|
36
|
+
});
|
37
|
+
|
38
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyAutoScoredAddAlternativeAnswerButtonAndValidation();
|
39
|
+
|
40
|
+
it('When user has added points and selected an option in dropdown in the \'Correct\' accordion, then the user should be able to add alternative answer for the question using \'Add alternative answer\' button', () => {
|
41
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, optionsForDropdown[0]);
|
42
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(10);
|
43
|
+
fillInTheGapsOverImageDropdownPage.steps.addAlternativeAnswerAccordion(1);
|
44
|
+
});
|
45
|
+
|
46
|
+
it('When user has added an alternate answer accordion, then the newly added alternate answer accordion should be in expanded state and the correct answer accordion should be in collapsed state', () => {
|
47
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerAccordionIsCollapsed();
|
48
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternateAnswerAccordionIsExpanded(1);
|
49
|
+
});
|
50
|
+
|
51
|
+
fillInTheGapsOverImageDropdownPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Alternate');
|
52
|
+
|
53
|
+
it('User should be able to add another alternative answer for the question using \'Add alternative answer\' button and the name for this new accordion should be \'Alternative 2\'', () => {
|
54
|
+
fillInTheGapsOverImageDropdownPage.steps.addAlternativeAnswerAccordion(2);
|
55
|
+
});
|
56
|
+
|
57
|
+
fillInTheGapsOverImageDropdownPage.tests.verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion();
|
58
|
+
|
59
|
+
it('User should be able to remove alternative correct answer by clicking on the \'Delete\' icon button alongside alternative answer accordion and the name of the alternative answer accordions should get updated accordingly', () => {
|
60
|
+
cy.log('Set correct answer and points in alternative 2 accordion, then switch to alternative 1 accordion and click delete icon button');
|
61
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, optionsForDropdown[0]);
|
62
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(5);
|
63
|
+
fillInTheGapsOverImageDropdownPage.steps.deleteAlternativeAnswerAccordion(1);
|
64
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerAccordionNotExists(2);
|
65
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerAccordionLabel(1);
|
66
|
+
});
|
67
|
+
|
68
|
+
it('When correct answers and points are set in alternate answer and user clicks on correct answer accordion, then correct answer accordion should be expanded and the alternate answer accordion should be collapsed', () => {
|
69
|
+
fillInTheGapsOverImageDropdownPage.steps.expandCorrectAnswerAccordion();
|
70
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyAlternateAnswerAccordionIsCollapsed(1);
|
71
|
+
});
|
72
|
+
});
|
73
|
+
});
|
@@ -15,7 +15,7 @@ describe('Create item page - Fill in the gaps over image with text: All or nothi
|
|
15
15
|
cy.barsPreLoaderWait();
|
16
16
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
17
17
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
18
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
18
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
19
19
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
20
20
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
21
21
|
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
@@ -13,7 +13,7 @@ describe('Create item page - Fill in the gaps over image with text: All or nothi
|
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
16
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
16
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
17
17
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
18
18
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
19
19
|
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
@@ -15,7 +15,7 @@ describe('Create item page - Fill in the gaps over image with text: All or nothi
|
|
15
15
|
cy.barsPreLoaderWait();
|
16
16
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
17
17
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
18
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
18
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
19
19
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
20
20
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
21
21
|
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
@@ -13,7 +13,7 @@ describe('Create item page -Fill in the gaps over image with text: All or nothin
|
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
16
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
16
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
17
17
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
18
18
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
19
19
|
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|