itemengine-cypress-automation 1.0.115 → 1.0.117
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} +183 -179
- package/cypress/e2e/ILC/AudioResponseNew/{compactRecorderStyle.js → compactRecorderStyle.smoke.js} +179 -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 +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +3 -5
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsBasic.js +3 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +3 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +3 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabScoringSection.js +276 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +73 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -1
- 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 +3 -3
- 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 +2 -2
- 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 +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +2 -2
- 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
- package/scripts/sorry-cypress.mjs +1 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
@@ -19,7 +19,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
|
|
19
19
|
cy.barsPreLoaderWait();
|
20
20
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
21
21
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
22
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
22
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
23
23
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
24
24
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
25
25
|
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
@@ -54,7 +54,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
|
|
54
54
|
fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
55
55
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
56
56
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
57
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
57
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
58
58
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
59
59
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
60
60
|
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
@@ -109,7 +109,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
|
|
109
109
|
};
|
110
110
|
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaNumeration();
|
111
111
|
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.correctAnswersLabel(), 'Correct answers:');
|
112
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', '
|
112
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
|
113
113
|
});
|
114
114
|
|
115
115
|
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
@@ -128,7 +128,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
|
|
128
128
|
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(1);
|
129
129
|
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(2);
|
130
130
|
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
131
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', '
|
131
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
|
132
132
|
});
|
133
133
|
|
134
134
|
it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
@@ -150,7 +150,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
|
|
150
150
|
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(1);
|
151
151
|
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(2);
|
152
152
|
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
153
|
-
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', '
|
153
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
|
154
154
|
});
|
155
155
|
|
156
156
|
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
@@ -186,7 +186,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
|
|
186
186
|
cy.barsPreLoaderWait();
|
187
187
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
188
188
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
189
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
189
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
190
190
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
191
191
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
192
192
|
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/checkAnswerFunctionalityForAllViews.smoke.js
CHANGED
@@ -35,7 +35,7 @@ describe('Create item page - Fill in the gaps over image - text - Check answer f
|
|
35
35
|
fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
36
36
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
37
37
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
38
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
38
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
39
39
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
40
40
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
41
41
|
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
@@ -41,7 +41,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
|
|
41
41
|
cy.barsPreLoaderWait();
|
42
42
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
43
43
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
44
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
44
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
45
45
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
46
46
|
});
|
47
47
|
|
@@ -57,7 +57,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
|
|
57
57
|
cy.barsPreLoaderWait();
|
58
58
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
59
59
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
60
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
60
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
61
61
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
62
62
|
});
|
63
63
|
|
@@ -80,7 +80,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
|
|
80
80
|
cy.barsPreLoaderWait();
|
81
81
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
82
82
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
83
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
83
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
84
84
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
85
85
|
fillInTheGapsOverImageTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
86
86
|
});
|
@@ -151,7 +151,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
|
|
151
151
|
cy.barsPreLoaderWait();
|
152
152
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
153
153
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
154
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
154
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
155
155
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
156
156
|
});
|
157
157
|
|
@@ -174,7 +174,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
|
|
174
174
|
cy.barsPreLoaderWait();
|
175
175
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
176
176
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
177
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
177
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
178
178
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
179
179
|
fillInTheGapsOverImageTextPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
180
180
|
});
|
@@ -268,7 +268,7 @@ describe('Create item page - Fill in the gaps over image: Scoring section', () =
|
|
268
268
|
cy.barsPreLoaderWait();
|
269
269
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
270
270
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
271
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
271
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
272
272
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
273
273
|
fillInTheGapsOverImageTextPage.steps.expandScoringTypeDropdown();
|
274
274
|
fillInTheGapsOverImageTextPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
@@ -21,7 +21,7 @@ describe('Create item page - Fill in the gaps over image - text - Preview conten
|
|
21
21
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
22
22
|
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
23
23
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
24
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
24
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
25
25
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(60);
|
26
26
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
27
27
|
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(1, 'Number');
|
@@ -213,7 +213,7 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
213
213
|
cy.barsPreLoaderWait();
|
214
214
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
215
215
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
216
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
216
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
217
217
|
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
218
218
|
});
|
219
219
|
|
@@ -14,7 +14,7 @@ describe('Create Item page - Fill in the gaps over image - text: Specify correct
|
|
14
14
|
cy.barsPreLoaderWait();
|
15
15
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
16
16
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
17
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
17
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
18
18
|
});
|
19
19
|
|
20
20
|
fillInTheGapsOverImageTextPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('fill in the gaps over image with text');
|
@@ -30,7 +30,7 @@ describe('Create Item page - Fill in the gaps over image - text: Specify correct
|
|
30
30
|
cy.barsPreLoaderWait();
|
31
31
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
32
32
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
33
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
33
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
34
34
|
});
|
35
35
|
|
36
36
|
fillInTheGapsOverImageTextPage.tests.verifyAutoScoredAddAlternativeAnswerButtonAndValidation('fill in the gaps over image text');
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { readingRulerPage } from "../../../pages";
|
2
|
+
import { colorPopupComponent } from "../../../pages/components";
|
2
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
4
|
import utilities from "../../../support/helpers/utilities";
|
4
5
|
const css = Cypress.env('css');
|
@@ -213,7 +214,7 @@ describe('Create Item page - Reading ruler: Edit Tab', () => {
|
|
213
214
|
it('When the user modifies the selected color in the color popup and clicks on \'Cancel\' button, then the popup should close and it should be in unselected state and the modifications in the color popup should not persist. Color block should not change and it should be in unselected state', () => {
|
214
215
|
readingRulerPage.steps.clickOnCustomBlockEditIcon();
|
215
216
|
readingRulerPage.steps.addInputToHexInputField('#00002E');
|
216
|
-
|
217
|
+
colorPopupComponent.steps.clickOnCancelButton();
|
217
218
|
utilities.verifyElementVisibilityState(readingRulerPage.dialogBoxContent(), 'notExist');
|
218
219
|
readingRulerPage.steps.verifyCustomColor('#ff0000', 'rgba(255, 0, 0, 0.5)');
|
219
220
|
readingRulerPage.steps.verifyColorBlockUnSelectedState(5);
|
@@ -26,8 +26,8 @@ describe('Create item page - Short text response: All or nothing', () => {
|
|
26
26
|
|
27
27
|
it('When the user sets correct answer and allots points in specify correct answer section, then the alloted points should be displayed in the preview tab', () => {
|
28
28
|
shortTextResponsePage.steps.switchToEditTab();
|
29
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Buildings');
|
30
29
|
shortTextResponsePage.steps.allotPoints(20);
|
30
|
+
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Buildings');
|
31
31
|
shortTextResponsePage.steps.switchToPreviewTab();
|
32
32
|
shortTextResponsePage.steps.verifyPreviewScore(0, 20);
|
33
33
|
});
|
package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js
CHANGED
@@ -83,12 +83,12 @@ export const drawingToolbarOptionsAndAdditionalOptions = {
|
|
83
83
|
toolType: 'tool'
|
84
84
|
},
|
85
85
|
{
|
86
|
-
displayName: '
|
86
|
+
displayName: 'bring to front',
|
87
87
|
tooltipText: 'Bring forwardBring selected item forward a layer',
|
88
88
|
toolType: 'action'
|
89
89
|
},
|
90
90
|
{
|
91
|
-
displayName: '
|
91
|
+
displayName: 'sent to back',
|
92
92
|
tooltipText: 'Bring backwardSend selected item back a layer',
|
93
93
|
toolType: 'action'
|
94
94
|
},
|
@@ -54,7 +54,8 @@ const selectors = {
|
|
54
54
|
compactPreviewRetakeButton: () => cy.get('.play-back-btn-wrapper .record-button'),
|
55
55
|
compactPreviewPlayPlaybackButton: () => cy.get('.play-back-btn-wrapper .play-back-button'),
|
56
56
|
compactPreviewPausePlaybackButton: () => cy.get('.play-back-btn-wrapper .play-back-button'),
|
57
|
-
compactPreviewRecordingHelpText: () => cy.get('.minimal-
|
57
|
+
compactPreviewRecordingHelpText: () => cy.get('.minimal-record-helper-text-wrapper'),
|
58
|
+
compactPreviewRecordingStatusText: () => cy.get('.minimal-recording-text'),
|
58
59
|
compactPreviewRecorderHelpText: () => cy.get('.response-recorded'),
|
59
60
|
compactPreviewRecordingTimer: () => cy.get('.minimal-recording-timer'),
|
60
61
|
compactPreviewVolumeMeter: () => cy.get('.audio-volume-meter-wrapper'),
|
@@ -77,12 +78,12 @@ const selectors = {
|
|
77
78
|
controlsForPlaybackPlaybackSpeedButton: () => cy.get('[data-ngie-testid="playback-speed-toggle-button"]'),
|
78
79
|
controlsForPlaybackPlaybackSpeedButtonLabel: () => cy.get('.customize-accordion [class*="CustomizeToolbarSelectionstyles__Label"]').eq(4),
|
79
80
|
//Audio indicators
|
81
|
+
audioIndicatorsTimerButton: () => cy.get('[data-ngie-testid="timer-toggle-button"]'),
|
82
|
+
audioIndicatorsTimerButtonLabel: () => cy.get('.audio-indicator .control-footer').eq(0),
|
80
83
|
audioIndicatorsProgressIndicatorButton: () => cy.get('[data-ngie-testid="progress-indicator-toggle-button"]'),
|
81
|
-
audioIndicatorsProgressIndicatorButtonLabel: () => cy.get('.audio-indicator .control-footer').eq(
|
84
|
+
audioIndicatorsProgressIndicatorButtonLabel: () => cy.get('.audio-indicator .control-footer').eq(1),
|
82
85
|
audioIndicatorsAudioWaveButton: () => cy.get('[data-ngie-testid="audio-wave-toggle-button"]'),
|
83
|
-
audioIndicatorsAudioWaveButtonLabel: () => cy.get('.audio-indicator .control-footer').eq(
|
84
|
-
audioIndicatorsTimerButton: () => cy.get('[data-ngie-testid="timer-toggle-button"]'),
|
85
|
-
audioIndicatorsTimerButtonLabel: () => cy.get('.audio-indicator .control-footer').eq(2),
|
86
|
+
audioIndicatorsAudioWaveButtonLabel: () => cy.get('.audio-indicator .control-footer').eq(2),
|
86
87
|
audioIndicatorsVolumeMeterButton: () => cy.get('[data-ngie-testid="volume-meter-toggle-button"]'),
|
87
88
|
audioIndicatorsVolumeMeterButtonLabel: () => cy.get('.audio-indicator .control-footer').eq(3),
|
88
89
|
audioIndicatorsLabel: () => cy.get('.audio-indicator .response-playback-title'),
|
@@ -306,7 +307,7 @@ const steps = {
|
|
306
307
|
.then(($timer) => {
|
307
308
|
const currentTimer = $timer.split(' / ')[0];
|
308
309
|
const currentSeconds = parseInt(currentTimer.split(':')[1], 10);
|
309
|
-
expect(currentSeconds).to.be.
|
310
|
+
expect(currentSeconds).to.be.closeTo(3, 1);
|
310
311
|
});
|
311
312
|
},
|
312
313
|
|
@@ -700,6 +701,12 @@ const steps = {
|
|
700
701
|
});
|
701
702
|
},
|
702
703
|
|
704
|
+
selectAudioIndicatorsAudioWaveButton: () => {
|
705
|
+
audioResponsePage.audioIndicatorsAudioWaveButton()
|
706
|
+
.click()
|
707
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
708
|
+
},
|
709
|
+
|
703
710
|
deselectAudioIndicatorsVolumeMeterButton: () => {
|
704
711
|
audioResponsePage.audioIndicatorsVolumeMeterButton()
|
705
712
|
.click()
|
@@ -437,25 +437,7 @@ const tests = {
|
|
437
437
|
cy.checkAccessibility(commonComponents.dropdownList());
|
438
438
|
});
|
439
439
|
|
440
|
-
it(`When the user hovers over the \'${penaltyScoringTypeArray[1]}\', a tooltip \'Penalty points for the entire question\' should be displayed and on moving away the focus, the tooltip should disappear`, () => {
|
441
|
-
utilities.hoverOverElement(autoScoredScoringSectionMultiResponseType.penaltyScoringDropdownListOptions('Penalty points for the entire question'));
|
442
|
-
utilities.verifyTextContent(commonComponents.tooltipText(), 'Penalty points for the entire question');
|
443
|
-
utilities.verifyElementVisibilityState(commonComponents.tooltipText(), 'visible');
|
444
|
-
utilities.hoverAwayFromElement();
|
445
|
-
utilities.verifyElementVisibilityState(commonComponents.tooltipText(), 'notExist');
|
446
|
-
});
|
447
|
-
|
448
|
-
it(`When the user hovers over the \'${penaltyScoringTypeArray[2]}\', a tooltip \'${penaltyScoringTypeArray[2]}\' should be displayed and on moving away the focus, the tooltip should disappear`, () => {
|
449
|
-
autoScoredScoringSectionMultiResponseType.steps.expandPenaltyScoringDropdown();
|
450
|
-
utilities.hoverOverElement(autoScoredScoringSectionMultiResponseType.penaltyScoringDropdownListOptions(`${penaltyScoringTypeArray[2]}`));
|
451
|
-
utilities.verifyTextContent(commonComponents.tooltipText(), `${penaltyScoringTypeArray[2]}`);
|
452
|
-
utilities.verifyElementVisibilityState(commonComponents.tooltipText(), 'visible');
|
453
|
-
utilities.hoverAwayFromElement();
|
454
|
-
utilities.verifyElementVisibilityState(commonComponents.tooltipText(), 'notExist');
|
455
|
-
});
|
456
|
-
|
457
440
|
it('On selecting an option from the penalty scoring dropdown, the dropdown should close', () => {
|
458
|
-
autoScoredScoringSectionMultiResponseType.steps.expandPenaltyScoringDropdown();
|
459
441
|
autoScoredScoringSectionMultiResponseType.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
460
442
|
utilities.verifyElementVisibilityState(commonComponents.dropdownList(), 'notExist');
|
461
443
|
});
|
@@ -546,16 +528,7 @@ const tests = {
|
|
546
528
|
cy.checkAccessibility(commonComponents.dropdownList())
|
547
529
|
});
|
548
530
|
|
549
|
-
it(`When the user hovers over the \'${roundingTypeArray[3]}\', a tooltip \'Round down if <= 0.50; Round up if > 0.50\' should be displayed and on moving away the focus, the tooltip should disappear`, () => {
|
550
|
-
utilities.hoverOverElement(autoScoredScoringSectionMultiResponseType.roundingDropdownListOptions('round down if <= 0.50; Round up if > 0.50'));
|
551
|
-
utilities.verifyInnerText(commonComponents.tooltipText(), 'Round down if <= 0.50; Round up if > 0.50');
|
552
|
-
utilities.verifyElementVisibilityState(commonComponents.tooltipText(), 'visible');
|
553
|
-
utilities.hoverAwayFromElement();
|
554
|
-
utilities.verifyElementVisibilityState(commonComponents.tooltipText(), 'notExist');
|
555
|
-
});
|
556
|
-
|
557
531
|
it('On selecting an option from the rounding dropdown, the dropdown should close', () => {
|
558
|
-
autoScoredScoringSectionMultiResponseType.steps.expandRoundingDropdown();
|
559
532
|
autoScoredScoringSectionMultiResponseType.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
|
560
533
|
utilities.verifyElementVisibilityState(commonComponents.dropdownList(), 'notExist');
|
561
534
|
});
|
@@ -189,7 +189,7 @@ const tests = {
|
|
189
189
|
helpText = 'You can set the correct answer by entering the correct answer(s) in the response area(s).';
|
190
190
|
break;
|
191
191
|
case 'fill in the gaps over image - dropdown':
|
192
|
-
helpText = 'You can set the correct answer by selecting the correct
|
192
|
+
helpText = 'You can set the correct answer by selecting the correct option.';
|
193
193
|
break;
|
194
194
|
case 'text entry math':
|
195
195
|
helpText = 'You can set the correct answer by entering the correct answer in the input field(s).';
|
@@ -273,7 +273,7 @@ const tests = {
|
|
273
273
|
'font-size': css.fontSize.small,
|
274
274
|
'font-weight': css.fontWeight.regular
|
275
275
|
});
|
276
|
-
utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon()
|
276
|
+
utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), {
|
277
277
|
'fill': css.color.errorText
|
278
278
|
});
|
279
279
|
});
|
@@ -7,7 +7,7 @@ const selectors = {
|
|
7
7
|
tooltipText: () => cy.get('[class*="MuiTooltip-tooltip"]'),
|
8
8
|
snackbar: () => cy.get('.MuiSnackbarContent-message'),
|
9
9
|
snackbarCloseButton: () => cy.get('.MuiSnackbarContent-action'),
|
10
|
-
errorMessage: () => cy.get('
|
10
|
+
errorMessage: () => cy.get('.error-text-message'),
|
11
11
|
nextGenCreateItemWrapper: () => cy.get('#nextgen-assess-create-item'),
|
12
12
|
dropdownList: () => cy.get('.dropdown-list'),
|
13
13
|
dragHandleButton: () => cy.get('.dragicon-button'),
|
@@ -547,7 +547,7 @@ const steps = {
|
|
547
547
|
* @param {string} text denotes tooltip text
|
548
548
|
* @description function is used to hover over element and verify innertext of its tooltip
|
549
549
|
*/
|
550
|
-
verifyTooltipInnerText: (element, text, index=null) => {
|
550
|
+
verifyTooltipInnerText: (element, text, index = null) => {
|
551
551
|
element()
|
552
552
|
.eq(index)
|
553
553
|
.trigger('mouseover', { force: true });
|
@@ -105,7 +105,7 @@ const steps = {
|
|
105
105
|
.then(($value) => {
|
106
106
|
const value = $value[0].valueAsNumber
|
107
107
|
cy.log('The assertion is verifying the value synchronously i.e in real time')
|
108
|
-
expect(value).to.be.
|
108
|
+
expect(value).to.be.closeTo(sliderPositionToCompare, 10);
|
109
109
|
});
|
110
110
|
},
|
111
111
|
|
@@ -274,9 +274,11 @@ const tests = {
|
|
274
274
|
utilities.verifyElementCount(playbackControlsBaseComponent.playbackSpeedOption(), 4);
|
275
275
|
playbackControlsBaseComponent.steps.verifyPlaybackSpeedListOptions();
|
276
276
|
playbackControlsBaseComponent.steps.verifyPlaybackSpeedOptionSelectedState('1x');
|
277
|
+
utilities.hoverAwayFromElement();
|
277
278
|
});
|
278
279
|
|
279
280
|
it('CSS of playback speed options', { tags: 'css' }, () => {
|
281
|
+
utilities.hoverOverElement(playbackControlsBaseComponent.playbackSpeedButton());
|
280
282
|
utilities.verifyCSS(playbackControlsBaseComponent.playbackSpeedButton().find('[id="playback-speed"] path'), {
|
281
283
|
'fill': css.color.activeButtons
|
282
284
|
});
|
@@ -299,16 +299,7 @@ const tests = {
|
|
299
299
|
cy.checkAccessibility(commonComponents.dropdownList())
|
300
300
|
});
|
301
301
|
|
302
|
-
it(`When the user hovers over the \'${minimumScoringTypeArray[2]}\', a tooltip \'Award minimum score only if attempted\' should be displayed and on moving away the focus, the tooltip should disappear`, () => {
|
303
|
-
utilities.hoverOverElement(scoringSectionBaseEditTab.minimumScoringDropdownListOptions('Award minimum score only if attempted'));
|
304
|
-
utilities.verifyTextContent(commonComponents.tooltipText(), 'Award minimum score only if attempted');
|
305
|
-
utilities.verifyElementVisibilityState(commonComponents.tooltipText(), 'visible');
|
306
|
-
utilities.hoverAwayFromElement();
|
307
|
-
utilities.verifyElementVisibilityState(commonComponents.tooltipText(), 'notExist');
|
308
|
-
});
|
309
|
-
|
310
302
|
it('On selecting an option from the minimum scoring dropdown, the dropdown should close', () => {
|
311
|
-
scoringSectionBaseEditTab.steps.expandMinimumScoringDropdown();
|
312
303
|
scoringSectionBaseEditTab.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
313
304
|
utilities.verifyElementVisibilityState(commonComponents.dropdownList(), 'notExist');
|
314
305
|
});
|
@@ -191,7 +191,7 @@ const selectors = {
|
|
191
191
|
|
192
192
|
//TODO: Shift all preview tab special characters popup related selectors/steps to a common component file once https://redmine.zeuslearning.com/issues/559296 is resolved
|
193
193
|
//Special characters popup
|
194
|
-
specialCharactersPopupCategoryTitle: () => cy.get('[class*="characters__container"] [class
|
194
|
+
specialCharactersPopupCategoryTitle: () => cy.get('[class*="characters__container"] [class="drawing-tool-options__options__accordion__header"]'),
|
195
195
|
specialCharactersPopupCategoryAccordionIcon: () => cy.get('[class*="characters__container"] [aria-label="AccordionIcon"]'),
|
196
196
|
|
197
197
|
//Edit tab color picker popup
|
@@ -537,7 +537,7 @@ const steps = {
|
|
537
537
|
|
538
538
|
clickOnSecondaryPopupSlider: () => {
|
539
539
|
drawingResponsePage.previewTabSecondaryPopupOpacitySlider()
|
540
|
-
.
|
540
|
+
.realClick();
|
541
541
|
},
|
542
542
|
|
543
543
|
/**
|
@@ -175,9 +175,9 @@ const steps = {
|
|
175
175
|
clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection: (optionText) => {
|
176
176
|
fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
|
177
177
|
.contains(optionText)
|
178
|
-
.click();
|
179
|
-
draggableOptionContainer.optionsContainerSpecifyCorrectAnswerSection()
|
180
178
|
.click({ force: true });
|
179
|
+
draggableOptionContainer.optionsContainerSpecifyCorrectAnswerSection()
|
180
|
+
.click();
|
181
181
|
},
|
182
182
|
|
183
183
|
/**
|
@@ -431,8 +431,7 @@ const steps = {
|
|
431
431
|
fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
|
432
432
|
.eq(responseAreaIndex)
|
433
433
|
.within(() => {
|
434
|
-
draggableOptionContainer.draggableOptionDragIcon()
|
435
|
-
.should('not.exist');
|
434
|
+
utilities.verifyElementVisibilityState(draggableOptionContainer.draggableOptionDragIcon(), 'hidden')
|
436
435
|
});
|
437
436
|
},
|
438
437
|
|
@@ -497,8 +496,7 @@ const steps = {
|
|
497
496
|
fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
|
498
497
|
.eq(responseAreaIndex)
|
499
498
|
.within(() => {
|
500
|
-
draggableOptionContainer.draggableOptionDragIcon()
|
501
|
-
.should('not.exist');
|
499
|
+
utilities.verifyElementVisibilityState(draggableOptionContainer.draggableOptionDragIcon(), 'hidden')
|
502
500
|
});
|
503
501
|
},
|
504
502
|
|
@@ -577,7 +575,7 @@ const steps = {
|
|
577
575
|
.and('not.have.css', 'left');
|
578
576
|
}
|
579
577
|
else {
|
580
|
-
|
578
|
+
fillInTheGapsOverImageDragAndDropPage.dropzonePointerInPreviewTab()
|
581
579
|
.eq(dropzoneIndex)
|
582
580
|
.should('have.css', 'top', expectedPosition.top)
|
583
581
|
.and('have.css', 'left', expectedPosition.left);
|
@@ -590,17 +588,17 @@ const steps = {
|
|
590
588
|
*/
|
591
589
|
verifyCanvasWidthInPreviewTab: (width) => {
|
592
590
|
fillInTheGapsOverImageDragAndDropPage.canvasInPreviewTab()
|
593
|
-
|
594
|
-
|
591
|
+
.should('have.attr', 'width', width);
|
592
|
+
},
|
595
593
|
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
594
|
+
/**
|
595
|
+
* @param {*} height height of canvas
|
596
|
+
* @description this function verifies height of canvas
|
597
|
+
*/
|
598
|
+
verifyCanvasHeightInPreviewTab: (height) => {
|
601
599
|
fillInTheGapsOverImageDragAndDropPage.canvasInPreviewTab()
|
602
|
-
|
603
|
-
|
600
|
+
.should('have.css', 'height', `${height}px`);
|
601
|
+
},
|
604
602
|
|
605
603
|
|
606
604
|
verifyDropzoneNotExistInPreviewTab: () => {
|
@@ -2,17 +2,22 @@ import utilities from "../support/helpers/utilities";
|
|
2
2
|
import { figOverImageCanvasComponent, autoScoredScoringPreviewTab, optionsWrapperComponent, commonComponents, createQuestionBasePage, backgroundImageUploadComponent, scoringSectionBaseEditTab, questionInstructionsComponent, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType } from "./components";
|
3
3
|
const css = Cypress.env('css');
|
4
4
|
|
5
|
+
const optionsForDropdown = ['Flower', 'Petal', 'Stem', 'Branch'];
|
6
|
+
|
5
7
|
const selectors = {
|
6
8
|
...questionInstructionsComponent,
|
7
9
|
...figOverImageCanvasComponent,
|
8
10
|
...autoScoredScoringPreviewTab,
|
9
11
|
...correctIncorrectAnswerLabelComponent,
|
12
|
+
...autoScoredScoringSectionMultiResponseType,
|
13
|
+
...autoScoredSpecifyCorrectAnswerSection,
|
10
14
|
//Dropdown options section
|
11
15
|
dropdownOptionsTab: () => cy.get('.ngie-tablist-tab-button[data-ngie-testid*="dropdown"]'),
|
12
16
|
dropdownOptionsInputField: () => cy.get('.input-editable input[type*="text"]'),
|
13
17
|
|
14
18
|
//Specify correct answer dropdown
|
15
19
|
dropdownSpecifyCorrectAnswerSection: () => cy.get('.response-dropdown [role="combobox"]'),
|
20
|
+
dropdownLabelSpecifyCorrectAnswerSection: () => cy.get('.response-label'),
|
16
21
|
|
17
22
|
//Dropdown list
|
18
23
|
dropdownListOptions: (ariaLabel = null) => {
|
@@ -87,7 +92,7 @@ const steps = {
|
|
87
92
|
/**
|
88
93
|
* @param {number} dropdownIndex Index of the dropdown
|
89
94
|
* @param {string} dropdownOption Option to be selected in the dropdown
|
90
|
-
* @description Select option from dropdown in
|
95
|
+
* @description Select option from dropdown in specify correct answer section
|
91
96
|
*/
|
92
97
|
selectResponseFromDropdownSpecifyCorrectAnswerSection: (dropdownIndex, dropdownOption) => {
|
93
98
|
fillInTheGapsOverImageDropdownPage.steps.expandResponseDropdownInSpecifyCorrectAnswerSection(dropdownIndex)
|
@@ -106,8 +111,8 @@ const steps = {
|
|
106
111
|
},
|
107
112
|
|
108
113
|
/**
|
109
|
-
* @param {number} responseDropdownIndex Index of response dropdown in
|
110
|
-
* @description Expand response dropdown in
|
114
|
+
* @param {number} responseDropdownIndex Index of response dropdown in specify correct answer section
|
115
|
+
* @description Expand response dropdown in specify correct answer section
|
111
116
|
*/
|
112
117
|
expandResponseDropdownInSpecifyCorrectAnswerSection: (responseDropdownIndex) => {
|
113
118
|
utilities.getNthElement(fillInTheGapsOverImageDropdownPage.dropdownSpecifyCorrectAnswerSection(), responseDropdownIndex)
|
@@ -116,6 +121,36 @@ const steps = {
|
|
116
121
|
.should('have.attr', 'aria-expanded', 'true');
|
117
122
|
},
|
118
123
|
|
124
|
+
/**
|
125
|
+
* @param {number} responseDropdownIndex Index of response dropdown in specify correct answer section
|
126
|
+
* @description Verify dropdown is expanded in specify correct answer section
|
127
|
+
*/
|
128
|
+
verifyDropdownIsExpandedInSpecifyCorrectAnswerSection: (responseDropdownIndex) => {
|
129
|
+
utilities.getNthElement(fillInTheGapsOverImageDropdownPage.dropdownSpecifyCorrectAnswerSection(), responseDropdownIndex)
|
130
|
+
.should('have.attr', 'aria-expanded', 'true');
|
131
|
+
},
|
132
|
+
|
133
|
+
/**
|
134
|
+
* @param {number} responseDropdownIndex Index of response dropdown in specify correct answer section
|
135
|
+
* @description Verify dropdown is collapsed in specify correct answer section
|
136
|
+
*/
|
137
|
+
verifyDropdownIsCollapsedInSpecifyCorrectAnswerSection: (responseDropdownIndex) => {
|
138
|
+
utilities.getNthElement(fillInTheGapsOverImageDropdownPage.dropdownSpecifyCorrectAnswerSection(), responseDropdownIndex)
|
139
|
+
.should('have.attr', 'aria-expanded', 'false');
|
140
|
+
utilities.verifyElementVisibilityState(commonComponents.dropdownList(), 'notExist');
|
141
|
+
},
|
142
|
+
|
143
|
+
/**
|
144
|
+
* @param {number} responseDropdownIndex Index of response dropdown in specify correct answer section
|
145
|
+
* @description Expand and collapse dropdown in specify correct answer section
|
146
|
+
*/
|
147
|
+
expandAndCollapseDropdownInSpecifyCorrectAnswerSection: (responseDropdownIndex) => {
|
148
|
+
utilities.getNthElement(fillInTheGapsOverImageDropdownPage.dropdownSpecifyCorrectAnswerSection(), responseDropdownIndex)
|
149
|
+
.click({ position: "right" });
|
150
|
+
cy.get('body')
|
151
|
+
.click();
|
152
|
+
},
|
153
|
+
|
119
154
|
/**
|
120
155
|
* @param {Object[]} CorrectAnswerArray - An array of objects containing the dropdownIndex and dropdownOption to be selected.
|
121
156
|
* @param {number} CorrectAnswerArray[].dropdownIndex - The index of dropdown in preview tab
|
@@ -243,10 +278,84 @@ const steps = {
|
|
243
278
|
verifyDropdownIsDisabled: (dropdownIndex) => {
|
244
279
|
utilities.verifyElementDisabledClass(utilities.getNthElement(fillInTheGapsOverImageDropdownPage.dropdownPreviewTab(), dropdownIndex));
|
245
280
|
},
|
281
|
+
|
282
|
+
verifyPointsPerResponseLabel: () => {
|
283
|
+
utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'Points per response: -');
|
284
|
+
utilities.verifyElementVisibilityState(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'visible');
|
285
|
+
},
|
286
|
+
|
287
|
+
/**
|
288
|
+
* @description Verify points per response score displayed for partial equal weights
|
289
|
+
* @param {number} pointsPerResponse points per response score
|
290
|
+
*/
|
291
|
+
verifyPartialEqualWeightsPointsPerResponseScore: (pointsPerResponse) => {
|
292
|
+
utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), `Points per response: ${pointsPerResponse}`);
|
293
|
+
},
|
246
294
|
}
|
247
295
|
|
248
296
|
const tests = {
|
249
297
|
...autoScoredScoringPreviewTab.tests,
|
298
|
+
...autoScoredSpecifyCorrectAnswerSection.tests,
|
299
|
+
...scoringSectionBaseEditTab.tests,
|
300
|
+
...autoScoredScoringSectionMultiResponseType.tests,
|
301
|
+
/**
|
302
|
+
* Verifies the contents and functionality of the 'Specify correct answer' accordion for fill in the gaps over image dropdown question.
|
303
|
+
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
304
|
+
* @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
305
|
+
*/
|
306
|
+
verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
|
307
|
+
it(`When user has added a response token in image, then its corresponding dropdown \'Dropdown 1\' should be displayed in the ${accordionName} accordion in collapsed state`, () => {
|
308
|
+
utilities.verifyElementCount(fillInTheGapsOverImageDropdownPage.dropdownSpecifyCorrectAnswerSection(), 1);
|
309
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownIsCollapsedInSpecifyCorrectAnswerSection(0);
|
310
|
+
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDropdownPage.dropdownLabelSpecifyCorrectAnswerSection(), 0), 'Dropdown 1');
|
311
|
+
});
|
312
|
+
|
313
|
+
it('When user expands and collapses the dropdown without selecting any option, \'Error: Please set a correct answer.\' error message should be displayed', () => {
|
314
|
+
fillInTheGapsOverImageDropdownPage.steps.expandAndCollapseDropdownInSpecifyCorrectAnswerSection(0);
|
315
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
|
316
|
+
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
|
317
|
+
});
|
318
|
+
|
319
|
+
it('When the user selects any option from the dropdown, then error message should disappear and that option should be displayed on the dropdown', () => {
|
320
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, optionsForDropdown[0]);
|
321
|
+
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
322
|
+
});
|
323
|
+
|
324
|
+
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
325
|
+
|
326
|
+
it(`CSS of ${accordionName} accordion contents`, { tags: 'css' }, () => {
|
327
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.dropdownLabelSpecifyCorrectAnswerSection(), {
|
328
|
+
'color': css.color.labels,
|
329
|
+
'font-size': css.fontSize.default,
|
330
|
+
'font-weight': css.fontWeight.regular
|
331
|
+
});
|
332
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.dropdownSpecifyCorrectAnswerSection(), {
|
333
|
+
'background-color': css.color.figActiveComponentBg,
|
334
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
335
|
+
});
|
336
|
+
//CSS of selected dropdown option which appears on dropdown
|
337
|
+
utilities.verifyCSS(fillInTheGapsOverImageDropdownPage.dropdownSpecifyCorrectAnswerSection(), {
|
338
|
+
'color': css.color.liText,
|
339
|
+
'font-size': css.fontSize.default,
|
340
|
+
'font-weight': css.fontWeight.regular
|
341
|
+
});
|
342
|
+
});
|
343
|
+
|
344
|
+
it(`Accessibility of ${accordionName} accordion contents`, { tags: 'a11y' }, () => {
|
345
|
+
cy.checkAccessibility(utilities.getNthElement(fillInTheGapsOverImageDropdownPage.dropdownSpecifyCorrectAnswerSection(), 0).parents('[aria-label="Specify correct answer section"]'));
|
346
|
+
});
|
347
|
+
},
|
348
|
+
|
349
|
+
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
350
|
+
it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
|
351
|
+
fillInTheGapsOverImageDropdownPage.dropdownSpecifyCorrectAnswerSection()
|
352
|
+
.each(($element, index) => {
|
353
|
+
utilities.verifyElementVisibilityState(cy.wrap($element), 'visible');
|
354
|
+
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDropdownPage.dropdownLabelSpecifyCorrectAnswerSection(), index), `Dropdown ${index + 1}`);
|
355
|
+
utilities.verifyElementVisibilityState(utilities.getNthElement(fillInTheGapsOverImageDropdownPage.dropdownLabelSpecifyCorrectAnswerSection(), index), 'visible');
|
356
|
+
})
|
357
|
+
});
|
358
|
+
},
|
250
359
|
}
|
251
360
|
|
252
361
|
export const fillInTheGapsOverImageDropdownPage = {
|