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,172 @@
|
|
1
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
const correctTabAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
5
|
+
const alternateTabAnswerArray = ['Petals', 'Leaves', 'Stem'];
|
6
|
+
const incorrectAnswerArray = ['Root', 'Branch', 'Seed'];
|
7
|
+
|
8
|
+
describe('Create item page - Fill in the gaps over image - text: All or nothing scoring', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Question preview: Auto scored - All or nothing with alternate answer (Match from all responses - true)', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
17
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
18
|
+
cy.barsPreLoaderWait();
|
19
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
20
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
21
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
22
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
23
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
24
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
25
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
26
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateTab(1);
|
27
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTabAnswerArray[0]);
|
28
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTabAnswerArray[1]);
|
29
|
+
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
30
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
|
31
|
+
fillInTheGapsOverImageTextPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
32
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
33
|
+
});
|
34
|
+
|
35
|
+
it('When the user selects \'Show correct answer\' checkbox without attempting the question, correct answer container should be displayed with the correct responses from the correct tab', () => {
|
36
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
37
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
|
38
|
+
fillInTheGapsOverImageTextPage.steps.uncheckShowCorrectAnswerCheckbox();
|
39
|
+
});
|
40
|
+
|
41
|
+
it('When the user attempts the question with responses from the correct tab, then the user should be awarded with points specified for correct tab and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides response fields, label \'Correct answer\' and correct answer border should be displayed below the question preview and correct answer container should not be displayed', () => {
|
42
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
43
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, correctTabAnswerArray[1]);
|
44
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(20, 20);
|
45
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
46
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
47
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
48
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
49
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
|
50
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
51
|
+
fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
52
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides response fields and label \'Correct answer\' and correct answer border should be displayed below the question preview and correct answer container should not be displayed')
|
53
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
54
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
55
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
56
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
57
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
|
58
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
59
|
+
});
|
60
|
+
|
61
|
+
it('When the user attempts the question with responses from the alternate tab, then the user should be awarded with points specified for alternate tab (less than overall points) and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides response fields, label \'Correct answer\' and correct answer border should be displayed below the question preview and correct answer container should not be displayed', () => {
|
62
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
63
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, alternateTabAnswerArray[0]);
|
64
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, alternateTabAnswerArray[1]);
|
65
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(20, 20);
|
66
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
67
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
68
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
69
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
70
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
|
71
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
72
|
+
fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
73
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides response fields, label \'Correct answer\' and correct answer border should be displayed below the question preview and correct answer container should not be displayed')
|
74
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
75
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
76
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
77
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
78
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
|
79
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
80
|
+
});
|
81
|
+
|
82
|
+
it('When the user attempts the question with partially correct responses exclusively from the correct tab, then the user should be awarded with 0 points and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides correct response field, red cross-mark icon should be displayed besides the incorrect response field, label \'Incorrect answer\' should be displayed below the question preview and the correct answer container should be displayed with the correct responses from the correct tab for the responses marked incorrect', () => {
|
83
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
84
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
85
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
|
86
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(0, 20);
|
87
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
88
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
89
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
90
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
91
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
92
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[1]], ['2']);
|
93
|
+
fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
94
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
95
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides correct response field, red cross-mark icon should be displayed besides the incorrect response field, label \'Incorrect answer\' should be displayed below the question preview and the correct answer container should not be displayed')
|
96
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
97
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
98
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
99
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
100
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
101
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
102
|
+
});
|
103
|
+
|
104
|
+
it('When the user attempts the question with partially correct responses exclusively from the alternate tab, then the user should be awarded with 0 points and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides correct response field, red cross-mark icon should be displayed besides the incorrect response field, label \'Incorrect answer\' should be displayed below the question preview and the correct answer container should be displayed with the correct responses from the alternate tab for the responses marked incorrect', () => {
|
105
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
106
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, alternateTabAnswerArray[0]);
|
107
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
|
108
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(0, 20);
|
109
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
110
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
111
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
112
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
113
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
114
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([alternateTabAnswerArray[1]], ['2']);
|
115
|
+
fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
116
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
117
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides correct response field, red cross-mark icon should be displayed besides the incorrect response field, label \'Incorrect answer\' should be displayed below the question preview and the correct answer container should not be displayed')
|
118
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
119
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
120
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
121
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
122
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
123
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
124
|
+
});
|
125
|
+
|
126
|
+
it('When the user attempts the question with a combination of correct responses from correct tab and alternate tab, then the user should be awarded with full points and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides response fields, label \'Correct answer\' should be displayed below the question preview and the correct answer container should not be displayed', () => {
|
127
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
128
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
|
129
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, alternateTabAnswerArray[1]);
|
130
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(20, 20);
|
131
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
132
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
133
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
134
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
135
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
|
136
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
137
|
+
fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
138
|
+
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides response fields, label \'Correct answer\' should be displayed below the question preview and the correct answer container should not be displayed')
|
139
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
140
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
|
141
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
|
142
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
143
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAttemptBorder();
|
144
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
145
|
+
});
|
146
|
+
|
147
|
+
it('When the user attempts the question incorrectly then on selecting \'Show correct answer\' checkbox, the user should be awarded 0 points and red cross-mark icons should be displayed beside all incorrect response fields, a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview and the correct answer container should be displayed with the correct responses from the correct tab', () => {
|
148
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
149
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[1]);
|
150
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, alternateTabAnswerArray[0]);
|
151
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(0, 20);
|
152
|
+
fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
|
153
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
154
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
155
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
156
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
157
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
158
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
|
159
|
+
fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
160
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
161
|
+
cy.log('When the user attempts the question incorrectly and clicks on the \'Check answer\' button, then red cross-mark icons should be displayed beside all incorrect the options, a label \'Incorrect answer\' and incorrect answer border should be displayed below the question preview and the correct answer container should not be displayed')
|
162
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
163
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
164
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
|
165
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectAttemptBorder();
|
166
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
167
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
|
168
|
+
});
|
169
|
+
|
170
|
+
fillInTheGapsOverImageTextPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(1, 20);
|
171
|
+
});
|
172
|
+
});
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
-
const correctTabAnswerArray = ['Flower', 'Leaf'];
|
4
|
-
const alternateTab1AnswerArray = ['Petals', 'Leaves'];
|
5
|
-
const alternateTab2AnswerArray = ['Branch', 'Roots'];
|
6
3
|
|
7
4
|
describe('Fill In the gaps over image - text \'Correct response condition\' checkboxes', () => {
|
8
5
|
before(() => {
|
@@ -203,155 +200,4 @@ describe('Fill In the gaps over image - text \'Correct response condition\' chec
|
|
203
200
|
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
|
204
201
|
});
|
205
202
|
});
|
206
|
-
|
207
|
-
describe('Match from all responses - Edit tab cases for \'All or Nothing\' scoring type', () => {
|
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.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
218
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
219
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(7);
|
220
|
-
});
|
221
|
-
|
222
|
-
it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
|
223
|
-
fillInTheGapsOverImageTextPage.steps.addAlternateTab(1);
|
224
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab1AnswerArray[0]);
|
225
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab1AnswerArray[1]);
|
226
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
227
|
-
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
228
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
229
|
-
});
|
230
|
-
|
231
|
-
it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
|
232
|
-
fillInTheGapsOverImageTextPage.steps.addAlternateTab(2);
|
233
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
234
|
-
});
|
235
|
-
|
236
|
-
it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
|
237
|
-
cy.log('Pre:step - unchecking the \'Match from all responses\' checkbox and updating the points')
|
238
|
-
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
239
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab2AnswerArray[0]);
|
240
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab2AnswerArray[1]);
|
241
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
242
|
-
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
243
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
244
|
-
});
|
245
|
-
|
246
|
-
it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
|
247
|
-
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
248
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsFieldValue(20);
|
249
|
-
fillInTheGapsOverImageTextPage.steps.switchToCorrectTab();
|
250
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsFieldValue(7);
|
251
|
-
});
|
252
|
-
});
|
253
|
-
|
254
|
-
describe('Match from all responses - Edit tab cases for \'Partial - equal weights\' scoring type', () => {
|
255
|
-
abortEarlySetup();
|
256
|
-
before(() => {
|
257
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
258
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
259
|
-
cy.barsPreLoaderWait();
|
260
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
261
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
262
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
263
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
264
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
265
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
266
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(7);
|
267
|
-
fillInTheGapsOverImageTextPage.steps.selectPartialEqualWeightsCheckbox();
|
268
|
-
});
|
269
|
-
|
270
|
-
it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
|
271
|
-
fillInTheGapsOverImageTextPage.steps.addAlternateTab(1);
|
272
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab1AnswerArray[0]);
|
273
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab1AnswerArray[1]);
|
274
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
275
|
-
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
276
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
277
|
-
fillInTheGapsOverImageTextPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
|
278
|
-
});
|
279
|
-
|
280
|
-
it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
|
281
|
-
fillInTheGapsOverImageTextPage.steps.addAlternateTab(2);
|
282
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
283
|
-
fillInTheGapsOverImageTextPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
|
284
|
-
});
|
285
|
-
|
286
|
-
it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
|
287
|
-
cy.log('Pre:step - unchecking the \'Match from all responses\' checkbox and updating the points')
|
288
|
-
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
289
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab2AnswerArray[0]);
|
290
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab2AnswerArray[1]);
|
291
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
292
|
-
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
293
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
294
|
-
fillInTheGapsOverImageTextPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
|
295
|
-
});
|
296
|
-
|
297
|
-
it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
|
298
|
-
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
299
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsFieldValue(20);
|
300
|
-
fillInTheGapsOverImageTextPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(10);
|
301
|
-
fillInTheGapsOverImageTextPage.steps.switchToCorrectTab();
|
302
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsFieldValue(7);
|
303
|
-
fillInTheGapsOverImageTextPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
|
304
|
-
});
|
305
|
-
});
|
306
|
-
|
307
|
-
describe('Match from all responses - Edit tab cases for \'Partial - different weights\' scoring type', () => {
|
308
|
-
abortEarlySetup();
|
309
|
-
before(() => {
|
310
|
-
cy.log('Navigate to fill in the gaps over image - text question type');
|
311
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
312
|
-
cy.barsPreLoaderWait();
|
313
|
-
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
314
|
-
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
315
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
316
|
-
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
317
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
318
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
319
|
-
fillInTheGapsOverImageTextPage.steps.selectPartialDifferentWeightsCheckbox();
|
320
|
-
fillInTheGapsOverImageTextPage.steps.addPartialDifferentWeightsPoints([1, 7]);
|
321
|
-
});
|
322
|
-
|
323
|
-
it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
|
324
|
-
fillInTheGapsOverImageTextPage.steps.addAlternateTab(1);
|
325
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab1AnswerArray[0]);
|
326
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab1AnswerArray[1]);
|
327
|
-
fillInTheGapsOverImageTextPage.steps.addPartialDifferentWeightsPoints([2, 8]);
|
328
|
-
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
329
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 1);
|
330
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(1, 7);
|
331
|
-
});
|
332
|
-
|
333
|
-
it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
|
334
|
-
fillInTheGapsOverImageTextPage.steps.addAlternateTab(2);
|
335
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 1);
|
336
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(1, 7);
|
337
|
-
});
|
338
|
-
|
339
|
-
it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
|
340
|
-
cy.log('Pre:step - unchecking the \'Match from all responses\' checkbox and updating the points')
|
341
|
-
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
342
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab2AnswerArray[0]);
|
343
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab2AnswerArray[1]);
|
344
|
-
fillInTheGapsOverImageTextPage.steps.addPartialDifferentWeightsPoints([3, 10]);
|
345
|
-
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
346
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 1);
|
347
|
-
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(1, 7);
|
348
|
-
});
|
349
|
-
|
350
|
-
it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
|
351
|
-
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
352
|
-
fillInTheGapsOverImageTextPage.steps.verifyPartialDifferentWeightsPointsInputFieldValue([3, 10]);
|
353
|
-
fillInTheGapsOverImageTextPage.steps.switchToCorrectTab();
|
354
|
-
fillInTheGapsOverImageTextPage.steps.verifyPartialDifferentWeightsPointsInputFieldValue([1, 7]);
|
355
|
-
});
|
356
|
-
});
|
357
203
|
});
|
package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
2
|
import { uploadImageSectionComponent } from "../../../pages/components";
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
@@ -130,79 +130,4 @@ describe('Create Item page - Fill in the gaps over image - text: Question instru
|
|
130
130
|
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imageSectionImage(), 'visible');
|
131
131
|
});
|
132
132
|
});
|
133
|
-
|
134
|
-
describe('Supported file types functionality: device popup', () => {
|
135
|
-
abortEarlySetup();
|
136
|
-
before(() => {
|
137
|
-
cy.log('Navigating to fill in the gaps over image - text question type');
|
138
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
139
|
-
cy.barsPreLoaderWait();
|
140
|
-
});
|
141
|
-
|
142
|
-
const supportedFormatFiles = {
|
143
|
-
jpg: 'highlightImage.jpg',
|
144
|
-
jpeg: 'sample.jpeg',
|
145
|
-
png: 'image.png',
|
146
|
-
gif: 'sample.gif',
|
147
|
-
heic: 'sample.heic',
|
148
|
-
heif: 'sample.heif',
|
149
|
-
svg: 'sample.svg'
|
150
|
-
};
|
151
|
-
|
152
|
-
Object.keys(supportedFormatFiles).forEach((fileType) => {
|
153
|
-
it(`User should be able to upload ${fileType} file in the image section using link text \'device\' and it should be displayed in the \'Image\' section and \'Preview tab\'`, () => {
|
154
|
-
uploadImageSectionComponent.steps.uploadFile(supportedFormatFiles[fileType]);
|
155
|
-
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
156
|
-
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
157
|
-
utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
|
158
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imageSectionImage(), 'visible');
|
159
|
-
fillInTheGapsOverImageTextPage.steps.verifyUploadedImageFormatInImageSection(fileType);
|
160
|
-
cy.log('Checking in preview tab')
|
161
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
162
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imagePreviewTab(), 'visible');
|
163
|
-
fillInTheGapsOverImageTextPage.steps.verifyUploadedImageFormatInPreviewTab(fileType);
|
164
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
165
|
-
cy.log('Post step: Delete the image')
|
166
|
-
uploadImageSectionComponent.steps.clickOnDeleteImageButton();
|
167
|
-
uploadImageSectionComponent.steps.clickOnDeleteButtonInDeleteImagePopup();
|
168
|
-
});
|
169
|
-
});
|
170
|
-
});
|
171
|
-
|
172
|
-
describe('Supported file types functionality: Source URL popup', () => {
|
173
|
-
abortEarlySetup();
|
174
|
-
before(() => {
|
175
|
-
cy.log('Navigating to fill in the gaps over image - text question type');
|
176
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
177
|
-
cy.barsPreLoaderWait();
|
178
|
-
});
|
179
|
-
|
180
|
-
const supportedFormatFiles = {
|
181
|
-
jpg: constants.foxImageLink,
|
182
|
-
jpeg: constants.sampleJPEGLink,
|
183
|
-
png: constants.samplePNGLink,
|
184
|
-
gif: constants.sampleGIFLink,
|
185
|
-
svg: constants.sampleSVGLink
|
186
|
-
};
|
187
|
-
|
188
|
-
Object.keys(supportedFormatFiles).forEach((fileType) => {
|
189
|
-
it(`User should be able to upload ${fileType} file in the upload section using link text \'source URL\' and it should be displayed in the \'Image\' section and \'Preview tab\'`, () => {
|
190
|
-
uploadImageSectionComponent.steps.clickOnSourceURL();
|
191
|
-
uploadImageSectionComponent.steps.uploadImageUsingSourceURL(supportedFormatFiles[fileType]);
|
192
|
-
uploadImageSectionComponent.steps.verifyUploadedImageInImagePopup();
|
193
|
-
uploadImageSectionComponent.steps.clickOnImagePopupOkButton();
|
194
|
-
utilities.verifyElementVisibilityState(uploadImageSectionComponent.uploadImagePopup(), 'notExist');
|
195
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imageSectionImage(), 'visible');
|
196
|
-
fillInTheGapsOverImageTextPage.steps.verifyUploadedImageFormatInImageSection(fileType);
|
197
|
-
cy.log('Checking in preview tab')
|
198
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
199
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.imagePreviewTab(), 'visible');
|
200
|
-
fillInTheGapsOverImageTextPage.steps.verifyUploadedImageFormatInPreviewTab(fileType);
|
201
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
202
|
-
cy.log('Post step: Delete the image')
|
203
|
-
uploadImageSectionComponent.steps.clickOnDeleteImageButton();
|
204
|
-
uploadImageSectionComponent.steps.clickOnDeleteButtonInDeleteImagePopup();
|
205
|
-
});
|
206
|
-
});
|
207
|
-
});
|
208
133
|
});
|
@@ -0,0 +1,162 @@
|
|
1
|
+
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const correctTabAnswerArray = ['Flower', 'Leaf'];
|
4
|
+
const alternateTab1AnswerArray = ['Petals', 'Leaves'];
|
5
|
+
const alternateTab2AnswerArray = ['Branch', 'Roots'];
|
6
|
+
|
7
|
+
describe('Fill In the gaps over image - text \'Correct response condition\' checkboxes', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Match from all responses - Edit tab cases for \'All or Nothing\' scoring type', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
16
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
19
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
20
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
21
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
22
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
23
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
24
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(7);
|
25
|
+
});
|
26
|
+
|
27
|
+
it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
|
28
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateTab(1);
|
29
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab1AnswerArray[0]);
|
30
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab1AnswerArray[1]);
|
31
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
32
|
+
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
33
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
34
|
+
});
|
35
|
+
|
36
|
+
it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
|
37
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateTab(2);
|
38
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
39
|
+
});
|
40
|
+
|
41
|
+
it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
|
42
|
+
cy.log('Pre:step - unchecking the \'Match from all responses\' checkbox and updating the points')
|
43
|
+
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
44
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab2AnswerArray[0]);
|
45
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab2AnswerArray[1]);
|
46
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
47
|
+
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
48
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
49
|
+
});
|
50
|
+
|
51
|
+
it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
|
52
|
+
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
53
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsFieldValue(20);
|
54
|
+
fillInTheGapsOverImageTextPage.steps.switchToCorrectTab();
|
55
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsFieldValue(7);
|
56
|
+
});
|
57
|
+
});
|
58
|
+
|
59
|
+
describe('Match from all responses - Edit tab cases for \'Partial - equal weights\' scoring type', () => {
|
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.uploadFile('highlightImage.jpg');
|
66
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
67
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
68
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
69
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
70
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
71
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(7);
|
72
|
+
fillInTheGapsOverImageTextPage.steps.selectPartialEqualWeightsCheckbox();
|
73
|
+
});
|
74
|
+
|
75
|
+
it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
|
76
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateTab(1);
|
77
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab1AnswerArray[0]);
|
78
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab1AnswerArray[1]);
|
79
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
80
|
+
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
81
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
82
|
+
fillInTheGapsOverImageTextPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
|
83
|
+
});
|
84
|
+
|
85
|
+
it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
|
86
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateTab(2);
|
87
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
88
|
+
fillInTheGapsOverImageTextPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
|
89
|
+
});
|
90
|
+
|
91
|
+
it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
|
92
|
+
cy.log('Pre:step - unchecking the \'Match from all responses\' checkbox and updating the points')
|
93
|
+
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
94
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab2AnswerArray[0]);
|
95
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab2AnswerArray[1]);
|
96
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
97
|
+
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
98
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 7);
|
99
|
+
fillInTheGapsOverImageTextPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
|
100
|
+
});
|
101
|
+
|
102
|
+
it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
|
103
|
+
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
104
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsFieldValue(20);
|
105
|
+
fillInTheGapsOverImageTextPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(10);
|
106
|
+
fillInTheGapsOverImageTextPage.steps.switchToCorrectTab();
|
107
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsFieldValue(7);
|
108
|
+
fillInTheGapsOverImageTextPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3.5);
|
109
|
+
});
|
110
|
+
});
|
111
|
+
|
112
|
+
describe('Match from all responses - Edit tab cases for \'Partial - different weights\' scoring type', () => {
|
113
|
+
abortEarlySetup();
|
114
|
+
before(() => {
|
115
|
+
cy.log('Navigate to fill in the gaps over image - text question type');
|
116
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
117
|
+
cy.barsPreLoaderWait();
|
118
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
119
|
+
fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
|
120
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
121
|
+
fillInTheGapsOverImageTextPage.steps.addResponseContainer();
|
122
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
|
123
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
|
124
|
+
fillInTheGapsOverImageTextPage.steps.selectPartialDifferentWeightsCheckbox();
|
125
|
+
fillInTheGapsOverImageTextPage.steps.addPartialDifferentWeightsPoints([1, 7]);
|
126
|
+
});
|
127
|
+
|
128
|
+
it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
|
129
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateTab(1);
|
130
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab1AnswerArray[0]);
|
131
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab1AnswerArray[1]);
|
132
|
+
fillInTheGapsOverImageTextPage.steps.addPartialDifferentWeightsPoints([2, 8]);
|
133
|
+
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
134
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 1);
|
135
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(1, 7);
|
136
|
+
});
|
137
|
+
|
138
|
+
it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
|
139
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateTab(2);
|
140
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 1);
|
141
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(1, 7);
|
142
|
+
});
|
143
|
+
|
144
|
+
it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
|
145
|
+
cy.log('Pre:step - unchecking the \'Match from all responses\' checkbox and updating the points')
|
146
|
+
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
147
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTab2AnswerArray[0]);
|
148
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTab2AnswerArray[1]);
|
149
|
+
fillInTheGapsOverImageTextPage.steps.addPartialDifferentWeightsPoints([3, 10]);
|
150
|
+
fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
|
151
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(0, 1);
|
152
|
+
fillInTheGapsOverImageTextPage.steps.verifyPointsInAlternateTabWhenMatchFromAllResponsesIsChecked(1, 7);
|
153
|
+
});
|
154
|
+
|
155
|
+
it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
|
156
|
+
fillInTheGapsOverImageTextPage.steps.uncheckMatchFromAllResponsesCheckbox();
|
157
|
+
fillInTheGapsOverImageTextPage.steps.verifyPartialDifferentWeightsPointsInputFieldValue([3, 10]);
|
158
|
+
fillInTheGapsOverImageTextPage.steps.switchToCorrectTab();
|
159
|
+
fillInTheGapsOverImageTextPage.steps.verifyPartialDifferentWeightsPointsInputFieldValue([1, 7]);
|
160
|
+
});
|
161
|
+
});
|
162
|
+
});
|