itemengine-cypress-automation 1.0.574-IEI-7071-main-eeacc3d.0 → 1.0.574
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +67 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +2 -99
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingWithAlternativeAnswer.js +245 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +73 -55
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +1 -55
- package/cypress/e2e/ILC/ShortTextResponseNew/{Scoring/manuallyAndNonScoredScoring.js → manuallyAndNonScoredScoring.js} +18 -6
- package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +1 -151
- package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +3 -3
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -129
- package/cypress/pages/components/printPreviewComponent.js +1 -8
- package/cypress/pages/shortTextResponsePage.js +6 -195
- package/package.json +1 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -63
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -63
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -87
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingWeightsBasic.js +0 -163
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent
|
|
1
|
+
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent } from "./components/";
|
|
2
2
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
3
3
|
import utilities from "../support/helpers/utilities";
|
|
4
4
|
import { createItemPage } from "./createItemPage";
|
|
@@ -16,8 +16,6 @@ const selectors = {
|
|
|
16
16
|
...commonComponents,
|
|
17
17
|
...additionalSettingsPanel,
|
|
18
18
|
...createQuestionBasePage,
|
|
19
|
-
...printPreviewComponent,
|
|
20
|
-
...autoScoredScoringSectionMultiResponseType,
|
|
21
19
|
|
|
22
20
|
answerLabelSpecifyCorrectAnswerSection: () => cy.get('.answer-label'),
|
|
23
21
|
displayCharacterCountLabel: () => cy.get('[data-ngie-testid="display-character-count-checkbox"] .MuiFormControlLabel-label'),
|
|
@@ -94,23 +92,6 @@ const selectors = {
|
|
|
94
92
|
ariaLabelLabel: () => cy.get('.aria-label-wrapper .title-casing'),
|
|
95
93
|
ariaLabelInputField: () => cy.get('.aria-label-wrapper [role="textbox"]'),
|
|
96
94
|
questionInstructionsTextPreviewTab: () => cy.get('.question-instruction:visible'),
|
|
97
|
-
displayLinesForTheResponseLabel: () => cy.get('label[aria-label*="Display lines for the response"]'),
|
|
98
|
-
displayLinesForTheResponseCheckbox: () => cy.get('input[aria-label*="Display lines for the response"]'),
|
|
99
|
-
numberOfLinesInputField: () => cy.get('[aria-labelledby*="number-of-lines"]'),
|
|
100
|
-
numberOfLinesLabel: () => cy.get('.number-of-lines-label'),
|
|
101
|
-
lineSpacingLabel: () => cy.get('[id="Line-Spacing-dropdown-label"]'),
|
|
102
|
-
lineSpacingDropdown: () => cy.get('.print-layout-settings-detail-wrapper [aria-label*="Line Spacing"]'),
|
|
103
|
-
lineSpacingDropdownListOptions: (ariaLabel = null) => {
|
|
104
|
-
if (ariaLabel) {
|
|
105
|
-
return cy.get(`[aria-labelledby*="Line-Spacing-dropdown-label Line-Spacing-placeholder"] [role="option"][aria-label*="${ariaLabel}"]`)
|
|
106
|
-
} else {
|
|
107
|
-
return cy.get('[aria-labelledby*="Line-Spacing-dropdown-label Line-Spacing-placeholder"] [role="option"]')
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
numberOfLinesInPrintView: () => cy.get('.student-view [class*="ShortTextResponsePreviewstyle__OptionsWrapper"] [class*="ShortTextResponsePreviewstyle__Line"],[class*="ShortTextResponsePreviewstyle__Question"] [class*="ShortTextResponsePreviewstyle__Line"]'),
|
|
111
|
-
answerResponseInputField: () => cy.get('[aria-label*="Enter your response to the question here "]'),
|
|
112
|
-
answerResponseInputFieldWrapper: () => cy.get('.additional-option-placeholder-input input,.additional-option-placeholder-input textarea'),
|
|
113
|
-
answerInputField: () => cy.get('.additional-option-placeholder-input'),
|
|
114
95
|
}
|
|
115
96
|
|
|
116
97
|
const steps = {
|
|
@@ -125,8 +106,6 @@ const steps = {
|
|
|
125
106
|
...additionalSettingsPanel.steps,
|
|
126
107
|
...autoScoredSpecifyCorrectAnswerSection.steps,
|
|
127
108
|
...createItemPage.steps,
|
|
128
|
-
...printPreviewComponent.steps,
|
|
129
|
-
...autoScoredScoringSectionMultiResponseType.steps,
|
|
130
109
|
|
|
131
110
|
verifyCorrectIcon: () => {
|
|
132
111
|
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
|
@@ -200,16 +179,6 @@ const steps = {
|
|
|
200
179
|
.type(text);
|
|
201
180
|
},
|
|
202
181
|
|
|
203
|
-
/**
|
|
204
|
-
* @param {string} text text to entered in response input field
|
|
205
|
-
* @description enters text in answer input field
|
|
206
|
-
*/
|
|
207
|
-
enterTextInAnswerInputField: (text) => {
|
|
208
|
-
shortTextResponsePage.answerResponseInputField()
|
|
209
|
-
.clear()
|
|
210
|
-
.type(text);
|
|
211
|
-
},
|
|
212
|
-
|
|
213
182
|
clearAndFocusOutOfSpecifyCorrectAnswerInputField: () => {
|
|
214
183
|
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
|
215
184
|
.clear()
|
|
@@ -844,14 +813,6 @@ const steps = {
|
|
|
844
813
|
steps.verifyClipboardFunctionButtonUnselectedState(index);
|
|
845
814
|
},
|
|
846
815
|
|
|
847
|
-
deselectAllClipboardFunctionButton: () => {
|
|
848
|
-
for (let index = 0; index < 3; index++) {
|
|
849
|
-
shortTextResponsePage.clipboardFunctionButton(index)
|
|
850
|
-
.click();
|
|
851
|
-
steps.verifyClipboardFunctionButtonUnselectedState(index);
|
|
852
|
-
}
|
|
853
|
-
},
|
|
854
|
-
|
|
855
816
|
enterTextInPlaceholderTextInputField: (text) => {
|
|
856
817
|
shortTextResponsePage.placeholderTextInputField()
|
|
857
818
|
.clear()
|
|
@@ -938,99 +899,7 @@ const steps = {
|
|
|
938
899
|
verifyFlagThisItemNonAccessibleCheckboxIsUnchecked: () => {
|
|
939
900
|
shortTextResponsePage.flagNonAccessibleCheckbox()
|
|
940
901
|
.should('not.be.checked');
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
verifyDisplayLinesForTheResponseCheckboxUnchecked: () => {
|
|
944
|
-
shortTextResponsePage.displayLinesForTheResponseCheckbox()
|
|
945
|
-
.should('not.be.checked');
|
|
946
|
-
},
|
|
947
|
-
|
|
948
|
-
verifyDisplayLinesForTheResponseCheckboxChecked: () => {
|
|
949
|
-
shortTextResponsePage.displayLinesForTheResponseCheckbox()
|
|
950
|
-
.should('be.checked');
|
|
951
|
-
},
|
|
952
|
-
|
|
953
|
-
checkDisplayLinesForTheResponseCheckbox: () => {
|
|
954
|
-
shortTextResponsePage.displayLinesForTheResponseCheckbox()
|
|
955
|
-
.click()
|
|
956
|
-
steps.verifyDisplayLinesForTheResponseCheckboxChecked();
|
|
957
|
-
},
|
|
958
|
-
|
|
959
|
-
uncheckDisplayLinesForTheResponseCheckbox: () => {
|
|
960
|
-
shortTextResponsePage.displayLinesForTheResponseCheckbox()
|
|
961
|
-
.click();
|
|
962
|
-
steps.verifyDisplayLinesForTheResponseCheckboxUnchecked();
|
|
963
|
-
},
|
|
964
|
-
|
|
965
|
-
expandLineSpacingDropdown: () => {
|
|
966
|
-
shortTextResponsePage.lineSpacingDropdown()
|
|
967
|
-
.click();
|
|
968
|
-
},
|
|
969
|
-
|
|
970
|
-
selectLineSpacingDropdownOption: (option) => {
|
|
971
|
-
shortTextResponsePage.lineSpacingDropdownListOptions(option)
|
|
972
|
-
.click();
|
|
973
|
-
utilities.verifyInnerText(shortTextResponsePage.lineSpacingDropdown(), option);
|
|
974
|
-
},
|
|
975
|
-
|
|
976
|
-
addValueInNumberOfLinesInputField: (value) => {
|
|
977
|
-
shortTextResponsePage.numberOfLinesInputField()
|
|
978
|
-
.clear()
|
|
979
|
-
.type(value)
|
|
980
|
-
.should('have.value', value);
|
|
981
|
-
},
|
|
982
|
-
|
|
983
|
-
verifyNumberOfLinesInPrintView: (expectedLines, expectedLineHeight) => {
|
|
984
|
-
shortTextResponsePage.numberOfLinesInPrintView()
|
|
985
|
-
.should('have.length', expectedLines)
|
|
986
|
-
.each(($line) => {
|
|
987
|
-
cy.wrap($line).should('have.css', 'height', expectedLineHeight);
|
|
988
|
-
});
|
|
989
|
-
},
|
|
990
|
-
|
|
991
|
-
copyTextFromAnswerResponseField: () => {
|
|
992
|
-
shortTextResponsePage.answerResponseInputField()
|
|
993
|
-
.focus()
|
|
994
|
-
.type('{selectall}')
|
|
995
|
-
.realPress(['Control', 'c']);
|
|
996
|
-
},
|
|
997
|
-
|
|
998
|
-
cutTextFromAnswerResponseField: () => {
|
|
999
|
-
shortTextResponsePage.answerResponseInputField()
|
|
1000
|
-
.focus()
|
|
1001
|
-
.type('{selectall}')
|
|
1002
|
-
.realPress(['Control', 'x']);
|
|
1003
|
-
},
|
|
1004
|
-
|
|
1005
|
-
pasteTextFromAnswerResponseField: () => {
|
|
1006
|
-
shortTextResponsePage.answerResponseInputField()
|
|
1007
|
-
.focus()
|
|
1008
|
-
.type('{selectall}')
|
|
1009
|
-
.realPress(['Control', 'c'])
|
|
1010
|
-
.realPress(['Control', 'v']);
|
|
1011
|
-
},
|
|
1012
|
-
|
|
1013
|
-
verifySpellCheckOfResponseFieldDisabledInAllViews: () => {
|
|
1014
|
-
shortTextResponsePage.answerResponseInputFieldWrapper()
|
|
1015
|
-
.should('have.prop', 'spellcheck', false);
|
|
1016
|
-
},
|
|
1017
|
-
|
|
1018
|
-
verifySpellCheckOfResponseFieldEnabledInAllViews: () => {
|
|
1019
|
-
shortTextResponsePage.answerInputField()
|
|
1020
|
-
.should('have.prop', 'spellcheck', true);
|
|
1021
|
-
},
|
|
1022
|
-
|
|
1023
|
-
/**
|
|
1024
|
-
* @param {string} text text to be entered in response field
|
|
1025
|
-
* @description enters text in response field
|
|
1026
|
-
*
|
|
1027
|
-
*/
|
|
1028
|
-
enterTextInAnswerInputFieldAllViews: (text) => {
|
|
1029
|
-
shortTextResponsePage.answerResponseInputFieldWrapper()
|
|
1030
|
-
.eq(0)
|
|
1031
|
-
.clear()
|
|
1032
|
-
.type(text);
|
|
1033
|
-
},
|
|
902
|
+
}
|
|
1034
903
|
}
|
|
1035
904
|
|
|
1036
905
|
const tests = {
|
|
@@ -1046,7 +915,6 @@ const tests = {
|
|
|
1046
915
|
...additionalSettingsPanel.tests,
|
|
1047
916
|
...autoScoredSpecifyCorrectAnswerSection.tests,
|
|
1048
917
|
...studentResponseAndLayoutComponent.tests,
|
|
1049
|
-
...printPreviewComponent.tests,
|
|
1050
918
|
|
|
1051
919
|
/**
|
|
1052
920
|
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
|
@@ -1063,11 +931,15 @@ const tests = {
|
|
|
1063
931
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
|
1064
932
|
});
|
|
1065
933
|
|
|
934
|
+
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredCorrectAnswerErrorMessageCSSAndA11y();
|
|
935
|
+
|
|
1066
936
|
it('When gives an input to \'Answer\' input field,then error message should disappear', () => {
|
|
1067
937
|
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Nature');
|
|
1068
938
|
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
|
1069
939
|
});
|
|
1070
940
|
|
|
941
|
+
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
|
942
|
+
|
|
1071
943
|
it(`CSS of ${accordionName} accordion contents`, { tags: 'css' }, () => {
|
|
1072
944
|
utilities.verifyCSS(utilities.getNthElement(shortTextResponsePage.correctAnswerAccordionLabel(), 0), {
|
|
1073
945
|
'color': css.color.accordionLabel,
|
|
@@ -1087,67 +959,6 @@ const tests = {
|
|
|
1087
959
|
utilities.verifyElementCount(shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection(), 1);
|
|
1088
960
|
});
|
|
1089
961
|
},
|
|
1090
|
-
|
|
1091
|
-
verifyPrintLayoutSettingsAccordionAdditionalContent: () => {
|
|
1092
|
-
const lineSpacingDropdownOptions = ['Single', 'Double'];
|
|
1093
|
-
it('\'Display lines for the response\' label should be displayed', () => {
|
|
1094
|
-
utilities.verifyInnerText(shortTextResponsePage.displayLinesForTheResponseLabel(), 'Display lines for the response');
|
|
1095
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.displayLinesForTheResponseLabel(), 'visible');
|
|
1096
|
-
});
|
|
1097
|
-
|
|
1098
|
-
it('Display lines for the response checkbox should be displayed and by default checked', () => {
|
|
1099
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.displayLinesForTheResponseCheckbox(), 'exist');
|
|
1100
|
-
steps.verifyDisplayLinesForTheResponseCheckboxChecked();
|
|
1101
|
-
});
|
|
1102
|
-
|
|
1103
|
-
it('CSS of \'Display lines for the response\' section', { tags: 'css' }, () => {
|
|
1104
|
-
utilities.verifyCSS(shortTextResponsePage.displayLinesForTheResponseLabel(), {
|
|
1105
|
-
'color': css.color.labelText,
|
|
1106
|
-
'font-size': css.fontSize.normal,
|
|
1107
|
-
'font-weight': css.fontWeight.regular
|
|
1108
|
-
});
|
|
1109
|
-
});
|
|
1110
|
-
|
|
1111
|
-
it('Accessibility of \'Display lines for the response\' section', { tags: 'a11y' }, () => {
|
|
1112
|
-
cy.checkAccessibility(shortTextResponsePage.displayLinesForTheResponseLabel().parents('.print-layout-settings-container'));
|
|
1113
|
-
});
|
|
1114
|
-
|
|
1115
|
-
it('User should be able to check and uncheck the \'Display lines for the response\' checkbox', () => {
|
|
1116
|
-
steps.uncheckDisplayLinesForTheResponseCheckbox();
|
|
1117
|
-
steps.checkDisplayLinesForTheResponseCheckbox();
|
|
1118
|
-
});
|
|
1119
|
-
|
|
1120
|
-
it('Number of lines label and input field should be displayed when \'Display lines for the response\' checkbox is checked', () => {
|
|
1121
|
-
utilities.verifyInnerText(shortTextResponsePage.numberOfLinesLabel(), 'Number of lines');
|
|
1122
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.numberOfLinesLabel(), 'visible');
|
|
1123
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.numberOfLinesInputField(), 'exist');
|
|
1124
|
-
});
|
|
1125
|
-
|
|
1126
|
-
it('User should be able to enter value in Number of lines input field', () => {
|
|
1127
|
-
shortTextResponsePage.steps.addValueInNumberOfLinesInputField('5');
|
|
1128
|
-
});
|
|
1129
|
-
|
|
1130
|
-
it(`\'Line Spacing\' label should be displayed and \'Line Spacing\' dropdown should be displayed and in \'Line Spacing\' dropdown \'${lineSpacingDropdownOptions[0]}\' option should be selected by default`, () => {
|
|
1131
|
-
utilities.verifyInnerText(shortTextResponsePage.lineSpacingLabel(), 'Line spacing');
|
|
1132
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.lineSpacingDropdown(), 'visible');
|
|
1133
|
-
utilities.verifyInnerText(shortTextResponsePage.lineSpacingDropdown(), lineSpacingDropdownOptions[0]);
|
|
1134
|
-
});
|
|
1135
|
-
|
|
1136
|
-
it(`\'Line Spacing\' dropdown should have the following options: ${lineSpacingDropdownOptions.join(', ')}`, () => {
|
|
1137
|
-
steps.expandLineSpacingDropdown()
|
|
1138
|
-
lineSpacingDropdownOptions.forEach((option, count) => {
|
|
1139
|
-
utilities.verifyInnerText(shortTextResponsePage.lineSpacingDropdownListOptions().eq(count), option)
|
|
1140
|
-
});
|
|
1141
|
-
shortTextResponsePage.steps.selectLineSpacingDropdownOption('Double')
|
|
1142
|
-
});
|
|
1143
|
-
|
|
1144
|
-
it('User should be able to select options from Line Spacing dropdown', () => {
|
|
1145
|
-
lineSpacingDropdownOptions.forEach((option) => {
|
|
1146
|
-
shortTextResponsePage.steps.expandLineSpacingDropdown();
|
|
1147
|
-
shortTextResponsePage.steps.selectLineSpacingDropdownOption(option)
|
|
1148
|
-
});
|
|
1149
|
-
});
|
|
1150
|
-
},
|
|
1151
962
|
}
|
|
1152
963
|
|
|
1153
964
|
export const shortTextResponsePage = {
|
package/package.json
CHANGED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
|
-
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
|
-
const css = Cypress.env('css');
|
|
4
|
-
|
|
5
|
-
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
6
|
-
before(() => {
|
|
7
|
-
cy.loginAs('admin');
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
|
|
11
|
-
abortEarlySetup();
|
|
12
|
-
before(() => {
|
|
13
|
-
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
|
14
|
-
cy.barsPreLoaderWait();
|
|
15
|
-
shortTextResponsePage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
|
16
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Buildings');
|
|
17
|
-
shortTextResponsePage.steps.allotPoints(10);
|
|
18
|
-
shortTextResponsePage.steps.clickOnAddAlternativeAnswerButton();
|
|
19
|
-
shortTextResponsePage.steps.allotPoints(20);
|
|
20
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Fossil fuel combustion');
|
|
21
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('When the user selects \'Grading\' view without attempting the question, correct/incorrect icons should not be displayed and answer input field should have incorrect answer border and correct answer section should be displayed below response input field', () => {
|
|
25
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
26
|
-
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
27
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
28
|
-
shortTextResponsePage.steps.switchToStudentView();
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it('When the user attempts the question with response from the correct accordion, then the user should be awarded with points specified for correct accordion (less than overall points) and on switching to \'Grading\' view, correct icon should be displayed beside response input field, correct answer border should be displayed and correct answer section should not be displayed', () => {
|
|
32
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Buildings');
|
|
33
|
-
shortTextResponsePage.steps.verifyPreviewScore(10, 20);
|
|
34
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
35
|
-
shortTextResponsePage.steps.verifyCorrectIcon();
|
|
36
|
-
shortTextResponsePage.steps.verifyCorrectAttemptBorder();
|
|
37
|
-
shortTextResponsePage.steps.verifyCorrectAnswerWrapperNotExist();
|
|
38
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it('When the user attempts the question with response from the alternative accordion, then the user should be awarded with points specified for alternative accordion and on switching to \'Grading\' view, correct icon should be displayed beside response input field, correct answer border should be displayed and correct answer section should not be displayed', () => {
|
|
42
|
-
shortTextResponsePage.steps.resetQuestionPreview();
|
|
43
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Fossil fuel combustion');
|
|
44
|
-
shortTextResponsePage.steps.verifyPreviewScore(20, 20);
|
|
45
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
46
|
-
shortTextResponsePage.steps.verifyCorrectIcon();
|
|
47
|
-
shortTextResponsePage.steps.verifyCorrectAttemptBorder();
|
|
48
|
-
shortTextResponsePage.steps.verifyCorrectAnswerWrapperNotExist();
|
|
49
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed beside response input field, incorrect answer border and correct answer section should be displayed', () => {
|
|
53
|
-
shortTextResponsePage.steps.resetQuestionPreview();
|
|
54
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Fossil');
|
|
55
|
-
shortTextResponsePage.steps.verifyPreviewScore(0, 20);
|
|
56
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
57
|
-
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
58
|
-
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
59
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Fossil fuel combustion');
|
|
60
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
});
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
|
-
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
|
-
const css = Cypress.env('css');
|
|
4
|
-
|
|
5
|
-
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
6
|
-
before(() => {
|
|
7
|
-
cy.loginAs('admin');
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points is equal to \'Alternative answer\' points', () => {
|
|
11
|
-
abortEarlySetup();
|
|
12
|
-
before(() => {
|
|
13
|
-
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
|
14
|
-
cy.barsPreLoaderWait();
|
|
15
|
-
shortTextResponsePage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
|
16
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Buildings');
|
|
17
|
-
shortTextResponsePage.steps.allotPoints(20);
|
|
18
|
-
shortTextResponsePage.steps.clickOnAddAlternativeAnswerButton();
|
|
19
|
-
shortTextResponsePage.steps.allotPoints(20);
|
|
20
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Fossil fuel combustion');
|
|
21
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('When the user switches to \'Grading\' view without attempting the question, then incorrect border and correct answer section should be displayed', () => {
|
|
25
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
26
|
-
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
27
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
28
|
-
shortTextResponsePage.steps.switchToStudentView();
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it('When the user attempts the question with response from the correct accordion, then the user should be awarded with points specified for correct accordion and on switching to \'Grading\' view, correct icon should be displayed beside response input field, correct answer border should be displayed and correct answer section should not be displayed', () => {
|
|
32
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Buildings');
|
|
33
|
-
shortTextResponsePage.steps.verifyPreviewScore(20, 20);
|
|
34
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
35
|
-
shortTextResponsePage.steps.verifyCorrectIcon();
|
|
36
|
-
shortTextResponsePage.steps.verifyCorrectAttemptBorder();
|
|
37
|
-
shortTextResponsePage.steps.verifyCorrectAnswerWrapperNotExist();
|
|
38
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it('When the user attempts the question with response from the alternative accordion, then the user should be awarded with points specified for alternative accordion (same as correct answer points) and on switching to \'Grading\' view, correct icon should only be displayed beside response input field, correct answer border and correct answer section should not be displayed in question preview', () => {
|
|
42
|
-
shortTextResponsePage.steps.resetQuestionPreview();
|
|
43
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Fossil fuel combustion');
|
|
44
|
-
shortTextResponsePage.steps.verifyPreviewScore(20, 20);
|
|
45
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
46
|
-
shortTextResponsePage.steps.verifyCorrectIcon();
|
|
47
|
-
shortTextResponsePage.steps.verifyCorrectAttemptBorder();
|
|
48
|
-
shortTextResponsePage.steps.verifyCorrectAnswerWrapperNotExist();
|
|
49
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed beside response input field, incorrect answer border and correct answer section should be displayed in question preview', () => {
|
|
53
|
-
shortTextResponsePage.steps.resetQuestionPreview();
|
|
54
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Incorrect');
|
|
55
|
-
shortTextResponsePage.steps.verifyPreviewScore(0, 20);
|
|
56
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
57
|
-
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
58
|
-
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
59
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
60
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
});
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { shortTextResponsePage } from "../../../../pages/shortTextResponsePage";
|
|
2
|
-
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
|
-
const css = Cypress.env('css');
|
|
4
|
-
|
|
5
|
-
describe('Create item page - Short text response: All or nothing with alternative answer', () => {
|
|
6
|
-
before(() => {
|
|
7
|
-
cy.loginAs('admin');
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
|
|
11
|
-
abortEarlySetup();
|
|
12
|
-
before(() => {
|
|
13
|
-
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
|
14
|
-
cy.barsPreLoaderWait();
|
|
15
|
-
shortTextResponsePage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
|
16
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Buildings');
|
|
17
|
-
shortTextResponsePage.steps.allotPoints(20);
|
|
18
|
-
shortTextResponsePage.steps.clickOnAddAlternativeAnswerButton();
|
|
19
|
-
shortTextResponsePage.steps.allotPoints(10);
|
|
20
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Fossil fuel combustion');
|
|
21
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('When the user selects \'Grading\' view without attempting the question then incorrect answer border and correct answer section should be displayed and correct/incorrect icons should not be displayed', () => {
|
|
25
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
26
|
-
shortTextResponsePage.steps.verifyCorrectIncorrectIconNotVisibleGradingView();
|
|
27
|
-
shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExist();
|
|
28
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
29
|
-
shortTextResponsePage.steps.switchToStudentView();
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it('When the user attempts the question with response from the correct accordion, then the user should be awarded with points specified for correct accordion and on switching to \'Grading\' view, correct icon and correct answer border should be displayed and correct answer section should not be displayed', () => {
|
|
33
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Buildings');
|
|
34
|
-
shortTextResponsePage.steps.verifyPreviewScore(20, 20);
|
|
35
|
-
shortTextResponsePage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
|
36
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
37
|
-
shortTextResponsePage.steps.verifyCorrectIcon();
|
|
38
|
-
shortTextResponsePage.steps.verifyCorrectAttemptBorder();
|
|
39
|
-
shortTextResponsePage.steps.verifyCorrectAnswerWrapperNotExist();
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
shortTextResponsePage.tests.verifyPointsCorrectAnswerLabelAndBorderCSSAndA11y('short text response');
|
|
43
|
-
|
|
44
|
-
it('When the user attempts the question with response from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than overall points) and on switching to \'Grading\' view, correct icon should be displayed beside response input field and correct answer border be displayed and correct answer section should not be displayed', () => {
|
|
45
|
-
shortTextResponsePage.steps.resetQuestionPreview();
|
|
46
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Fossil fuel combustion');
|
|
47
|
-
shortTextResponsePage.steps.verifyPreviewScore(10, 20);
|
|
48
|
-
shortTextResponsePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
49
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
50
|
-
shortTextResponsePage.steps.verifyCorrectIcon();
|
|
51
|
-
shortTextResponsePage.steps.verifyCorrectAttemptBorder();
|
|
52
|
-
shortTextResponsePage.steps.verifyCorrectAnswerWrapperNotExist();
|
|
53
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed beside response input field, incorrect answer border and correct answer section should be displayed in question preview', () => {
|
|
57
|
-
shortTextResponsePage.steps.resetQuestionPreview();
|
|
58
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Incorrect answer');
|
|
59
|
-
shortTextResponsePage.steps.verifyPreviewScore(0, 20);
|
|
60
|
-
shortTextResponsePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
61
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
62
|
-
shortTextResponsePage.steps.verifyIncorrectIcon();
|
|
63
|
-
shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
|
|
64
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
shortTextResponsePage.tests.verifyIncorrectAnswerLabelAndBorderCSSAndA11y('short text response');
|
|
68
|
-
|
|
69
|
-
it('When the user sets \'Award minimum score only if attempted\' in minimum scoring dropdown and allots minimum points such that minimum points are less than alternative answer points, then attempts the question with response from the alternative accordion, the user should be awarded with alternative answer points', () => {
|
|
70
|
-
shortTextResponsePage.steps.switchToEditTab();
|
|
71
|
-
shortTextResponsePage.steps.expandMinimumScoringDropdown();
|
|
72
|
-
shortTextResponsePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
|
73
|
-
shortTextResponsePage.steps.allotMinimumPoints(3);
|
|
74
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
|
75
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Fossil fuel combustion');
|
|
76
|
-
shortTextResponsePage.steps.verifyPreviewScore(10, 20);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
it('When the user sets minimum points such that minimum points are greater than alternative answer points, then attempts the question with response from the alternative accordion, the user should be awarded with minimum points', () => {
|
|
80
|
-
shortTextResponsePage.steps.switchToEditTab();
|
|
81
|
-
shortTextResponsePage.steps.allotMinimumPoints(13);
|
|
82
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
|
83
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Fossil fuel combustion');
|
|
84
|
-
shortTextResponsePage.steps.verifyPreviewScore(13, 20);
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
});
|