itemengine-cypress-automation 1.0.249-repoUpdated26thSept-d6c4173.0 → 1.0.250-30SeptUpdates-a6d872b.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -3
- package/cypress/e2e/ILC/AudioResponseNew/headerSection.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +1 -1
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -2
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +1 -2
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +2 -3
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/chartFunctionalitySpecifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/ChartsBar/gradingViewAndCorrectAnswerView.smoke.js +3 -4
- package/cypress/e2e/ILC/ChartsBar/headerSection.js +2 -2
- package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/selectChartTypeSection.js +8 -8
- package/cypress/e2e/ILC/ChartsBar/studentViewSettings.js +0 -1
- package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsLine/chartFunctionalitySpecifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +2 -3
- package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Compass/compassPreviewContent.smoke.js +1 -1
- package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/previewContentsForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +3 -5
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -6
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePageHeaderSection.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +2 -4
- package/cypress/e2e/ILC/EssayResponse/additionalSettings.js +4 -4
- package/cypress/e2e/ILC/EssayResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -3
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAlternateAnswerPopup.js +162 -0
- package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +0 -2
- package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/MatchingDropdown/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +9 -9
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +6 -6
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/customSettings.js +1373 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +4 -4
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingAlternatePointsMoreThanCorrectPoints.js +161 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingCorrectPointsEqualToAlternatePoints.js +162 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingCorrectPointsMoreThanAlternatePoints.js +161 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsBasic.js +420 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsBasic.js +130 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +195 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingAlternatePointsMoreThanCorrectPoints.js +161 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingCorrectPointsEqualToAlternatePoints.js +162 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingCorrectPointsMoreThanAlternatePoints.js +161 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsBasic.js +420 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsBasic.js +130 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +225 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +225 -0
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +2 -3
- package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +2 -2
- package/cypress/e2e/ILC/chartsDotsPlot/specifyCorrectAnswerSection.js +2 -2
- package/cypress/pages/audioResponsePage.js +0 -10
- package/cypress/pages/chartsBarPage.js +0 -13
- package/cypress/pages/chartsDotPlotPage.js +4 -85
- package/cypress/pages/chartsLinePage.js +2 -2
- package/cypress/pages/components/allowTeachersToDownloadStudentResponseComponent.js +1 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +11 -30
- package/cypress/pages/components/barAndLineChartComponent.js +0 -10
- package/cypress/pages/components/chartsCommonComponent.js +1 -25
- package/cypress/pages/components/colorPopupComponent.js +0 -31
- package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +0 -1
- package/cypress/pages/components/createQuestionBasePage.js +2 -8
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +1 -1
- package/cypress/pages/components/draggableOptionContainer.js +1 -1
- package/cypress/pages/components/equationEditorFlyout.js +0 -36
- package/cypress/pages/components/essayResponseCommonComponents.js +2 -2
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +2 -15
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +1 -2
- package/cypress/pages/components/gridQuestionCommonComponent.js +26 -34
- package/cypress/pages/components/imageCanvasComponent.js +7 -9
- package/cypress/pages/components/index.js +0 -1
- package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +0 -12
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -1
- package/cypress/pages/components/optionsWrapperComponent.js +3 -3
- package/cypress/pages/components/scoringSectionBaseEditTab.js +2 -2
- package/cypress/pages/contentBlocksPage.js +1 -1
- package/cypress/pages/createItemPage.js +7 -6
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -41
- package/cypress/pages/essayResponsePage.js +0 -1
- package/cypress/pages/feedbackScalePage.js +0 -1
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
- package/cypress/pages/fillInTheGapsDropdownPage.js +79 -0
- package/cypress/pages/graphingPage.js +0 -1
- package/cypress/pages/gridFillPage.js +45 -112
- package/cypress/pages/imageHighlightPage.js +0 -10
- package/cypress/pages/itemPreviewSettingsPage.js +1 -4
- package/cypress/pages/listOrderingPage.js +0 -10
- package/cypress/pages/matchingPage.js +5 -142
- package/cypress/pages/multipleSelectionPage.js +0 -13
- package/cypress/pages/numberLineLabelPage.js +1 -1
- package/cypress/pages/numberLinePage.js +1 -1
- package/cypress/pages/protractorPage.js +1 -3
- package/cypress/pages/shortTextResponsePage.js +1 -3
- package/cypress/pages/simpleCalculatorPage.js +2 -2
- package/cypress/pages/singleSelectionPage.js +0 -10
- package/cypress/pages/textEntryMathPage.js +1 -8
- package/cypress/pages/textEntryMathWithImagePage.js +16 -38
- package/cypress/pages/textSelectionPage.js +34 -43
- package/cypress/pages/videoResponsePage.js +0 -5
- package/package.json +1 -1
- package/cypress/pages/components/customizeHighlightPropertiesComponent.js +0 -318
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/basicScoringForAllTextSelectionTypes.smoke.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/manuallyAndNonScored.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/singleSelectionPreviewScoring.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsBasic.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsBasic.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
@@ -0,0 +1,242 @@
|
|
1
|
+
import { textSelectionPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const wordTextArray = ['Nature','nurtures', 'life', 'and', 'brings', 'endless', 'beauty.']
|
7
|
+
|
8
|
+
describe('Create item page - Text selection - Selection mode - Word: Partial different with alternative answers', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Question preview: Auto scored - Partial different weights with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
|
19
|
+
textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
20
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
|
21
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
|
22
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
|
23
|
+
textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['6', '5', '4']);
|
24
|
+
textSelectionPage.steps.addAlternativeAnswerAccordion(1);
|
25
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
|
26
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
|
27
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[4]);
|
28
|
+
textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['1', '7', '5']);
|
29
|
+
textSelectionPage.steps.switchToPreviewTab();
|
30
|
+
});
|
31
|
+
|
32
|
+
it('When the user selects \'Grading view\' without attempting the question, a status message should not be displayed and correct answer section should be displayed with correct answers of the correct accordion', () => {
|
33
|
+
textSelectionPage.steps.verifyPreviewScore(0, 15);
|
34
|
+
textSelectionPage.steps.switchToGradingView();
|
35
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
36
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
37
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
38
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
39
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
40
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
41
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
42
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
43
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
44
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
45
|
+
});
|
46
|
+
|
47
|
+
it('When the user attempts the question according to the correct accordion then user should be awarded with full points and on switching to \'Grading view\' correct icons should be displayed besides the correct attempted options from the correct accordion and a status message should not be displayed', () => {
|
48
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
|
49
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
|
50
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
51
|
+
textSelectionPage.steps.verifyPreviewScore(15, 15);
|
52
|
+
textSelectionPage.steps.switchToGradingView();
|
53
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
54
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
|
55
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
|
56
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
57
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
58
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
59
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
60
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
61
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
62
|
+
});
|
63
|
+
|
64
|
+
it('When the user attempts the question according to the alternate accordion then user should be awarded with points of the alternate accordion(less than full points) and on switching to \'Grading view\' correct icons should be displayed besides the correct attempted options from the alternate accordion and a status message with text \'Your answer is correct\' and the correct answer section should not be displayed', () => {
|
65
|
+
textSelectionPage.steps.resetQuestionPreview();
|
66
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
67
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
|
68
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
|
69
|
+
textSelectionPage.steps.verifyPreviewScore(13, 15);
|
70
|
+
textSelectionPage.steps.switchToGradingView();
|
71
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
72
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
73
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
|
74
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
|
75
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
|
76
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
77
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
78
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
79
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
80
|
+
});
|
81
|
+
|
82
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
|
83
|
+
textSelectionPage.steps.resetQuestionPreview();
|
84
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
|
85
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
|
86
|
+
textSelectionPage.steps.verifyPreviewScore(11, 15);
|
87
|
+
textSelectionPage.steps.switchToGradingView();
|
88
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
89
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
|
90
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
91
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
92
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
93
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
94
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
95
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
96
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
97
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
98
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
99
|
+
});
|
100
|
+
|
101
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
|
102
|
+
textSelectionPage.steps.resetQuestionPreview();
|
103
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
|
104
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
|
105
|
+
textSelectionPage.steps.verifyPreviewScore(12, 15);
|
106
|
+
textSelectionPage.steps.switchToGradingView();
|
107
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
108
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
109
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
110
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
|
111
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
|
112
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
113
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
114
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
115
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
116
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
117
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
118
|
+
});
|
119
|
+
|
120
|
+
it('When the user attempts the question partially correct with all the responses correct as per the alternative accordion but one response incomplete, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
|
121
|
+
textSelectionPage.steps.resetQuestionPreview();
|
122
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
123
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
|
124
|
+
textSelectionPage.steps.verifyPreviewScore(8, 15);
|
125
|
+
textSelectionPage.steps.switchToGradingView();
|
126
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
127
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
128
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
|
129
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
|
130
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
131
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
132
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
133
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
134
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
135
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
136
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
137
|
+
});
|
138
|
+
|
139
|
+
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 points of the alternative accordion as points from the alternative accordion are more than tha correct accordion and on switching to \'Grading\' view, green check-mark icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative accordion, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
|
140
|
+
textSelectionPage.steps.resetQuestionPreview();
|
141
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
|
142
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
|
143
|
+
textSelectionPage.steps.verifyPreviewScore(7, 15);
|
144
|
+
textSelectionPage.steps.switchToGradingView();
|
145
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
146
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[1]);
|
147
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
148
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
|
149
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
150
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
151
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
152
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
153
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
154
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
155
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
156
|
+
});
|
157
|
+
|
158
|
+
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 points of the correct accordion as points from the correct accordion are more than the alternative accordion and on switching to \'Grading\' view, green check-mark icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative tab, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
|
159
|
+
textSelectionPage.steps.resetQuestionPreview();
|
160
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
|
161
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
|
162
|
+
textSelectionPage.steps.verifyPreviewScore(6, 15);
|
163
|
+
textSelectionPage.steps.switchToGradingView();
|
164
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
165
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
166
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
167
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
168
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[4]);
|
169
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
170
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
171
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
172
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
173
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
174
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
175
|
+
});
|
176
|
+
|
177
|
+
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 points of the correctly attempted response and on switching to \'Grading\' view, green check-mark icon should be besides the common response, no icon should be displayed beside unattempted response, \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
|
178
|
+
textSelectionPage.steps.resetQuestionPreview();
|
179
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
180
|
+
textSelectionPage.steps.verifyPreviewScore(4, 15);
|
181
|
+
textSelectionPage.steps.switchToGradingView();
|
182
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
183
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
184
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
|
185
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
186
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
187
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
188
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
189
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
190
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
191
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
192
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
193
|
+
});
|
194
|
+
|
195
|
+
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 incorrect response, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
|
196
|
+
textSelectionPage.steps.resetQuestionPreview();
|
197
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[5]);
|
198
|
+
textSelectionPage.steps.verifyPreviewScore(0, 15);
|
199
|
+
textSelectionPage.steps.switchToGradingView();
|
200
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
201
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
202
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
203
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
204
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
205
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[5]);
|
206
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
207
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
208
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
209
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
210
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
211
|
+
});
|
212
|
+
|
213
|
+
it('Overachiever case: When the user attempts the question with more number of correct responses from the alternate tab than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternate tab answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, green check-mark icons should be displayed for the correct accordion response, red cross-mark icon should be displayed for the alternate tab responses, status message should not be displayed and correct answer container should be displayed with correct accordion answers for the responses marked incorrect', () => {
|
214
|
+
cy.log('Pre-step: Switching to Edit tab and allotting points to alternate tab such that the difference between the points is substantial and the points per response are in decimal')
|
215
|
+
textSelectionPage.steps.switchToEditTab();
|
216
|
+
textSelectionPage.steps.deleteAlternativeAnswerAccordion(0);
|
217
|
+
textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['11.4', '1.2', '10.4']);
|
218
|
+
textSelectionPage.steps.addAlternativeAnswerAccordion(1);
|
219
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
|
220
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[4]);
|
221
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[5]);
|
222
|
+
textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['1.2', '2.2', '1.6']);
|
223
|
+
textSelectionPage.steps.switchToPreviewTab();
|
224
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
|
225
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
|
226
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[5]);
|
227
|
+
textSelectionPage.steps.verifyPreviewScore(11.4, 23);
|
228
|
+
textSelectionPage.steps.switchToGradingView();
|
229
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
230
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
231
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
232
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
233
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[4]);
|
234
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[5]);
|
235
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
236
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
237
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
238
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
239
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
240
|
+
});
|
241
|
+
});
|
242
|
+
});
|
@@ -0,0 +1,130 @@
|
|
1
|
+
import { textSelectionPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
|
5
|
+
const wordTextArray = ['Nature','nurtures', 'life', 'and', 'brings', 'endless', 'beauty.']
|
6
|
+
|
7
|
+
describe('Create item page - Text selection - Selection mode - Word: Partial equal weights', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Auto scored - Partial equal weights', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
|
18
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
|
19
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
|
20
|
+
textSelectionPage.steps.allotPoints(20);
|
21
|
+
textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
22
|
+
textSelectionPage.steps.switchToPreviewTab();
|
23
|
+
});
|
24
|
+
|
25
|
+
it('When the user selects \'Grading\' view without attempting the question, then correct/incorrect answer should not be displayed in the preview tab and correct answer section should be displayed with correct answers', () => {
|
26
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
27
|
+
textSelectionPage.steps.switchToGradingView();
|
28
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
29
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
30
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
31
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
32
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
33
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
34
|
+
});
|
35
|
+
|
36
|
+
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 should not be displayed and correct answer section with all correct answers should be displayed', () => {
|
37
|
+
textSelectionPage.steps.resetQuestionPreview();
|
38
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
39
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
|
40
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
41
|
+
textSelectionPage.steps.switchToGradingView();
|
42
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
43
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
44
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[2]);
|
45
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[3]);
|
46
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
47
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
48
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
49
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
50
|
+
});
|
51
|
+
|
52
|
+
it('When the user attempts the question partially correct with some correct and some incorrect options, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer response, incorrect icon should be displayed besides the incorrect answer response a status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
|
53
|
+
textSelectionPage.steps.resetQuestionPreview();
|
54
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
|
55
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
56
|
+
textSelectionPage.steps.verifyPreviewScore(10, 20);
|
57
|
+
textSelectionPage.steps.switchToGradingView();
|
58
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
59
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
60
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[2]);
|
61
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
|
62
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
63
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
64
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
65
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
66
|
+
});
|
67
|
+
|
68
|
+
it('When the user attempts the question correctly then the user should be awarded full points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, a status message and correct answer section should not be displayed', () => {
|
69
|
+
textSelectionPage.steps.resetQuestionPreview();
|
70
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
|
71
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
|
72
|
+
textSelectionPage.steps.verifyPreviewScore(20, 20);
|
73
|
+
textSelectionPage.steps.switchToGradingView();
|
74
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
75
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
|
76
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[2]);
|
77
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
|
78
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
79
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
80
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
81
|
+
});
|
82
|
+
});
|
83
|
+
|
84
|
+
describe('Question preview: Auto scored - Partial equal weights: Minimum scoring', () => {
|
85
|
+
abortEarlySetup();
|
86
|
+
before(() => {
|
87
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
88
|
+
cy.barsPreLoaderWait();
|
89
|
+
textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
|
90
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
|
91
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
|
92
|
+
textSelectionPage.steps.allotPoints(20);
|
93
|
+
textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
94
|
+
});
|
95
|
+
|
96
|
+
it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
|
97
|
+
textSelectionPage.steps.expandMinimumScoringDropdown();
|
98
|
+
textSelectionPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
|
99
|
+
textSelectionPage.steps.allotMinimumPoints(2);
|
100
|
+
textSelectionPage.steps.switchToPreviewTab();
|
101
|
+
textSelectionPage.steps.switchToGradingView();
|
102
|
+
textSelectionPage.steps.verifyPreviewScore(2, 20);
|
103
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
104
|
+
});
|
105
|
+
|
106
|
+
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
107
|
+
textSelectionPage.steps.resetQuestionPreview();
|
108
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
109
|
+
textSelectionPage.steps.verifyPreviewScore(2, 20);
|
110
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
111
|
+
});
|
112
|
+
|
113
|
+
it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with 0 points', () => {
|
114
|
+
textSelectionPage.steps.switchToEditTab();
|
115
|
+
textSelectionPage.steps.expandMinimumScoringDropdown();
|
116
|
+
textSelectionPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
117
|
+
textSelectionPage.steps.allotMinimumPoints(2);
|
118
|
+
textSelectionPage.steps.switchToPreviewTab();
|
119
|
+
textSelectionPage.steps.switchToGradingView();
|
120
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
121
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
122
|
+
});
|
123
|
+
|
124
|
+
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
125
|
+
textSelectionPage.steps.resetQuestionPreview();
|
126
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
127
|
+
textSelectionPage.steps.verifyPreviewScore(2, 20);
|
128
|
+
});
|
129
|
+
});
|
130
|
+
});
|
@@ -0,0 +1,225 @@
|
|
1
|
+
import { textSelectionPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
|
7
|
+
const wordTextArray = ['Nature','nurtures', 'life', 'and', 'brings', 'endless', 'beauty.']
|
8
|
+
|
9
|
+
describe('Create item page - Text selection - Selection mode - Word: Partial equal with alternative answers', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
18
|
+
cy.barsPreLoaderWait();
|
19
|
+
textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
|
20
|
+
textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
21
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
|
22
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
|
23
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
|
24
|
+
textSelectionPage.steps.allotPoints(9);
|
25
|
+
textSelectionPage.steps.addAlternativeAnswerAccordion(1);
|
26
|
+
textSelectionPage.steps.allotPoints(15);
|
27
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
|
28
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
|
29
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[4]);
|
30
|
+
textSelectionPage.steps.switchToPreviewTab();
|
31
|
+
});
|
32
|
+
|
33
|
+
it('When the user selects \'Grading view\' without attempting the question, a status message should not be displayed and correct answer section should be displayed with correct answers of the correct accordion', () => {
|
34
|
+
textSelectionPage.steps.verifyPreviewScore(0, 15);
|
35
|
+
textSelectionPage.steps.switchToGradingView();
|
36
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
37
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
38
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
39
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
40
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
41
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
42
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
43
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
|
44
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
|
45
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
46
|
+
});
|
47
|
+
|
48
|
+
it('When the user attempts the question according to the correct accordion then user should be awarded with points of the correct accordion(less than full points) and on switching to \'Grading view\' correct icons should be displayed besides the correct attempted options from the correct accordion and a status message should not be displayed', () => {
|
49
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
|
50
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
|
51
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
52
|
+
textSelectionPage.steps.verifyPreviewScore(9, 15);
|
53
|
+
textSelectionPage.steps.switchToGradingView();
|
54
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
55
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
|
56
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
|
57
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
58
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
59
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
60
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
61
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
62
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
63
|
+
});
|
64
|
+
|
65
|
+
it('When the user attempts the question according to the alternate accordion then user should be awarded with full points and on switching to \'Grading view\' correct icons should be displayed besides the correct attempted options from the alternate accordion and a status message with text \'Your answer is correct\' and the correct answer section should not be displayed', () => {
|
66
|
+
textSelectionPage.steps.resetQuestionPreview();
|
67
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
68
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
|
69
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
|
70
|
+
textSelectionPage.steps.verifyPreviewScore(15, 15);
|
71
|
+
textSelectionPage.steps.switchToGradingView();
|
72
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
73
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
74
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
|
75
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
|
76
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
|
77
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
78
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
79
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
80
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
81
|
+
});
|
82
|
+
|
83
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
|
84
|
+
textSelectionPage.steps.resetQuestionPreview();
|
85
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
|
86
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
|
87
|
+
textSelectionPage.steps.verifyPreviewScore(6, 15);
|
88
|
+
textSelectionPage.steps.switchToGradingView();
|
89
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
90
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
|
91
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
92
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
93
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
94
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
95
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
96
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
97
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
|
98
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
|
99
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
100
|
+
});
|
101
|
+
|
102
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
|
103
|
+
textSelectionPage.steps.resetQuestionPreview();
|
104
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
|
105
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
|
106
|
+
textSelectionPage.steps.verifyPreviewScore(10, 15);
|
107
|
+
textSelectionPage.steps.switchToGradingView();
|
108
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
109
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
110
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
111
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
|
112
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
|
113
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
114
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
115
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
116
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
|
117
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
|
118
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
119
|
+
});
|
120
|
+
|
121
|
+
it('When the user attempts the question partially correct with all the responses correct as per the correct accordion but one response incomplete, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
|
122
|
+
textSelectionPage.steps.resetQuestionPreview();
|
123
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
|
124
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
125
|
+
textSelectionPage.steps.verifyPreviewScore(6, 15);
|
126
|
+
textSelectionPage.steps.switchToGradingView();
|
127
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
128
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
|
129
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
|
130
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
131
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
132
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
133
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
134
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
135
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
|
136
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
|
137
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
138
|
+
});
|
139
|
+
|
140
|
+
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 points of the correctly attempted response and on switching to \'Grading\' view, green check-mark icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative accordion, a status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
|
141
|
+
textSelectionPage.steps.resetQuestionPreview();
|
142
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
|
143
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
144
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
|
145
|
+
textSelectionPage.steps.verifyPreviewScore(10, 15);
|
146
|
+
textSelectionPage.steps.switchToGradingView();
|
147
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
148
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[1]);
|
149
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
|
150
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
|
151
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
152
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
153
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
154
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
155
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
|
156
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
|
157
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
158
|
+
});
|
159
|
+
|
160
|
+
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 points of the correctly attempted response and on switching to \'Grading\' view, green check-mark icon should be besides the common response, no icon should be displayed beside unattempted response, \'Your answer is incorrect\' and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
|
161
|
+
textSelectionPage.steps.resetQuestionPreview();
|
162
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
163
|
+
textSelectionPage.steps.verifyPreviewScore(5, 15);
|
164
|
+
textSelectionPage.steps.switchToGradingView();
|
165
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
166
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
167
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
|
168
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
169
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
170
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
|
171
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
172
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
173
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
|
174
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
|
175
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
176
|
+
});
|
177
|
+
|
178
|
+
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 incorrect response, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all alternate answers should be displayed', () => {
|
179
|
+
textSelectionPage.steps.resetQuestionPreview();
|
180
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[5]);
|
181
|
+
textSelectionPage.steps.verifyPreviewScore(0, 15);
|
182
|
+
textSelectionPage.steps.switchToGradingView();
|
183
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
184
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
185
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
186
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
187
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
188
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[5]);
|
189
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
190
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
|
191
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
|
192
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
|
193
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
194
|
+
});
|
195
|
+
|
196
|
+
it('Overachiever case: When the user attempts the question with more number of correct responses from the correct tab than the alternate accordion but the score of the individual response selected from the alternate accordion overpowers the combined score of the correct tab answers then on switching to the \'Grading view\', then points awarded should be of the alternate accordion, green check-mark icons should be displayed for the alternate accordion response, red cross-mark icon should be displayed for the correct tab responses, status message should not be displayed and correct answer container should be displayed with alternate accordion answers for the responses marked incorrect', () => {
|
197
|
+
cy.log('Pre-step: Switching to Edit tab and allotting points to alternate tab such that the difference between the points is substantial and the points per response are in decimal')
|
198
|
+
textSelectionPage.steps.switchToEditTab();
|
199
|
+
textSelectionPage.steps.deleteAlternativeAnswerAccordion(0);
|
200
|
+
textSelectionPage.steps.allotPoints(5);
|
201
|
+
textSelectionPage.steps.addAlternativeAnswerAccordion(1);
|
202
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
|
203
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[4]);
|
204
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[5]);
|
205
|
+
textSelectionPage.steps.allotPoints(23);
|
206
|
+
textSelectionPage.steps.switchToPreviewTab();
|
207
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
|
208
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
|
209
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[5]);
|
210
|
+
textSelectionPage.steps.verifyPreviewScore(7.6667, 23);
|
211
|
+
textSelectionPage.steps.switchToGradingView();
|
212
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[0]);
|
213
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[1]);
|
214
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
|
215
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
|
216
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
|
217
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[5]);
|
218
|
+
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
219
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
|
220
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
|
221
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[5]);
|
222
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
223
|
+
});
|
224
|
+
});
|
225
|
+
});
|