itemengine-cypress-automation 1.0.82 → 1.0.84
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DesmosGraphing/previewTabContent.smoke.js +3 -3
- package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +30 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingGroupedScoring.js +158 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsBasic.js +3 -163
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsBasic.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +43 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +510 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +678 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/draggableOptions.js +7 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +7 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +82 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/manuallyAndNonScoredEditTab.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +198 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +11 -11
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettingsForGroupedLayout.js +263 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/switchingCasesBetweenOptionsLayout.js +1 -1
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingPenaltyScoring.js +1 -1
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsBasic.js +3 -3
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsBasic.js +2 -2
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +4 -4
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +80 -0
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/allOrNothingForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/editTabScoringSection.js +10 -10
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/Protractor/protractorEditTabBasicsSection.js +2 -0
- package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +2 -0
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +177 -171
- package/cypress/pages/components/backgroundImageUploadComponent.js +19 -3
- package/cypress/pages/components/draggableOptionContainer.js +13 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +175 -25
- package/cypress/pages/components/figOverImageCanvasComponent.js +257 -0
- package/cypress/pages/components/imageActionsComponent.js +30 -0
- package/cypress/pages/components/index.js +5 -5
- package/cypress/pages/components/measuringToolComponent.js +0 -54
- package/cypress/pages/components/opacityComponent.js +64 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +16 -1
- package/cypress/pages/essayResponsePage.js +5 -7
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +152 -11
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +7 -6
- package/cypress/pages/protractorPage.js +3 -1
- package/cypress/pages/rulerPage.js +5 -24
- package/cypress/pages/selectQuestionResourceToolPage.js +1 -1
- package/package.json +1 -1
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingPenaltyScoring.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/manuallyAndNonScoredScoring.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionBasic.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneBasic.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneMinimumAndPenaltyScoring.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/allOrNothingBasicForAllViews.smoke.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/checkAnswerFunctionalityForAllViews.smoke.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/clickAndDrop.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/draggableOptions.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/editTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/editTabScoring.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/headerSection.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/manuallyAndNonScoredScoringEditTab.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/previewContentsForAllViews.smoke.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/specifyCorrectAnswerSection.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/studentViewSettings.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/studentViewSettingsForGroupedLayout.js +0 -0
- /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/switchingCasesBetweenOptionsLayout.js +0 -0
package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettingsForGroupedLayout.js
ADDED
@@ -0,0 +1,263 @@
|
|
1
|
+
import { fillInTheGapsOverImageDragAndDropPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
let flowers = [['Flower', 'Petals', 'Seed', 'Pollen'],
|
4
|
+
['Leaflet', 'Leaves', 'Leaf', 'Green'],
|
5
|
+
['Stem', 'Branch', 'Trunk', 'Tree'],
|
6
|
+
['Rose', 'Lily', 'Orchid', 'Tulip']
|
7
|
+
];
|
8
|
+
let groupTitles = ['Group A', 'Group B', 'Group C', 'Group D'];
|
9
|
+
|
10
|
+
describe('Create Item page - Fill in the gaps over image - drag and drop: Student view settings for grouped options layout', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
describe('Randomize options - Functionality : Edit tab', () => {
|
16
|
+
abortEarlySetup();
|
17
|
+
before(() => {
|
18
|
+
cy.log('Navigate to fill in the gaps over image - drag and drop question type');
|
19
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
20
|
+
cy.barsPreLoaderWait();
|
21
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
|
22
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
23
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
|
24
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
|
25
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
|
26
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
|
27
|
+
fillInTheGapsOverImageDragAndDropPage.steps.setGroupedOptions();
|
28
|
+
});
|
29
|
+
|
30
|
+
it('When the \'Randomize options\' functionality is disabled, then the group container as well as the options inside the group should be displayed in the order in which the user has set them in the \'Options for drag & drop\' section', () => {
|
31
|
+
flowers.forEach((options, index) => {
|
32
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(index, options);
|
33
|
+
});
|
34
|
+
});
|
35
|
+
|
36
|
+
it('When the user enables the \'Randomize options\' functionality, then the group container as well as the options inside the group should be in the order in which the user has set them in the \'Options for drag & drop\' section', () => {
|
37
|
+
fillInTheGapsOverImageDragAndDropPage.steps.checkRandomizeOptionsCheckbox();
|
38
|
+
flowers.forEach((options, index) => {
|
39
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(index, options);
|
40
|
+
});
|
41
|
+
});
|
42
|
+
});
|
43
|
+
|
44
|
+
describe('Randomize options - Functionality : Preview tab', () => {
|
45
|
+
let optionsArray = [];
|
46
|
+
let groupTitleArray = [];
|
47
|
+
abortEarlySetup();
|
48
|
+
before(() => {
|
49
|
+
cy.log('Navigate to fill in the gaps over image - drag and drop question type');
|
50
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
51
|
+
cy.barsPreLoaderWait();
|
52
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
|
53
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
54
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
|
55
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
|
56
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
|
57
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
|
58
|
+
fillInTheGapsOverImageDragAndDropPage.steps.setGroupedOptions();
|
59
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the \'Randomize options\' functionality is disabled, then the group container as well as the options inside the group should be displayed in the order in which the user has set them in the \'Options for drag & drop\' section', () => {
|
63
|
+
groupTitles.forEach((groupTitle, groupIndex) => {
|
64
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedOptionsTitlePreviewTab(groupIndex, groupTitle);
|
65
|
+
})
|
66
|
+
flowers.forEach((options, index) => {
|
67
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(index, options);
|
68
|
+
});
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When the user enables the \'Randomize options\' functionality, then the group container as well as the options inside the group should be displayed in a random order', () => {
|
72
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
|
73
|
+
fillInTheGapsOverImageDragAndDropPage.steps.checkRandomizeOptionsCheckbox();
|
74
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
75
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRandomizationOfGroupsInPreviewTab(groupTitles);
|
76
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[0], flowers[0]);
|
77
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[1], flowers[1]);
|
78
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[2], flowers[2]);
|
79
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[3], flowers[3]);
|
80
|
+
optionsArray = fillInTheGapsOverImageDragAndDropPage.steps.getOptionsArray();
|
81
|
+
groupTitleArray = fillInTheGapsOverImageDragAndDropPage.steps.getGroupTitleArray();
|
82
|
+
});
|
83
|
+
|
84
|
+
it('When the user switches to \'Edit tab\' and does not modify any question properties, then the order of group containers as well as the options inside the group should not change', () => {
|
85
|
+
fillInTheGapsOverImageDragAndDropPage.steps.resetQuestionPreview();
|
86
|
+
groupTitleArray.forEach((groupTitle, groupIndex) => {
|
87
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedOptionsTitlePreviewTab(groupIndex, groupTitle);
|
88
|
+
});
|
89
|
+
flowers.forEach((options, index) => {
|
90
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(index, options);
|
91
|
+
});
|
92
|
+
});
|
93
|
+
|
94
|
+
it('When the user switches to \'Edit tab\' and modifies any of question properties, then the order of group containers as well as the options inside the group should change', () => {
|
95
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
|
96
|
+
fillInTheGapsOverImageDragAndDropPage.steps.allotPoints(5);
|
97
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
98
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRandomizationOfGroupsInPreviewTab(groupTitles);
|
99
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[0], flowers[0]);
|
100
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[1], flowers[1]);
|
101
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[2], flowers[2]);
|
102
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[3], flowers[3]);
|
103
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionsAreRerandomized(optionsArray);
|
104
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupsAreRerandomized(groupTitleArray);
|
105
|
+
});
|
106
|
+
|
107
|
+
it('When the user disables the \'Randomize options\' functionality, then the order of group containers as well as the options inside the group should be displayed in the order in which the user has set them in the \'Options for drag & drop\' section', () => {
|
108
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
|
109
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uncheckRandomizeOptionsCheckbox();
|
110
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
111
|
+
flowers.forEach((options, index) => {
|
112
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(index, options);
|
113
|
+
});
|
114
|
+
});
|
115
|
+
});
|
116
|
+
|
117
|
+
describe('Allow multiple instances of same draggable option - Functionality : Edit tab', () => {
|
118
|
+
abortEarlySetup();
|
119
|
+
before(() => {
|
120
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
121
|
+
cy.barsPreLoaderWait();
|
122
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
|
123
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
124
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
|
125
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
|
126
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
|
127
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
|
128
|
+
fillInTheGapsOverImageDragAndDropPage.steps.expandDraggableOptionsLayoutDropdown();
|
129
|
+
fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromDraggableOptionsLayoutDropdown('Grouped');
|
130
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addGroupTitle(groupTitles[0]);
|
131
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addMultipleOptionFields(2);
|
132
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(flowers[0]);
|
133
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addGroupWithTitleAndOptionsInDraggableOptionsSection(groupTitles[1], flowers[1]);
|
134
|
+
});
|
135
|
+
|
136
|
+
it('When the \'Allow multiple instances of same draggable option\' functionality is disabled, then on setting correct answer in the dropzone, the draggable options should get removed from the respective group of the options container', () => {
|
137
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Flower': 0 });
|
138
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, ['Petals', 'Seed', 'Pollen']);
|
139
|
+
});
|
140
|
+
|
141
|
+
it('When the user enables the \'Allow multiple instances of same draggable option\' functionality, then on setting correct answer in the dropzone, the draggable options should persist in respective group of the options container', () => {
|
142
|
+
fillInTheGapsOverImageDragAndDropPage.steps.checkAllowMultipleInstancesOfSameDraggableOptionCheckbox();
|
143
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Leaves': 1 });
|
144
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInSpecifyCorrectAnswerSection(1, ['Leaves']);
|
145
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, flowers[0]);
|
146
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, flowers[1]);
|
147
|
+
});
|
148
|
+
|
149
|
+
it('The user should be able to use the same draggable option for multiple dropzones', () => {
|
150
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Leaves': 2 });
|
151
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInSpecifyCorrectAnswerSection(1, ['Leaves']);
|
152
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInSpecifyCorrectAnswerSection(2, ['Leaves']);
|
153
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, flowers[0]);
|
154
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, flowers[1]);
|
155
|
+
});
|
156
|
+
|
157
|
+
it('When the user removes the draggable option and moves it into the options container, only one option should be displayed in the respective group', () => {
|
158
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Leaves');
|
159
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Leaves');
|
160
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, flowers[1]);
|
161
|
+
});
|
162
|
+
|
163
|
+
it('When the user disables the \'Allow multiple instances of same draggable option\' functionality, the duplicate answer set as correct answer should get removed from the dropzone and the draggable option should also not exist in the options container of the \'Set correct answer\' section', () => {
|
164
|
+
cy.log('Pre step: Setting identical options as correct responses')
|
165
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Leaves': 1 });
|
166
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Leaves': 2 });
|
167
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uncheckAllowMultipleInstancesOfSameDraggableOptionCheckbox();
|
168
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInSpecifyCorrectAnswerSection(1, ['Leaves']);
|
169
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDropzoneTextSpecifyCorrectAnswerSection(2, '');
|
170
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, ['Leaflet', 'Leaf', 'Green']);
|
171
|
+
});
|
172
|
+
});
|
173
|
+
|
174
|
+
describe('Allow multiple instances of same draggable option - Functionality: Preview tab', () => {
|
175
|
+
abortEarlySetup();
|
176
|
+
before(() => {
|
177
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
178
|
+
cy.barsPreLoaderWait();
|
179
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
|
180
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
181
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
|
182
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
|
183
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
|
184
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
|
185
|
+
fillInTheGapsOverImageDragAndDropPage.steps.expandDraggableOptionsLayoutDropdown();
|
186
|
+
fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromDraggableOptionsLayoutDropdown('Grouped');
|
187
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addGroupTitle(groupTitles[0]);
|
188
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addMultipleOptionFields(2);
|
189
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(flowers[0]);
|
190
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addGroupWithTitleAndOptionsInDraggableOptionsSection(groupTitles[1], flowers[1]);
|
191
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
192
|
+
});
|
193
|
+
|
194
|
+
it('When the \'Allow multiple instances of same draggable option\' functionality is disabled, then on attempting the question, the draggable options should get removed from the options container', () => {
|
195
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flower': 0 });
|
196
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(0, ['Petals', 'Seed', 'Pollen']);
|
197
|
+
});
|
198
|
+
|
199
|
+
it('When the \'Allow multiple instances of same draggable option\' functionality is enabled, then on attempting the question, the draggable options should persist in the options container', () => {
|
200
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
|
201
|
+
fillInTheGapsOverImageDragAndDropPage.steps.checkAllowMultipleInstancesOfSameDraggableOptionCheckbox();
|
202
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
203
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flower': 0 });
|
204
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionPreviewTab(0, 'Flower');
|
205
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(0, flowers[0]);
|
206
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(1, flowers[1]);
|
207
|
+
});
|
208
|
+
|
209
|
+
it('The user should be able to use the same draggable option for multiple dropzones', () => {
|
210
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 1 });
|
211
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 2 });
|
212
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Leaves']);
|
213
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(2, ['Leaves']);
|
214
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(0, flowers[0]);
|
215
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(1, flowers[1]);
|
216
|
+
});
|
217
|
+
|
218
|
+
it('When the user removes the draggable option and moves it into the options container, only one option should be displayed in the respective group', () => {
|
219
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInPreviewTab('Leaves');
|
220
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInPreviewTab('Leaves');
|
221
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(1, flowers[1]);
|
222
|
+
});
|
223
|
+
|
224
|
+
it('When the user disables the \'Allow multiple instances of same draggable option\' functionality, then on attempting the question, the draggable options should get removed from the options container', () => {
|
225
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
|
226
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uncheckAllowMultipleInstancesOfSameDraggableOptionCheckbox();
|
227
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
228
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 1 });
|
229
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Leaves']);
|
230
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(1, ['Leaflet', 'Leaf', 'Green']);
|
231
|
+
});
|
232
|
+
});
|
233
|
+
|
234
|
+
describe('Allow multiple instances of same draggable option - Scoring', () => {
|
235
|
+
before(() => {
|
236
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
237
|
+
cy.barsPreLoaderWait();
|
238
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
|
239
|
+
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
240
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
|
241
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
|
242
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
|
243
|
+
fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
|
244
|
+
fillInTheGapsOverImageDragAndDropPage.steps.expandDraggableOptionsLayoutDropdown();
|
245
|
+
fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromDraggableOptionsLayoutDropdown('Grouped');
|
246
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addGroupTitle(groupTitles[0]);
|
247
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addMultipleOptionFields(2);
|
248
|
+
fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(flowers[0]);
|
249
|
+
fillInTheGapsOverImageDragAndDropPage.steps.checkAllowMultipleInstancesOfSameDraggableOptionCheckbox();
|
250
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Flower': 0 });
|
251
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Flower': 1 });
|
252
|
+
fillInTheGapsOverImageDragAndDropPage.steps.allotPoints(5);
|
253
|
+
fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
|
254
|
+
});
|
255
|
+
|
256
|
+
it('When the user has set same answer options in the \'Set correct answer\' section, then the user should be awarded full points on attempting the question with reused options', () => {
|
257
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flower': 0 });
|
258
|
+
fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flower': 1 });
|
259
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(5, 5);
|
260
|
+
fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
261
|
+
});
|
262
|
+
});
|
263
|
+
});
|
package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/switchingCasesBetweenOptionsLayout.js
CHANGED
@@ -13,7 +13,7 @@ describe('Create Item Page: Fill in the gaps over image with drag and drop: Swit
|
|
13
13
|
describe('Fill in the gaps over image with drag and drop: Switching cases between \'Standard\' and \'Grouped\' options layout: \'Response Options section\'', () => {
|
14
14
|
abortEarlySetup();
|
15
15
|
before(() => {
|
16
|
-
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
16
|
+
fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
|
17
17
|
cy.barsPreLoaderWait();
|
18
18
|
fillInTheGapsOverImageDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
|
19
19
|
fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
|
@@ -11,7 +11,7 @@ describe('Create item page - Fill in the gaps over image with text: All or nothi
|
|
11
11
|
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
|
12
12
|
abortEarlySetup();
|
13
13
|
before(() => {
|
14
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
14
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
15
15
|
cy.barsPreLoaderWait();
|
16
16
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
17
17
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -9,7 +9,7 @@ describe('Create item page - Fill in the gaps over image with text: All or nothi
|
|
9
9
|
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
|
10
10
|
abortEarlySetup();
|
11
11
|
before(() => {
|
12
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
12
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -11,7 +11,7 @@ describe('Create item page - Fill in the gaps over image with text: All or nothi
|
|
11
11
|
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
|
12
12
|
abortEarlySetup();
|
13
13
|
before(() => {
|
14
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
14
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
15
15
|
cy.barsPreLoaderWait();
|
16
16
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
17
17
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -9,7 +9,7 @@ describe('Create item page -Fill in the gaps over image with text: All or nothin
|
|
9
9
|
describe('Question preview: Auto scored - All or nothing: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
|
10
10
|
abortEarlySetup();
|
11
11
|
before(() => {
|
12
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
12
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -10,7 +10,7 @@ describe('Create Item page - Fill in the gaps over image with text: Manually and
|
|
10
10
|
describe('Question Preview: Manually Scored', () => {
|
11
11
|
abortEarlySetup();
|
12
12
|
before(() => {
|
13
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
13
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
14
14
|
cy.barsPreLoaderWait();
|
15
15
|
fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('fill in the gaps');
|
16
16
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
@@ -36,7 +36,7 @@ describe('Create Item page - Fill in the gaps over image with text: Manually and
|
|
36
36
|
describe('Question Preview: Non Scored', () => {
|
37
37
|
abortEarlySetup();
|
38
38
|
before(() => {
|
39
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
39
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
40
40
|
cy.barsPreLoaderWait();
|
41
41
|
fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('fill in the gaps');
|
42
42
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
@@ -9,7 +9,7 @@ describe('Create item page - Fill in the gaps over image with text: Partial diff
|
|
9
9
|
describe('Question preview: Auto scored - Partial different weights - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
|
10
10
|
abortEarlySetup();
|
11
11
|
before(() => {
|
12
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
12
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -9,7 +9,7 @@ describe('Create item page - Fill in the gaps over image - text: Partial differe
|
|
9
9
|
describe('Auto scored - Partial different weights', () => {
|
10
10
|
abortEarlySetup();
|
11
11
|
before(() => {
|
12
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
12
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -94,7 +94,7 @@ describe('Create item page - Fill in the gaps over image - text: Partial differe
|
|
94
94
|
describe('Question preview: Auto scored - Partial different weights: Minimum scoring', () => {
|
95
95
|
abortEarlySetup();
|
96
96
|
before(() => {
|
97
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
97
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
98
98
|
cy.barsPreLoaderWait();
|
99
99
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
100
100
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -157,7 +157,7 @@ describe('Create item page - Fill in the gaps over image - text: Partial differe
|
|
157
157
|
describe('Question preview: Auto scored - Partial different weights: Rounding', () => {
|
158
158
|
abortEarlySetup();
|
159
159
|
before(() => {
|
160
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
160
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
161
161
|
cy.barsPreLoaderWait();
|
162
162
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
163
163
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -9,7 +9,7 @@ describe('Create item page - Fill in the gaps over image with text: Partial diff
|
|
9
9
|
describe('Question preview: Auto scored - Partial different weight - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
|
10
10
|
abortEarlySetup();
|
11
11
|
before(() => {
|
12
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
12
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -9,7 +9,7 @@ describe('Create item page - Fill in the gaps over image with text: Partial diff
|
|
9
9
|
describe('Question preview: Auto scored - Partial different weights - When \'Correct answer\' points are greater than \'Alternative answer\' points', () => {
|
10
10
|
abortEarlySetup();
|
11
11
|
before(() => {
|
12
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
12
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -9,7 +9,7 @@ describe('Create item page - Fill in the gaps over image with text: Partial equa
|
|
9
9
|
describe('Auto scored - Partial equal weights', () => {
|
10
10
|
abortEarlySetup();
|
11
11
|
before(() => {
|
12
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
12
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -96,7 +96,7 @@ describe('Create item page - Fill in the gaps over image with text: Partial equa
|
|
96
96
|
describe('Question preview: Auto scored - Partial equal weights: Minimum scoring', () => {
|
97
97
|
abortEarlySetup();
|
98
98
|
before(() => {
|
99
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
99
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
100
100
|
cy.barsPreLoaderWait();
|
101
101
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
102
102
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -9,7 +9,7 @@ describe('Create item page - Fill in the gaps over image with text: Partial equa
|
|
9
9
|
describe('Question preview: Auto scored - Partial equal weights - When \'Alternative\' points are more than \'Correct\' points', () => {
|
10
10
|
abortEarlySetup();
|
11
11
|
before(() => {
|
12
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
12
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -172,11 +172,11 @@ describe('Create item page - Fill in the gaps over image with text: Partial equa
|
|
172
172
|
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
173
173
|
});
|
174
174
|
|
175
|
-
it
|
175
|
+
it('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternative accordion answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect answer label and its border should not be displayed and correct answer container should be displayed with correct accordion answers for the responses marked incorrect', () => {
|
176
176
|
cy.log('Pre-step: Switching to Edit tab and allotting points to alternative accordion such that the difference between the points is substantial and the points per response are in decimal')
|
177
177
|
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
178
|
-
|
179
|
-
fillInTheGapsOverImageTextPage.steps.allotPoints(23);
|
178
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 2, responseText: 'Branch' }]);
|
179
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(23);
|
180
180
|
fillInTheGapsOverImageTextPage.steps.expandCorrectAnswerAccordion();
|
181
181
|
fillInTheGapsOverImageTextPage.steps.allotPoints(5);
|
182
182
|
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
@@ -9,7 +9,7 @@ describe('Create item page - Fill in the gaps over image with text: Partial equa
|
|
9
9
|
describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
|
10
10
|
abortEarlySetup();
|
11
11
|
before(() => {
|
12
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
12
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -9,7 +9,7 @@ describe('Create item page - Fill in the gaps over image with text: Partial equa
|
|
9
9
|
describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
|
10
10
|
abortEarlySetup();
|
11
11
|
before(() => {
|
12
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
12
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
13
13
|
cy.barsPreLoaderWait();
|
14
14
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
15
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import { fillInTheGapsOverImageTextPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create item page - Fill in the gaps over image with text: Response level alternate answer basic scoring', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Auto scored - All or nothing with response level alternate answers', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
15
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
16
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(10);
|
17
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }]);
|
18
|
+
fillInTheGapsOverImageTextPage.steps.addAlternateAnswerInResponseAccordion(0);
|
19
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 1, responseText: 'Fruit' }]);
|
20
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(15);
|
21
|
+
fillInTheGapsOverImageTextPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
22
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
23
|
+
});
|
24
|
+
|
25
|
+
it('When the user selects \'Grading\' view without attempting the question, response area numeration should be displayed, correct answers section should be displayed with the first correct answer set in the response accordion', () => {
|
26
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(0, 15);
|
27
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
28
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
29
|
+
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaNumeration();
|
30
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower']);
|
31
|
+
});
|
32
|
+
|
33
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides the incorrect response, a status message with text \'Your answer is incorrect\' and correct answer section with the first correct answer set in the response accordion should be displayed', () => {
|
34
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Roots' }]);
|
35
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(0, 15);
|
36
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
37
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(0);
|
38
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
39
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower']);
|
40
|
+
fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
41
|
+
cy.log('When the user attempts the question incorrectly and clicks on \'Check answer\' button, incorrect icon should be displayed besides the incorrect response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
42
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
43
|
+
fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionIcon(0);
|
44
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
45
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
46
|
+
});
|
47
|
+
|
48
|
+
it('When user attempts the question correctly with the first correct answer set for the response accordion, then the user should be awarded full points and on switching to \'Grading\' view, then correct icon should be displayed beside the correct response, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
49
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
50
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
51
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(15, 15);
|
52
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
53
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(0);
|
54
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
55
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
56
|
+
fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
57
|
+
cy.log('When user attempts the question correctly with the first correct answer set for the response accordion and clicks on \'Check answer\' button, then correct icon should be displayed beside the correct response, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
58
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
59
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(0);
|
60
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
61
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
62
|
+
});
|
63
|
+
|
64
|
+
it('When the user attempts the question with the alternate answer set for the response accordion, then the user should be awarded full points and on switching to \'Grading\' view, then correct icon should be displayed beside the correct response, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
65
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
66
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Fruit' }]);
|
67
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(15, 15);
|
68
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
69
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(0);
|
70
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
71
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
72
|
+
fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
73
|
+
cy.log('When the user attempts the question with the alternate answer set for the response accordion and clicks on \'Check answer\' button, then correct icon should be displayed beside the correct response, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
74
|
+
fillInTheGapsOverImageTextPage.steps.checkAnswer();
|
75
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionIcon(0);
|
76
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
77
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
78
|
+
});
|
79
|
+
});
|
80
|
+
});
|
@@ -15,7 +15,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
|
|
15
15
|
describe('Question preview modes: Student view and Grading view', () => {
|
16
16
|
abortEarlySetup();
|
17
17
|
before(() => {
|
18
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
18
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
19
19
|
cy.barsPreLoaderWait();
|
20
20
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
21
21
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -49,7 +49,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
|
|
49
49
|
before(() => {
|
50
50
|
switch (view) {
|
51
51
|
case 'Question preview':
|
52
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
52
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
53
53
|
cy.barsPreLoaderWait();
|
54
54
|
fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
55
55
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
@@ -108,7 +108,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
|
|
108
108
|
fillInTheGapsOverImageTextPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
109
109
|
};
|
110
110
|
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaNumeration();
|
111
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.correctAnswersLabel(), 'Correct answers');
|
111
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.correctAnswersLabel(), 'Correct answers:');
|
112
112
|
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Petals', 'Stem']);
|
113
113
|
});
|
114
114
|
|
@@ -182,7 +182,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
|
|
182
182
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
183
183
|
abortEarlySetup();
|
184
184
|
before(() => {
|
185
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
185
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
186
186
|
cy.barsPreLoaderWait();
|
187
187
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
188
188
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
@@ -30,7 +30,7 @@ describe('Create item page - Fill in the gaps over image - text - Check answer f
|
|
30
30
|
before(() => {
|
31
31
|
switch (view) {
|
32
32
|
case 'Question preview':
|
33
|
-
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image
|
33
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
34
34
|
cy.barsPreLoaderWait();
|
35
35
|
fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
36
36
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|