itemengine-cypress-automation 1.0.185-repoUpdate26April-b17eb46.0 → 1.0.185
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +8 -5
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +28 -417
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +1 -29
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -11
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +0 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +1 -57
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -2
- package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -49
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +4 -5
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +7 -6
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
- package/cypress/fixtures/constants.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
- package/cypress/fixtures/theme/ilc.json +18 -20
- package/cypress/pages/audioPlayerPage.js +504 -274
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
- package/cypress/pages/components/commonComponents.js +0 -1
- package/cypress/pages/components/draggableOptionContainer.js +0 -1
- package/cypress/pages/components/equationEditorFlyout.js +2 -3
- package/cypress/pages/components/essayResponseCommonComponents.js +2 -8
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -1
- package/cypress/pages/components/imageCanvasComponent.js +1 -2
- package/cypress/pages/components/index.js +0 -3
- package/cypress/pages/components/optionsWrapperComponent.js +2 -13
- package/cypress/pages/components/playbackControlsBaseComponent.js +13 -20
- package/cypress/pages/components/toolSettingsComponent.js +0 -6
- package/cypress/pages/contentBlocksPage.js +2 -18
- package/cypress/pages/createItemPage.js +8 -75
- package/cypress/pages/dialogBoxBase.js +2 -2
- package/cypress/pages/drawingResponsePage.js +4 -24
- package/cypress/pages/feedbackScalePage.js +0 -3
- package/cypress/pages/graphingPage.js +1 -19
- package/cypress/pages/gridFillPage.js +8 -25
- package/cypress/pages/index.js +1 -2
- package/cypress/pages/itemPreviewSettingsPage.js +0 -4
- package/cypress/pages/listOrderingPage.js +557 -435
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +1 -23
- package/cypress/pages/numberLinePage.js +132 -1370
- package/cypress/pages/rulerPage.js +2 -6
- package/cypress/pages/textSelectionPage.js +23 -461
- package/package.json +1 -1
- package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +0 -79
- package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +0 -345
- package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +0 -429
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +0 -162
- package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +0 -489
- package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +0 -313
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +0 -230
- package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +0 -124
- package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +0 -201
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -216
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -214
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -251
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +0 -52
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +0 -128
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -279
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +0 -109
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -278
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -278
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +0 -335
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -250
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +0 -161
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -216
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -252
- package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +0 -118
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +0 -243
- package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -128
- package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +0 -155
- package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +0 -195
- package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +0 -78
- package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -194
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +0 -176
- package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +0 -112
- package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +0 -244
- package/cypress/e2e/ILC/NumberLine/LayoutSection.js +0 -181
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +0 -33
- package/cypress/e2e/ILC/NumberLine/numberLineSection.js +0 -46
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +0 -696
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -173
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +0 -183
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +0 -73
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +0 -204
- package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +0 -288
- package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +0 -153
- package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +0 -164
- package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +0 -120
- package/cypress/e2e/ILC/TextSelection/additionalSettings.js +0 -125
- package/cypress/e2e/ILC/TextSelection/headerSection.js +0 -73
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +0 -179
- package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +0 -89
- package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +0 -436
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +0 -277
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +0 -222
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +0 -260
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +0 -380
- package/cypress/pages/components/layoutSectionComponent.js +0 -1191
- package/cypress/pages/components/numberLineCommonComponent.js +0 -36
- package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +0 -46
- package/cypress/pages/numberLineLabelPage.js +0 -333
@@ -1,124 +0,0 @@
|
|
1
|
-
import { listOrderingPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
-
import utilities from "../../../support/helpers/utilities";
|
4
|
-
var itemReferenceID = "";
|
5
|
-
const checkAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
6
|
-
const views = utilities.getViews(checkAnswerViews);
|
7
|
-
const options = ['sprout', 'plant', 'flower', 'seed'];
|
8
|
-
const correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
9
|
-
|
10
|
-
describe('Create item page - list ordering - Check answer functionality', () => {
|
11
|
-
before(() => {
|
12
|
-
cy.loginAs('admin');
|
13
|
-
});
|
14
|
-
|
15
|
-
views.forEach((view) => {
|
16
|
-
//Note: Remove after https://redmine.zeuslearning.com/issues/549542 is fixed
|
17
|
-
const checkAnswer = (view) => {
|
18
|
-
switch (view) {
|
19
|
-
case 'Question preview':
|
20
|
-
case 'Item preview':
|
21
|
-
listOrderingPage.steps.checkAnswer();
|
22
|
-
break;
|
23
|
-
case 'Student view':
|
24
|
-
studentViewPage.steps.checkAnswer();
|
25
|
-
break;
|
26
|
-
default:
|
27
|
-
throw new Error(`Unsupported page identifier: ${view}`);
|
28
|
-
}
|
29
|
-
};
|
30
|
-
|
31
|
-
describe(`${view} - Check answer functionality`, { tags: 'smoke' }, () => {
|
32
|
-
abortEarlySetup();
|
33
|
-
before(() => {
|
34
|
-
switch (view) {
|
35
|
-
case 'Question preview':
|
36
|
-
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
37
|
-
cy.barsPreLoaderWait();
|
38
|
-
listOrderingPage.steps.addInputToOptionsInputField(options);
|
39
|
-
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
40
|
-
listOrderingPage.steps.selectOrderingLayoutOption('Dropdown menu');
|
41
|
-
listOrderingPage.steps.allotPoints(20);
|
42
|
-
listOrderingPage.steps.selectPositionForAllOptionsSpecifyCorrectAnswerSection([{ optionIndex: 0, position: '2' }, { optionIndex: 1, position: '3' }, { optionIndex: 2, position: '4' }, { optionIndex: 3, position: '1' }])
|
43
|
-
listOrderingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
44
|
-
listOrderingPage.steps.switchToPreviewTab();
|
45
|
-
break;
|
46
|
-
case 'Item preview':
|
47
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
48
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
49
|
-
break;
|
50
|
-
case 'Student view':
|
51
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
52
|
-
break;
|
53
|
-
}
|
54
|
-
});
|
55
|
-
|
56
|
-
beforeEach(() => {
|
57
|
-
switch (view) {
|
58
|
-
case 'Question preview':
|
59
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
60
|
-
listOrderingPage.steps.resetQuestionPreview();
|
61
|
-
break;
|
62
|
-
case 'Item preview':
|
63
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
64
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
65
|
-
break;
|
66
|
-
case 'Student view':
|
67
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
68
|
-
break;
|
69
|
-
}
|
70
|
-
});
|
71
|
-
|
72
|
-
if (view === 'Question preview') {
|
73
|
-
after(() => {
|
74
|
-
listOrderingPage.steps.clickOnSaveQuestionButton();
|
75
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
76
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
77
|
-
});
|
78
|
-
};
|
79
|
-
|
80
|
-
it('When the user selects \'Check answer\' button without attempting the question, then correct/incorrect icons should not be displayed besides all incorrect options, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
81
|
-
checkAnswer(view);
|
82
|
-
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(0);
|
83
|
-
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(1);
|
84
|
-
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(2);
|
85
|
-
listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
|
86
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
87
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
88
|
-
});
|
89
|
-
|
90
|
-
it('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect options, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
91
|
-
listOrderingPage.steps.selectPositionForAllOptionsPreviewTab([{ optionIndex: 0, position: '1' }, { optionIndex: 1, position: '2' }, { optionIndex: 2, position: '3' }, { optionIndex: 3, position: '4' }]);
|
92
|
-
checkAnswer(view);
|
93
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(0);
|
94
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(1);
|
95
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(2);
|
96
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
97
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
98
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
99
|
-
});
|
100
|
-
|
101
|
-
it('When the user attempts the question partially correct and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect options, correct icons should be displayed besides correct options, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
102
|
-
listOrderingPage.steps.selectPositionForAllOptionsPreviewTab([{ optionIndex: 0, position: '2' }, { optionIndex: 1, position: '1' }, { optionIndex: 2, position: '4' }, { optionIndex: 3, position: '3' }]);
|
103
|
-
checkAnswer(view);
|
104
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(0);
|
105
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(1);
|
106
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
|
107
|
-
listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
|
108
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
109
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
110
|
-
});
|
111
|
-
|
112
|
-
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 options, 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', () => {
|
113
|
-
listOrderingPage.steps.selectPositionForAllOptionsPreviewTab([{ optionIndex: 0, position: '2' }, { optionIndex: 1, position: '3' }, { optionIndex: 2, position: '4' }, { optionIndex: 3, position: '1' }]);
|
114
|
-
checkAnswer(view);
|
115
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(0);
|
116
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(1);
|
117
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
|
118
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
119
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
120
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
121
|
-
});
|
122
|
-
});
|
123
|
-
});
|
124
|
-
});
|
@@ -1,201 +0,0 @@
|
|
1
|
-
import { listOrderingPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
-
import { ckEditorToolbar, equationEditorFlyout } from "../../../pages/components";
|
3
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
-
import utilities from "../../../support/helpers/utilities";
|
5
|
-
const previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
6
|
-
const views = utilities.getViews(previewContentViews);
|
7
|
-
var itemReferenceID = "";
|
8
|
-
const css = Cypress.env('css');
|
9
|
-
|
10
|
-
describe('Create item page - List ordering - Preview contents in all views', () => {
|
11
|
-
before(() => {
|
12
|
-
cy.loginAs('admin');
|
13
|
-
});
|
14
|
-
|
15
|
-
views.forEach((view) => {
|
16
|
-
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
17
|
-
abortEarlySetup();
|
18
|
-
before(() => {
|
19
|
-
switch (view) {
|
20
|
-
case 'Question preview':
|
21
|
-
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
22
|
-
cy.barsPreLoaderWait();
|
23
|
-
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
24
|
-
listOrderingPage.steps.selectOrderingLayoutOption('Dropdown menu');
|
25
|
-
listOrderingPage.steps.allotPoints(10);
|
26
|
-
cy.log('Add image to option input field')
|
27
|
-
listOrderingPage.steps.focusInOptionsInputField(0);
|
28
|
-
ckEditorToolbar.steps.selectImageOptionFromCKEditorToolbar();
|
29
|
-
ckEditorToolbar.steps.addImageToInputField();
|
30
|
-
listOrderingPage.steps.enterTextInOptionInputField(0, 'Fox');
|
31
|
-
cy.log('Add bold text to option input field')
|
32
|
-
listOrderingPage.steps.focusInOptionsInputField(1);
|
33
|
-
ckEditorToolbar.steps.selectBoldOptionFromCKEditorToolbar();
|
34
|
-
listOrderingPage.steps.enterTextInOptionInputField(1, 'This is a bold option');
|
35
|
-
cy.log('Add equation to option input field')
|
36
|
-
listOrderingPage.steps.enterTextInOptionInputField(2, 'Solve the following');
|
37
|
-
listOrderingPage.steps.focusInOptionsInputField(2);
|
38
|
-
ckEditorToolbar.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
39
|
-
equationEditorFlyout.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
40
|
-
listOrderingPage.steps.enterTextInOptionInputField(3, 'alpha');
|
41
|
-
listOrderingPage.steps.selectPositionForAllOptionsSpecifyCorrectAnswerSection([{ optionIndex: 0, position: '2' }, { optionIndex: 1, position: '1' }, { optionIndex: 2, position: '3' }, { optionIndex: 3, position: '4' }])
|
42
|
-
listOrderingPage.steps.switchToPreviewTab();
|
43
|
-
break;
|
44
|
-
case 'Item view':
|
45
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
46
|
-
break;
|
47
|
-
case 'Item preview':
|
48
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
49
|
-
listOrderingPage.steps.switchToPreviewTab();
|
50
|
-
break;
|
51
|
-
case 'Student view':
|
52
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
53
|
-
break;
|
54
|
-
case 'Grading view':
|
55
|
-
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
56
|
-
break;
|
57
|
-
case 'Correct answer view':
|
58
|
-
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
59
|
-
break;
|
60
|
-
default:
|
61
|
-
throw new Error('Invalid view');
|
62
|
-
}
|
63
|
-
});
|
64
|
-
|
65
|
-
after(() => {
|
66
|
-
if (view === 'Question preview') {
|
67
|
-
listOrderingPage.steps.clickOnSaveQuestionButton();
|
68
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
69
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
70
|
-
}
|
71
|
-
if (view === 'Student view') {
|
72
|
-
studentViewPage.steps.submitResponse();
|
73
|
-
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
74
|
-
}
|
75
|
-
});
|
76
|
-
|
77
|
-
it('Question instructions should be visible', () => {
|
78
|
-
utilities.verifyInnerText(listOrderingPage.questionInstructionsText(), 'Arrange options in correct order.');
|
79
|
-
utilities.verifyElementVisibilityState(listOrderingPage.questionInstructionsText(), 'visible');
|
80
|
-
});
|
81
|
-
|
82
|
-
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
83
|
-
it(`When the user has added image, equation, bold text to the options input fields, then they should be displayed in the options container in ${view}`, () => {
|
84
|
-
listOrderingPage.steps.verifyOptionWithImageInPreviewTab(0);
|
85
|
-
listOrderingPage.steps.verifyOptionWithBoldTextInPreviewTab(1);
|
86
|
-
listOrderingPage.steps.verifyOptionWithEquationTextInPreviewTab(2);
|
87
|
-
});
|
88
|
-
|
89
|
-
it('When the user expands a position dropdown, based on the number of options in the list to order, a list of dropdown options to place the particular option in the list order should be displayed', () => {
|
90
|
-
listOrderingPage.steps.expandPositionDropdownPreviewTab(0);
|
91
|
-
utilities.verifyElementVisibilityState(listOrderingPage.dropdownList(), 'visible');
|
92
|
-
for (let index = 0; index < 4; index++) {
|
93
|
-
utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.positionDropdownListOption(), index), `${index + 1}`);
|
94
|
-
}
|
95
|
-
});
|
96
|
-
|
97
|
-
it('The user should be able to select an option from the position dropdown. When the user has not set position in all dropdowns, an alert message "All options need to have a value assigned to them from the dropdown." should be displayed', () => {
|
98
|
-
listOrderingPage.steps.selectOptionPositionPreviewTab(0, 2);
|
99
|
-
utilities.verifyElementVisibilityState(listOrderingPage.dropdownList(), 'notExist');
|
100
|
-
listOrderingPage.steps.verifyAssignValueToAllDropdownAlertMessage();
|
101
|
-
});
|
102
|
-
|
103
|
-
it('When the user tries to set position of an option such that the same position has already been assigned to another option, then the selected position from the previous option dropdown should reset', () => {
|
104
|
-
listOrderingPage.steps.selectOptionPositionPreviewTab(1, 2);
|
105
|
-
listOrderingPage.steps.verifySelectedOptionPositionDropdown(0, '');
|
106
|
-
});
|
107
|
-
|
108
|
-
it('User should be able to reorder options containing image, bold text and equation options in the list using position dropdowns. On setting position for all options, the alert message should get removed', () => {
|
109
|
-
listOrderingPage.steps.selectPositionForAllOptionsPreviewTab([{ optionIndex: 0, position: '2' }, { optionIndex: 1, position: '1' }, { optionIndex: 2, position: '3' }, { optionIndex: 3, position: '4' }])
|
110
|
-
listOrderingPage.steps.verifyAlertMessageNotExists();
|
111
|
-
});
|
112
|
-
} else if (view === 'Grading view') {
|
113
|
-
it(`The order of the responses should be as per the submitted response`, () => {
|
114
|
-
listOrderingPage.steps.verifyOptionWithImageDropdownLayoutInGradingView(0);
|
115
|
-
listOrderingPage.steps.verifyOptionWithBoldTextDropdownLayoutInGradingView(1);
|
116
|
-
listOrderingPage.steps.verifyOptionWithEquationTextDropdownLayoutInGradingView(2);
|
117
|
-
listOrderingPage.steps.verifyTextContentOfOptionDropdownLayoutInGradingView('alpha', 3);
|
118
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(0);
|
119
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(1);
|
120
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
|
121
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
122
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
123
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
124
|
-
});
|
125
|
-
|
126
|
-
it('The order of the responses should not be editable', () => {
|
127
|
-
listOrderingPage.steps.expandPositionDropdownPreviewTab(2);
|
128
|
-
utilities.verifyElementVisibilityState(listOrderingPage.dropdownList(), 'notExist');
|
129
|
-
});
|
130
|
-
} else {
|
131
|
-
it('The order of the options should be as per the correct answer order', () => {
|
132
|
-
listOrderingPage.steps.verifySelectedOptionPositionDropdown(0, '2');
|
133
|
-
listOrderingPage.steps.verifySelectedOptionPositionDropdown(1, '1');
|
134
|
-
listOrderingPage.steps.verifySelectedOptionPositionDropdown(2, '3');
|
135
|
-
listOrderingPage.steps.verifySelectedOptionPositionDropdown(3, '4');
|
136
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(0);
|
137
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(1);
|
138
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
|
139
|
-
listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
|
140
|
-
});
|
141
|
-
}
|
142
|
-
|
143
|
-
it('CSS of preview contents', { tags: 'css' }, () => {
|
144
|
-
switch (view) {
|
145
|
-
case 'Question preview':
|
146
|
-
case 'Item preview':
|
147
|
-
case 'Item view':
|
148
|
-
case 'Item preview':
|
149
|
-
case 'Student view':
|
150
|
-
utilities.verifyCSS(utilities.getNthElement(listOrderingPage.positionDropdownPreviewTab(), 0), {
|
151
|
-
'background-color': css.color.optionsBg,
|
152
|
-
'border': `1px solid ${css.color.draggableOptionBorder}`
|
153
|
-
});
|
154
|
-
utilities.verifyCSS(utilities.getNthElement(listOrderingPage.positionDropdownPreviewTab(), 0), {
|
155
|
-
'background-color': css.color.defaultBackground,
|
156
|
-
'border': `1px solid ${css.color.correctAnswer}`
|
157
|
-
});
|
158
|
-
utilities.verifyCSS(listOrderingPage.dropdownOptionWrapperPreviewTab(), {
|
159
|
-
'background-color': css.color.defaultBackground,
|
160
|
-
'border': `1px solid ${css.color.draggableOptionBorder}`
|
161
|
-
});
|
162
|
-
utilities.verifyCSS(listOrderingPage.dropdownOptionWrapperPreviewTab().find('.question-text-wrapper'), {
|
163
|
-
'color': css.color.text,
|
164
|
-
'font-size': css.fontSize.default,
|
165
|
-
'font-weight': css.fontWeight.regular
|
166
|
-
});
|
167
|
-
utilities.verifyCSS(listOrderingPage.dropdownWrapperPreviewTab().find('.dropdown-label-text'), {
|
168
|
-
'color': css.color.liText,
|
169
|
-
'font-size': css.fontSize.default,
|
170
|
-
'font-weight': css.fontWeight.regular
|
171
|
-
});
|
172
|
-
break;
|
173
|
-
case 'Grading view':
|
174
|
-
case 'Correct answer view':
|
175
|
-
utilities.verifyCSS(utilities.getNthElement(listOrderingPage.positionDropdownPreviewTab(), 0), {
|
176
|
-
'background-color': css.color.optionsBg,
|
177
|
-
'border': `1px solid ${css.color.correctAnswer}`
|
178
|
-
});
|
179
|
-
utilities.verifyCSS(listOrderingPage.dropdownOptionWrapperGradingView(), {
|
180
|
-
'background-color': css.color.defaultBackground,
|
181
|
-
'border': `1px solid ${css.color.draggableOptionBorder}`
|
182
|
-
});
|
183
|
-
utilities.verifyCSS(utilities.getNthElement(listOrderingPage.dropdownOptionWrapperGradingView(), 3).find('.question-text-wrapper'), {
|
184
|
-
'color': css.color.text,
|
185
|
-
'font-size': css.fontSize.default,
|
186
|
-
'font-weight': css.fontWeight.regular
|
187
|
-
});
|
188
|
-
utilities.verifyCSS(listOrderingPage.dropdownWrapperPreviewTab().find('.dropdown-label-text'), {
|
189
|
-
'color': css.color.text,
|
190
|
-
'font-size': css.fontSize.default,
|
191
|
-
'font-weight': css.fontWeight.regular
|
192
|
-
});
|
193
|
-
}
|
194
|
-
});
|
195
|
-
|
196
|
-
it('Accessibility of preview contents', { tags: 'a11y' }, () => {
|
197
|
-
cy.checkAccessibility(listOrderingPage.optionWrapperPreviewTab().parents('[class*="question-preview-wrapper"]'));
|
198
|
-
});
|
199
|
-
});
|
200
|
-
});
|
201
|
-
});
|
@@ -1,216 +0,0 @@
|
|
1
|
-
import { listOrderingPage } from "../../../../pages/listOrderingPage";
|
2
|
-
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
-
|
4
|
-
let options = ['sprout', 'plant', 'flower', 'seed'];
|
5
|
-
let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
6
|
-
let alternateCorrectAnswerArray = ['seed', 'flower', 'sprout', 'plant'];
|
7
|
-
|
8
|
-
describe('Create item page - List ordering: All or nothing scoring with alternative answer - When alternative answer points are more than correct answer points', () => {
|
9
|
-
before(() => {
|
10
|
-
cy.loginAs('admin');
|
11
|
-
});
|
12
|
-
|
13
|
-
describe('Question preview: AutoScored - All or nothing with alternative answer: When alternative answer points are more than correct answer points', () => {
|
14
|
-
abortEarlySetup();
|
15
|
-
before(() => {
|
16
|
-
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
17
|
-
cy.barsPreLoaderWait();
|
18
|
-
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
19
|
-
listOrderingPage.steps.addInputToOptionsInputField(options);
|
20
|
-
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
|
21
|
-
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
|
22
|
-
listOrderingPage.steps.allotPoints(20);
|
23
|
-
listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
|
24
|
-
listOrderingPage.steps.addAlternativeAnswerAccordion(1);
|
25
|
-
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
|
26
|
-
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('plant', 3);
|
27
|
-
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('flower', 1);
|
28
|
-
listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(alternateCorrectAnswerArray);
|
29
|
-
listOrderingPage.steps.allotPoints(25);
|
30
|
-
listOrderingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
31
|
-
listOrderingPage.steps.switchToPreviewTab();
|
32
|
-
});
|
33
|
-
|
34
|
-
it('When the user switches to the \'Grading view\' without attempting the question, then correct/incorrect icons should be displayed for the default list order, "Your answer is incorrect" label and correct answers section with a label \'Correct answers\' should be displayed with correct answers from the alternative accordion', () => {
|
35
|
-
listOrderingPage.steps.verifyPreviewScore(0, 25);
|
36
|
-
listOrderingPage.steps.switchToGradingView();
|
37
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
38
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
39
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
40
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
|
41
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
42
|
-
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(alternateCorrectAnswerArray);
|
43
|
-
});
|
44
|
-
|
45
|
-
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded with points specified for correct accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
46
|
-
listOrderingPage.steps.resetQuestionPreview();
|
47
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
|
48
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
|
49
|
-
listOrderingPage.steps.verifyOptionsOrderInPreviewTab(correctAnswerArray);
|
50
|
-
listOrderingPage.steps.verifyPreviewScore(20, 25);
|
51
|
-
listOrderingPage.steps.switchToGradingView();
|
52
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
|
53
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('seed');
|
54
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('plant');
|
55
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
56
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
57
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
58
|
-
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
59
|
-
cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then 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')
|
60
|
-
listOrderingPage.steps.checkAnswer()
|
61
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
|
62
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('seed');
|
63
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('plant');
|
64
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
65
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
66
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
67
|
-
});
|
68
|
-
|
69
|
-
it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
70
|
-
listOrderingPage.steps.resetQuestionPreview();
|
71
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
|
72
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 3);
|
73
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 1);
|
74
|
-
listOrderingPage.steps.verifyOptionsOrderInPreviewTab(alternateCorrectAnswerArray);
|
75
|
-
listOrderingPage.steps.verifyPreviewScore(25, 25);
|
76
|
-
listOrderingPage.steps.switchToGradingView();
|
77
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
|
78
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('seed');
|
79
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('plant');
|
80
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
81
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
82
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
83
|
-
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
84
|
-
cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then 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')
|
85
|
-
listOrderingPage.steps.checkAnswer()
|
86
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
|
87
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('seed');
|
88
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('plant');
|
89
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
90
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
91
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
92
|
-
});
|
93
|
-
|
94
|
-
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone numeration should be displayed', () => {
|
95
|
-
listOrderingPage.steps.resetQuestionPreview();
|
96
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
|
97
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
|
98
|
-
listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['flower', 'sprout', 'plant', 'seed']);
|
99
|
-
listOrderingPage.steps.verifyPreviewScore(0, 25);
|
100
|
-
listOrderingPage.steps.switchToGradingView();
|
101
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
102
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
103
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
104
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
|
105
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
106
|
-
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(alternateCorrectAnswerArray);
|
107
|
-
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
108
|
-
cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
109
|
-
listOrderingPage.steps.checkAnswer()
|
110
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
111
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
112
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
113
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
|
114
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
115
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
116
|
-
});
|
117
|
-
|
118
|
-
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
119
|
-
listOrderingPage.steps.resetQuestionPreview();
|
120
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 0);
|
121
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 1);
|
122
|
-
listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['plant', 'flower', 'sprout', 'seed']);
|
123
|
-
listOrderingPage.steps.verifyPreviewScore(0, 25);
|
124
|
-
listOrderingPage.steps.switchToGradingView();
|
125
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
126
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
127
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
|
128
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
|
129
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
130
|
-
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(alternateCorrectAnswerArray);
|
131
|
-
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
132
|
-
cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
133
|
-
listOrderingPage.steps.checkAnswer();
|
134
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
135
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
136
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
|
137
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
|
138
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
139
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
140
|
-
});
|
141
|
-
|
142
|
-
it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be displayed besides response field with alternative answer responses, red cross-mark icon should be displayed beside responses from the correct accordion, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
143
|
-
listOrderingPage.steps.resetQuestionPreview();
|
144
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
|
145
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
|
146
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 3);
|
147
|
-
listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'sprout', 'flower', 'plant']);
|
148
|
-
listOrderingPage.steps.verifyPreviewScore(0, 25);
|
149
|
-
listOrderingPage.steps.switchToGradingView();
|
150
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('seed');
|
151
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
152
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
153
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('plant');
|
154
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
155
|
-
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(alternateCorrectAnswerArray);
|
156
|
-
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
157
|
-
cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
158
|
-
listOrderingPage.steps.checkAnswer()
|
159
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('seed');
|
160
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
161
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
162
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('plant');
|
163
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
164
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
165
|
-
});
|
166
|
-
|
167
|
-
it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be besides the common response, , \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
168
|
-
listOrderingPage.steps.resetQuestionPreview();
|
169
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
|
170
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
|
171
|
-
listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'plant', 'flower', 'sprout']);
|
172
|
-
listOrderingPage.steps.verifyPreviewScore(0, 25);
|
173
|
-
listOrderingPage.steps.switchToGradingView();
|
174
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('seed');
|
175
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
176
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
177
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
178
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
179
|
-
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(alternateCorrectAnswerArray);
|
180
|
-
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
181
|
-
cy.log('When the user has attempted the question with the common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
182
|
-
listOrderingPage.steps.checkAnswer();
|
183
|
-
listOrderingPage.steps.verifyCorrectOptionIcon('seed');
|
184
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
185
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
186
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
187
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
188
|
-
});
|
189
|
-
|
190
|
-
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 dropzone cell numeration should be displayed', () => {
|
191
|
-
listOrderingPage.steps.resetQuestionPreview();
|
192
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
|
193
|
-
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
|
194
|
-
listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
|
195
|
-
listOrderingPage.steps.verifyPreviewScore(0, 25);
|
196
|
-
listOrderingPage.steps.switchToGradingView();
|
197
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
198
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
199
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
|
200
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
201
|
-
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(alternateCorrectAnswerArray);
|
202
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
203
|
-
|
204
|
-
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
205
|
-
|
206
|
-
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
207
|
-
listOrderingPage.steps.checkAnswer();
|
208
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
209
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
210
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
|
211
|
-
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
212
|
-
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
213
|
-
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
214
|
-
});
|
215
|
-
});
|
216
|
-
});
|