itemengine-cypress-automation 1.0.113 → 1.0.114
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.js +489 -0
- package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.js +482 -0
- package/cypress/e2e/ILC/AudioResponseNew/customizePlaybackControls.js +488 -0
- package/cypress/e2e/ILC/AudioResponseNew/editAndPreviewTabScoringSection.js +92 -0
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +229 -0
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/headerSection.js +67 -0
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +11 -11
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +529 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +108 -190
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +83 -155
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +104 -315
- package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +121 -135
- package/cypress/e2e/ILC/EssayResponseMath/createItem.js +17 -0
- package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +203 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +121 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +236 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsBasic.js +255 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +237 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +236 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +43 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +187 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingWithAlternativeAnswer.js +245 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/checkAnswerFunctionalityForAllViews.smoke.js +99 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabScoringSection.js +97 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +74 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/manuallyAndNonScoredScoring.js +83 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/previewContentsForAllViews.smoke.js +109 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/specifyCorrectAnswerSection.js +66 -0
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +326 -0
- package/cypress/e2e/ILC/TextEntryMath/checkAnswerFunctionalityForAllViews.smoke.js +163 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +3 -3
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +154 -0
- package/cypress/pages/audioResponsePage.js +523 -66
- package/cypress/pages/components/autoScoredScoringPreviewTab.js +2 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +6 -5
- package/cypress/pages/components/equationEditorFlyout.js +11 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +290 -19
- package/cypress/pages/components/maximumRecorderLengthComponent.js +32 -15
- package/cypress/pages/components/playbackControlsBaseComponent.js +9 -1
- package/cypress/pages/components/questionInputFieldComponent.js +0 -7
- package/cypress/pages/essayResponseBasicPage.js +1 -26
- package/cypress/pages/essayResponsePage.js +21 -284
- package/cypress/pages/shortTextResponsePage.js +142 -103
- package/cypress/pages/textEntryMathPage.js +58 -7
- package/package.json +1 -1
@@ -7,8 +7,6 @@ import utilities from "../support/helpers/utilities";
|
|
7
7
|
const css = Cypress.env('css');
|
8
8
|
|
9
9
|
const allCategories = Object.values(equationEditorCategoriesAndSymbols);
|
10
|
-
let originalText;
|
11
|
-
let formattedText;
|
12
10
|
|
13
11
|
const selectors = {
|
14
12
|
...scoringSectionBaseEditTab,
|
@@ -35,10 +33,6 @@ const selectors = {
|
|
35
33
|
tableHeaderRow: () => cy.get('thead'),
|
36
34
|
tableHeaderCell: () => cy.get('th'),
|
37
35
|
|
38
|
-
//wordCount
|
39
|
-
displayWordCountCheckbox: () => cy.get('[data-ngie-testid="display-word-count-checkbox"] input'),
|
40
|
-
wordCountWrapper: () => cy.get('[class*="indexstyle__WordCharCountWrapper"]'),
|
41
|
-
|
42
36
|
//Special characters
|
43
37
|
specialCharactersPopupTitle: () => cy.get('#alert-dialog-title'),
|
44
38
|
specialCharactersPopupCloseButton: () => cy.get('[class*="close-button"]'),
|
@@ -47,23 +41,8 @@ const selectors = {
|
|
47
41
|
specialCharactersPopupCategoryTitle: () => cy.get('.char-accordion-label'),
|
48
42
|
specialCharactersPopupCategoryAccordionIcon: () => cy.get('.special-math-content [class*="expandIconWrapper"]'),
|
49
43
|
|
50
|
-
///Old
|
51
|
-
//Customize Formatting Options
|
52
|
-
customizeFormattingOptionsAccordion: () => cy.get('.customize-formatting-option-wrapper .ngie-accordion-summary'),
|
53
|
-
customizeFormattingOptionsAccordionLabel: () => cy.get('.customize-formatting-options-label'),
|
54
|
-
customizeFormattingOptionsTiles: (toolbarOption) => cy.get(`.icon-button-custom-format[title="${toolbarOption}"]`),
|
55
|
-
customizeFormattingOptionsWrapper: () => cy.get('.essay-response-grid-wrapper'),
|
56
|
-
equationEditorOptionsWrapper: () => cy.get('[class*="EssayResponseComponentstyles__EquationEditorOptionsWrapper"]'),
|
57
|
-
//Todo: need to remove this and use common component drag handle
|
58
|
-
customizeFormattingOptionsdragHandleButton: () => cy.get('[class*="drag-icon-"]'),
|
59
|
-
equationEditorLabel: () => cy.get('.equation-editor-text-title'),
|
60
|
-
disableCutCopyPasteLabel: () => cy.get('[data-ngie-testid="disable-cut,-copy-and-paste-checkbox"] .MuiFormControlLabel-label'),
|
61
|
-
disableCutCopyPasteCheckbox: () => cy.get('[data-ngie-testid="disable-cut,-copy-and-paste-checkbox"] input'),
|
62
|
-
//Preview tab
|
63
|
-
previewTabColorPalettePopup: () => cy.get('.cke_panel_frame'),
|
64
|
-
previewTabToolbarSeperator: () => cy.get('.essay-preview-wrapper span[class="cke_toolbar_separator"]'),
|
65
|
-
specialCharacterFlyoutIcon: (characterIndex) => cy.get('.img_special_char').eq(characterIndex), //need to update and change this
|
66
44
|
//Equation Editor section
|
45
|
+
equationEditorSectionWrapper: () => cy.get('.essay-response-eqn-editor-wrapper'),
|
67
46
|
equationEditorSectionCategories: () => cy.get('[class*="DraggableItemsGrid"] .icon-button-custom-format'),
|
68
47
|
equationEditorSectionCategoryLabel: () => cy.get('.equation-editor-label-wrapper'),
|
69
48
|
equationEditorSection: () => cy.get('[class*="EquationEditorOptionsWrapper"]'),
|
@@ -71,13 +50,22 @@ const selectors = {
|
|
71
50
|
equationEditorSectionHelperText: () => cy.get('.equation-editor-description-text'),
|
72
51
|
equationEditorSectionCategoriesDragIcon: () => cy.get('.drag-icon-equation-editor-button'),
|
73
52
|
equationEditorSectionCategoriesEditIcon: () => cy.get('.edit-icon-button button'),
|
74
|
-
equationEditorSectionTickIcon: () => cy.get('.tick-icon-wrapper'),
|
53
|
+
equationEditorSectionTickIcon: () => cy.get('[class*="DraggableItemsGrid"] .tick-icon-wrapper'),
|
75
54
|
selectACategoryErrorMessage: () => cy.get('[class*="ErrorBlock"]'),
|
76
55
|
equationEditorSectionCategoryIcon: () => cy.get('.equation-editor-icon'),
|
77
|
-
equationEditorSectionDeleteCustomCategoryIcon: () => cy.get('.delete-button-icon button')
|
56
|
+
equationEditorSectionDeleteCustomCategoryIcon: () => cy.get('.delete-button-icon button'),
|
57
|
+
|
58
|
+
//Controls section
|
59
|
+
controlsOptionsTiles: (formattingOption = null) => {
|
60
|
+
if (formattingOption) {
|
61
|
+
return cy.get(`[class*="ControlsWrapper"] .icon-button-custom-format[title="${formattingOption}"]`)
|
62
|
+
} else {
|
63
|
+
return cy.get('[class*="ControlsWrapper"] .icon-button-custom-format')
|
64
|
+
}
|
65
|
+
}
|
78
66
|
}
|
79
67
|
|
80
|
-
const tableDialogBox = {
|
68
|
+
const tableDialogBox = {
|
81
69
|
//Add table dialog box
|
82
70
|
addTableDialogBox: () => cy.get('.cke_dialog_body'),
|
83
71
|
addTableDialogBoxTitle: () => cy.get('.cke_dialog_title'),
|
@@ -129,14 +117,6 @@ const hyperlinkDialogBox = {
|
|
129
117
|
previewInputFieldHyperlinkText: () => cy.get('div[title="Enter your response to the question here."] a'),
|
130
118
|
}
|
131
119
|
|
132
|
-
const specialAndMathCharacters = {
|
133
|
-
specialAndMathCharacterPopup: () => cy.get('.cke_dialog_body').contains(/Special characters|Math characters/).parents('.cke_dialog_body'),
|
134
|
-
specialAndMathCharacterPopupSymbolsWrapper: () => essayResponsePage.specialAndMathCharacterPopup().find('.special_char_td'),
|
135
|
-
specialAndMathCharacterPopupSymbols: () => essayResponsePage.specialAndMathCharacterPopup().find('.special_char_td a[role="option"]'),
|
136
|
-
specialAndMathCharacterPopupTitle: () => essayResponsePage.specialAndMathCharacterPopup().find('.cke_dialog_title '),
|
137
|
-
specialAndMathCharacterPopupCloseButton: () => essayResponsePage.specialAndMathCharacterPopup().find('a[title="Close"]')
|
138
|
-
}
|
139
|
-
|
140
120
|
const steps = {
|
141
121
|
...createQuestionBasePage.steps,
|
142
122
|
...questionInstructionsComponent.steps,
|
@@ -230,20 +210,6 @@ const steps = {
|
|
230
210
|
});
|
231
211
|
},
|
232
212
|
|
233
|
-
checkDisplayWordCountCheckbox: () => {
|
234
|
-
essayResponsePage.displayWordCountCheckbox()
|
235
|
-
.click()
|
236
|
-
.should('be.checked');
|
237
|
-
},
|
238
|
-
|
239
|
-
/**
|
240
|
-
* verify word count in preview tab
|
241
|
-
* @param {number} wordCount
|
242
|
-
*/
|
243
|
-
verifyWordCount: (wordCount) => {
|
244
|
-
utilities.verifyInnerText(essayResponsePage.wordCountWrapper(), `Words: ${wordCount}`)
|
245
|
-
},
|
246
|
-
|
247
213
|
/**
|
248
214
|
* Verify newly added custom category container is displayed
|
249
215
|
* @param {string} customCategoryName Custom category name
|
@@ -888,94 +854,24 @@ const steps = {
|
|
888
854
|
.parents('.icon-button-custom-format')
|
889
855
|
.should('have.class', 'Mui-selected');
|
890
856
|
},
|
891
|
-
///Old
|
892
|
-
expandCustomizeFormattingOptionsAccordion: () => {
|
893
|
-
essayResponsePage.customizeFormattingOptionsAccordion()
|
894
|
-
.click()
|
895
|
-
.should('have.attr', 'aria-expanded', 'true');
|
896
|
-
},
|
897
|
-
|
898
|
-
selectingCategories: (categoriesArray) => {
|
899
|
-
categoriesArray.forEach((categoryName) => {
|
900
|
-
essayResponsePage.equationEditorSectionCategories()
|
901
|
-
.contains(categoryName, { matchCase: false })
|
902
|
-
.click();
|
903
|
-
});
|
904
|
-
},
|
905
857
|
|
906
|
-
|
907
|
-
* This function verifies the formatting option is in selected state
|
908
|
-
* @param {string} formattingOption name of the formatting option
|
909
|
-
*/
|
910
|
-
verifyCustomizeFormattingOptionIsSelected: (formattingOption) => {
|
911
|
-
essayResponsePage.customizeFormattingOptionsTiles(formattingOption)
|
912
|
-
.should('have.attr', 'data-aria-pressed', 'true');
|
913
|
-
},
|
914
|
-
|
915
|
-
selectCustomizedFormattingOption: (formattingOptionArray) => {
|
858
|
+
selectControlsOption: (formattingOptionArray) => {
|
916
859
|
formattingOptionArray.forEach((formattingOption) => {
|
917
|
-
essayResponsePage.
|
860
|
+
essayResponsePage.controlsOptionsTiles(formattingOption)
|
918
861
|
.click();
|
919
|
-
essayResponsePage.
|
862
|
+
essayResponsePage.controlsOptionsTiles(formattingOption)
|
920
863
|
.should('have.attr', 'data-aria-pressed', 'true');
|
921
864
|
});
|
922
865
|
},
|
923
866
|
|
924
|
-
|
925
|
-
|
926
|
-
essayResponsePage.
|
867
|
+
selectingCategories: (categoriesArray) => {
|
868
|
+
categoriesArray.forEach((categoryName) => {
|
869
|
+
essayResponsePage.equationEditorSectionCategories()
|
870
|
+
.contains(categoryName, { matchCase: false })
|
927
871
|
.click();
|
928
|
-
essayResponsePage.customizeFormattingOptionsTiles(formattingOption)
|
929
|
-
.should('have.attr', 'data-aria-pressed', 'false');
|
930
872
|
});
|
931
873
|
},
|
932
874
|
|
933
|
-
deselectPreviewTabToolbarOption: (toolbarOption) => {
|
934
|
-
essayResponsePage.previewTabToolbarOption(toolbarOption)
|
935
|
-
.click()
|
936
|
-
.should('have.attr', 'aria-pressed', 'false');
|
937
|
-
},
|
938
|
-
|
939
|
-
selectColorFromPopup: (color) => {
|
940
|
-
essayResponsePage.previewTabColorPalettePopup()
|
941
|
-
.its('0.contentDocument.body').should('not.be.empty')
|
942
|
-
.within(() => {
|
943
|
-
cy.get('div[title="Colors"]')
|
944
|
-
.last()
|
945
|
-
.find(`[title="${color}"]`)
|
946
|
-
.last()
|
947
|
-
.click();
|
948
|
-
});
|
949
|
-
},
|
950
|
-
|
951
|
-
verifyUndoAndRedoFunctionality: (toolbarOption, orignalText, formattedText) => {
|
952
|
-
essayResponsePage.previewTabToolbarOption('Undo (Ctrl+Z)')
|
953
|
-
.click();
|
954
|
-
if (toolbarOption == 'Background Color' || toolbarOption == 'Text Color') {
|
955
|
-
essayResponsePage.previewTabToolbarOption(toolbarOption)
|
956
|
-
.should('have.attr', 'aria-expanded', 'false');
|
957
|
-
} else {
|
958
|
-
essayResponsePage.previewTabToolbarOption(toolbarOption)
|
959
|
-
.should('have.attr', 'aria-pressed', 'false');
|
960
|
-
};
|
961
|
-
essayResponsePage.responseField()
|
962
|
-
.verifyInnerHTML(orignalText);
|
963
|
-
essayResponsePage.previewTabToolbarOption('Redo (Ctrl+Y)')
|
964
|
-
.click();
|
965
|
-
if (toolbarOption == 'Background Color' || toolbarOption == 'Text Color') {
|
966
|
-
essayResponsePage.previewTabToolbarOption(toolbarOption)
|
967
|
-
.should('have.attr', 'aria-expanded', 'true');
|
968
|
-
} else if (toolbarOption == 'Insert Horizontal Line' || toolbarOption == 'Code Editor' || toolbarOption == 'Increase Indent' || toolbarOption == 'Decrease Indent' || toolbarOption == 'Remove Format') {
|
969
|
-
essayResponsePage.previewTabToolbarOption(toolbarOption)
|
970
|
-
.should('have.attr', 'aria-pressed', 'false');
|
971
|
-
} else {
|
972
|
-
essayResponsePage.previewTabToolbarOption(toolbarOption)
|
973
|
-
.should('have.attr', 'aria-pressed', 'true');
|
974
|
-
};
|
975
|
-
essayResponsePage.responseField()
|
976
|
-
.verifyInnerHTML(formattedText);
|
977
|
-
},
|
978
|
-
|
979
875
|
/**
|
980
876
|
* @description this function verifies value in input field of hyperlink dialog box URL input value
|
981
877
|
* @param {string} inputValue value in the input field
|
@@ -1060,6 +956,7 @@ const tests = {
|
|
1060
956
|
...autoScoredScoringPreviewTab.tests,
|
1061
957
|
...commonComponents.tests,
|
1062
958
|
...customizeSpecialCharacterComponent.tests,
|
959
|
+
...essayResponseCommonComponents.tests,
|
1063
960
|
|
1064
961
|
/**
|
1065
962
|
* insert equation and verify input field content and word count
|
@@ -1074,165 +971,6 @@ const tests = {
|
|
1074
971
|
});
|
1075
972
|
},
|
1076
973
|
|
1077
|
-
verifyUndoAndRedoFunctionalityForPreviewTabToolbarOption: (toolbarOption) => {
|
1078
|
-
it(`When the user enters text in the response field, selects the text and selects the ${toolbarOption} toolbar option and clicks on the \'Undo\' toolbar option, then it should undo the latest action and when the user clicks on the \'Redo\' toolbar option, then it should redo the latest action`, () => {
|
1079
|
-
essayResponsePage.steps.resetPreviewTabResponseField();
|
1080
|
-
essayResponsePage.responseField()
|
1081
|
-
.type('Lorem Ipsum');
|
1082
|
-
if (toolbarOption == 'Decrease Indent') {
|
1083
|
-
essayResponsePage.previewTabToolbarOption('Increase Indent')
|
1084
|
-
.click();
|
1085
|
-
} else if (toolbarOption == 'Remove Format') {
|
1086
|
-
essayResponsePage.responseField()
|
1087
|
-
.type('{selectAll}');
|
1088
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption('Bold (Ctrl+B)');
|
1089
|
-
};
|
1090
|
-
essayResponsePage.responseField()
|
1091
|
-
.then(($originalText) => {
|
1092
|
-
originalText = $originalText[0].innerHTML
|
1093
|
-
essayResponsePage.responseField()
|
1094
|
-
.type('{selectAll}');
|
1095
|
-
if (toolbarOption == 'Background Color' || toolbarOption == 'Text Color') {
|
1096
|
-
essayResponsePage.previewTabToolbarOption(toolbarOption)
|
1097
|
-
.click();
|
1098
|
-
essayResponsePage.steps.selectColorFromPopup('Strong Cyan');
|
1099
|
-
} else {
|
1100
|
-
essayResponsePage.steps.selectPreviewTabToolbarOption(toolbarOption);
|
1101
|
-
};
|
1102
|
-
essayResponsePage.responseField()
|
1103
|
-
.then(($formattedText) => {
|
1104
|
-
formattedText = $formattedText[0].innerHTML
|
1105
|
-
essayResponsePage.steps.verifyUndoAndRedoFunctionality(toolbarOption, originalText, formattedText);
|
1106
|
-
});
|
1107
|
-
});
|
1108
|
-
});
|
1109
|
-
},
|
1110
|
-
|
1111
|
-
verifySpecialOrMathCharactersPopup: (popupType) => {
|
1112
|
-
it(`${specialOrMathCharacters[popupType].popupTitle} option should be displayed in the preview tab toolbar`, () => {
|
1113
|
-
essayResponsePage.previewTabToolbarOption(`${specialOrMathCharacters[popupType].popupTitle}`)
|
1114
|
-
.should('be.visible');
|
1115
|
-
});
|
1116
|
-
|
1117
|
-
it(`When user clicks on ${specialOrMathCharacters[popupType].popupTitle} option in the toolbar, then the ${specialOrMathCharacters[popupType].popupTitle} popup should appear`, () => {
|
1118
|
-
essayResponsePage.previewTabToolbarOption(`${specialOrMathCharacters[popupType].popupTitle}`)
|
1119
|
-
.click();
|
1120
|
-
essayResponsePage.specialAndMathCharacterPopup()
|
1121
|
-
.should('be.visible');
|
1122
|
-
});
|
1123
|
-
|
1124
|
-
it(`When the ${specialOrMathCharacters[popupType].popupTitle} popup has appeared, the first symbol should be in focus`, () => {
|
1125
|
-
essayResponsePage.specialAndMathCharacterPopupSymbolsWrapper()
|
1126
|
-
.eq(0)
|
1127
|
-
.should('have.css', 'background-color', css.color.focusedSpecialCharacterSymbol);
|
1128
|
-
});
|
1129
|
-
|
1130
|
-
it(`CSS of ${specialOrMathCharacters[popupType].popupTitle} popup`, { tags: 'css' }, () => {
|
1131
|
-
essayResponsePage.specialAndMathCharacterPopupTitle()
|
1132
|
-
.verifyCSS(css.color.questionHeading, css.fontSize.heading, css.fontWeight.bold);
|
1133
|
-
essayResponsePage.specialAndMathCharacterPopupSymbols()
|
1134
|
-
.each(($element) => {
|
1135
|
-
cy.wrap($element)
|
1136
|
-
.find('.img_special_char')
|
1137
|
-
.verifyPseudoClassBeforeProperty('color', css.color.specialCharacterSymbol);
|
1138
|
-
});
|
1139
|
-
});
|
1140
|
-
|
1141
|
-
it(`Accessibility of ${specialOrMathCharacters[popupType].popupTitle} popup`, { tags: 'a11y' }, () => {
|
1142
|
-
cy.checkAccessibility(essayResponsePage.specialAndMathCharacterPopup());
|
1143
|
-
});
|
1144
|
-
|
1145
|
-
it(`Title of the popup should be ${specialOrMathCharacters[popupType].popupTitle}`, () => { //TODO: Need to update this after DOM structure update.
|
1146
|
-
essayResponsePage.specialAndMathCharacterPopupTitle()
|
1147
|
-
.then(($title) => {
|
1148
|
-
const fullTitle = $title.text()
|
1149
|
-
const properTitle = fullTitle.replace('Close', '');
|
1150
|
-
expect(specialOrMathCharacters[popupType].popupTitle).to.deep.eq(properTitle);
|
1151
|
-
});
|
1152
|
-
});
|
1153
|
-
|
1154
|
-
it(`All the ${specialOrMathCharacters[popupType].popupTitle} symbols should be displayed in the popup`, () => {
|
1155
|
-
let symbolsArray = Object.values(specialOrMathCharacters[popupType].characters);
|
1156
|
-
essayResponsePage.specialAndMathCharacterPopupSymbolsWrapper()
|
1157
|
-
.each(($element, count) => {
|
1158
|
-
cy.wrap($element)
|
1159
|
-
.should('be.visible')
|
1160
|
-
.find('.img_special_char span')
|
1161
|
-
.verifyInnerText(symbolsArray[count].symbol);
|
1162
|
-
});
|
1163
|
-
essayResponsePage.specialAndMathCharacterPopupSymbols()
|
1164
|
-
.each(($element, count) => {
|
1165
|
-
cy.wrap($element)
|
1166
|
-
.should('have.attr', 'Title', symbolsArray[count].title);
|
1167
|
-
});
|
1168
|
-
});
|
1169
|
-
|
1170
|
-
it('\'Close\' button should be displayed in the popup and when user clicks on it then the popup should close.', () => {
|
1171
|
-
essayResponsePage.specialAndMathCharacterPopupCloseButton()
|
1172
|
-
.should('be.visible')
|
1173
|
-
.click();
|
1174
|
-
essayResponsePage.specialAndMathCharacterPopup()
|
1175
|
-
.should('not.be.visible');
|
1176
|
-
});
|
1177
|
-
},
|
1178
|
-
|
1179
|
-
addSpecialOrMathCharactersToResponseField: (popupType) => {
|
1180
|
-
it(`When user clicks on a symbol in the ${specialOrMathCharacters[popupType].popupTitle} popup, then that symbol should be inserted in the response field`, () => {
|
1181
|
-
cy.log('Clicking on all symbols.');
|
1182
|
-
let symbolsString = specialOrMathCharacters[popupType].characters.map((icon) => icon.symbol);
|
1183
|
-
symbolsString = symbolsString.join('');
|
1184
|
-
symbolsString = symbolsString.concat('\n');
|
1185
|
-
essayResponsePage.specialAndMathCharacterPopupSymbols()
|
1186
|
-
.each(($element) => {
|
1187
|
-
cy.wrap($element)
|
1188
|
-
.click();
|
1189
|
-
});
|
1190
|
-
essayResponsePage.specialAndMathCharacterPopupCloseButton()
|
1191
|
-
.click();
|
1192
|
-
essayResponsePage.responseField()
|
1193
|
-
.verifyInnerText(symbolsString);
|
1194
|
-
});
|
1195
|
-
|
1196
|
-
it(`When the user selects the added ${specialOrMathCharacters[popupType].popupTitle} symbols and clicks on any formatting option, then the formatting should be applied to the displayed special characters`, () => {
|
1197
|
-
let symbolsString = specialOrMathCharacters[popupType].characters.map((icon) => icon.symbol);
|
1198
|
-
symbolsString = symbolsString.join('');
|
1199
|
-
essayResponsePage.responseField()
|
1200
|
-
.type('{selectAll}');
|
1201
|
-
essayResponsePage.previewTabToolbarOption('Bold (Ctrl+B)')
|
1202
|
-
.click();
|
1203
|
-
essayResponsePage.responseField()
|
1204
|
-
.verifyInnerHTML(`<p><strong>${symbolsString}</strong><br></p>`);
|
1205
|
-
});
|
1206
|
-
|
1207
|
-
it(`When user adds ${specialOrMathCharacters[popupType].popupTitle} symbols to the response field, then the word count should increase accordingly`, () => {
|
1208
|
-
essayResponsePage.responseFieldWordCount()
|
1209
|
-
.verifyInnerText('1/10000');
|
1210
|
-
cy.log('Adding a space and inserting more symbols in the response field.');
|
1211
|
-
essayResponsePage.responseField()
|
1212
|
-
.click()
|
1213
|
-
.type(' ');
|
1214
|
-
essayResponsePage.previewTabToolbarOption(`${specialOrMathCharacters[popupType].popupTitle}`)
|
1215
|
-
.click();
|
1216
|
-
essayResponsePage.specialAndMathCharacterPopupSymbols()
|
1217
|
-
.eq(0)
|
1218
|
-
.click();
|
1219
|
-
essayResponsePage.specialAndMathCharacterPopupCloseButton()
|
1220
|
-
.click();
|
1221
|
-
essayResponsePage.responseFieldWordCount()
|
1222
|
-
.verifyInnerText('2/10000');
|
1223
|
-
});
|
1224
|
-
|
1225
|
-
it(`CSS of the added ${specialOrMathCharacters[popupType].popupTitle} symbols`, { tags: 'css' }, () => {
|
1226
|
-
essayResponsePage.responseField()
|
1227
|
-
.find('p')
|
1228
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
1229
|
-
});
|
1230
|
-
|
1231
|
-
it(`Accessibility of the added ${specialOrMathCharacters[popupType].popupTitle} symbols`, { tags: 'a11y' }, () => {
|
1232
|
-
cy.checkAccessibility(essayResponsePage.responseField());
|
1233
|
-
});
|
1234
|
-
},
|
1235
|
-
|
1236
974
|
verifyEquationEditorFlyoutSymbolCategoriesFunctionality: (categoryName, wordCount) => {
|
1237
975
|
let symbols = Object.values(equationEditorCategoriesAndSymbols[categoryName].symbols)
|
1238
976
|
let mappedArr = symbols.map(x => x.displayText)
|
@@ -1261,7 +999,6 @@ export const essayResponsePage = {
|
|
1261
999
|
...selectors,
|
1262
1000
|
...tableDialogBox,
|
1263
1001
|
...hyperlinkDialogBox,
|
1264
|
-
...specialAndMathCharacters,
|
1265
1002
|
steps,
|
1266
1003
|
tests
|
1267
1004
|
}
|