itemengine-cypress-automation 1.0.105 → 1.0.107

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +129 -0
  2. package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +482 -0
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +123 -0
  4. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +554 -0
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -41
  6. package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +5 -3
  7. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +284 -0
  8. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +412 -0
  9. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +203 -0
  10. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +340 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  12. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  13. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +336 -0
  14. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
  15. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
  16. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +253 -0
  17. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +266 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +57 -640
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +209 -0
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +209 -0
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +303 -0
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +68 -0
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +149 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +218 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +191 -0
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +219 -0
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +240 -0
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +107 -0
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +1 -1
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +0 -2
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +408 -0
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +2 -2
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +2 -2
  37. package/cypress/e2e/ILC/MultipleSelection/headerSection.js +1 -0
  38. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +0 -6
  39. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
  40. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
  41. package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
  42. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
  43. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
  44. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +138 -33
  45. package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +30 -6
  46. package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +167 -101
  47. package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +1 -1
  48. package/cypress/e2e/ILC/SingleSelection/headerSection.js +20 -5
  49. package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +1 -0
  50. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +12 -7
  51. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +1336 -0
  52. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +419 -0
  53. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +443 -0
  54. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +411 -0
  55. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +411 -0
  56. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +3 -3
  57. package/cypress/fixtures/specialAndMathCharacters.js +2 -0
  58. package/cypress/fixtures/theme/ilc.json +4 -2
  59. package/cypress/pages/audioResponsePage.js +326 -165
  60. package/cypress/pages/components/additionalSettingsPanel.js +1 -1
  61. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
  62. package/cypress/pages/components/backgroundImageUploadComponent.js +162 -2
  63. package/cypress/pages/components/colorPopupComponent.js +115 -26
  64. package/cypress/pages/components/customizeMathCharacterComponent.js +133 -0
  65. package/cypress/pages/components/customizeSpecialCharacterComponent.js +74 -4
  66. package/cypress/pages/components/editCategoryFlyout.js +164 -2
  67. package/cypress/pages/components/equationEditorFlyout.js +36 -1
  68. package/cypress/pages/components/essayResponseCommonComponents.js +0 -2
  69. package/cypress/pages/components/figOverImageCanvasComponent.js +587 -134
  70. package/cypress/pages/components/index.js +2 -1
  71. package/cypress/pages/components/playbackControlsBaseComponent.js +137 -2
  72. package/cypress/pages/correctAnswerViewPage.js +12 -1
  73. package/cypress/pages/drawingResponsePage.js +26 -151
  74. package/cypress/pages/essayResponseMathPage.js +28 -16
  75. package/cypress/pages/essayResponsePage.js +187 -7
  76. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +78 -14
  77. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +178 -221
  78. package/cypress/pages/fillInTheGapsOverImageTextPage.js +79 -0
  79. package/cypress/pages/multipleSelectionPage.js +1 -1
  80. package/cypress/pages/readingRulerPage.js +219 -104
  81. package/cypress/pages/singleSelectionPage.js +1 -0
  82. package/cypress/pages/textEntryMathPage.js +17 -6
  83. package/cypress/pages/videoResponsePage.js +0 -8
  84. package/package.json +1 -1
  85. package/scripts/sorry-cypress.mjs +1 -1
@@ -0,0 +1,123 @@
1
+ import { audioResponsePage, itemPreviewPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+ let previewContentViews = ['Question preview', 'Item preview', 'Student view'];
6
+ const views = utilities.getViews(previewContentViews);
7
+ var itemReferenceID = "";
8
+
9
+ describe('Create item page - Audio response: Preview contents', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ views.forEach((view) => {
15
+ describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
16
+ abortEarlySetup();
17
+ before(() => {
18
+ switch (view) {
19
+ case 'Question preview':
20
+ audioResponsePage.steps.navigateToCreateQuestion('audio response');
21
+ cy.barsPreLoaderWait();
22
+ audioResponsePage.steps.addTextInQuestionInstructionsInputField('Record an audio');
23
+ audioResponsePage.steps.allotPoints(10);
24
+ audioResponsePage.steps.switchToPreviewTab();
25
+ break;
26
+ case 'Item view':
27
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID[0])}`);
28
+ break;
29
+ case 'Item preview':
30
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID[0])}`);
31
+ itemPreviewPage.steps.switchToPreviewTab();
32
+ break;
33
+ case 'Student view':
34
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID[0])}`);
35
+ break;
36
+ };
37
+ });
38
+
39
+ if (view === 'Question preview') {
40
+ after(() => {
41
+ audioResponsePage.steps.clickOnSaveQuestionButton();
42
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
43
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
44
+ });
45
+ };
46
+
47
+ it('Question instructions should be visible', () => {
48
+ utilities.verifyInnerText(audioResponsePage.questionInstructionsText(), 'Record an audio');
49
+ utilities.verifyElementVisibilityState(audioResponsePage.questionInstructionsText(), 'visible');
50
+ });
51
+
52
+ it('When the user switches to preview tab, \'Click the button to start recording...\' help text message, rec button, mic icon, \'Allow microphone access\' help text should be displayed in \'Standard audio recorder\'. Maximum recording length should be displayed in minutes(mm:ss) format.', () => {
53
+ utilities.verifyInnerText(audioResponsePage.standardPreviewRecorderHelpText(), 'Click the button to start recording...');
54
+ utilities.verifyElementVisibilityState(audioResponsePage.standardPreviewRecorderHelpText(), 'visible');
55
+ utilities.verifyInnerText(audioResponsePage.standardPreviewStartRecordingButton(), 'REC');
56
+ utilities.verifyElementVisibilityState(audioResponsePage.standardPreviewStartRecordingButton(), 'visible');
57
+ utilities.verifyElementVisibilityState(audioResponsePage.microphoneIcon(), 'visible');
58
+ utilities.verifyInnerText(audioResponsePage.allowMicrophoneAccessHelpText(), 'Allow microphone access');
59
+ utilities.verifyElementVisibilityState(audioResponsePage.allowMicrophoneAccessHelpText(), 'visible');
60
+ utilities.verifyInnerText(audioResponsePage.standardPreviewRecordTime(), '15:00');
61
+ utilities.verifyElementVisibilityState(audioResponsePage.standardPreviewRecordTime(), 'visible');
62
+ });
63
+
64
+ it('CSS of standard recording interface in Preview tab', { tags: 'css' }, () => {
65
+ utilities.verifyCSS(audioResponsePage.standardPreviewStartRecordingButton(), {
66
+ 'color': css.color.defaultBackground,
67
+ 'font-size': css.fontSize.extraLarge,
68
+ 'font-weight': css.fontWeight.semibold,
69
+ 'border': `2px solid ${css.color.defaultBackground}`,
70
+ 'background-color': css.color.recordingIcon
71
+ });
72
+ utilities.verifyCSS(audioResponsePage.standardPreviewRecorderHelpText(), {
73
+ 'color': css.color.text,
74
+ 'font-size': css.fontSize.normal,
75
+ 'font-weight': css.fontWeight.regular
76
+ });
77
+ utilities.verifyCSS(audioResponsePage.microphoneIcon().find('path').eq(1), {
78
+ 'fill': css.color.microphoneIcon
79
+ });
80
+ utilities.verifyCSS(audioResponsePage.allowMicrophoneAccessHelpText(), {
81
+ 'color': css.color.liText,
82
+ 'font-size': css.fontSize.normal,
83
+ 'font-weight': css.fontWeight.regular
84
+ });
85
+ utilities.verifyCSS(audioResponsePage.standardPreviewRecordTime(), {
86
+ 'color': css.color.liText,
87
+ 'font-size': css.fontSize.small,
88
+ 'font-weight': css.fontWeight.bold
89
+ });
90
+ });
91
+
92
+ it('Accessibility of standard recording interface in Preview tab', { tags: 'a11y' }, () => {
93
+ cy.checkAccessibility(audioResponsePage.standardPreviewRecorderWrapper());
94
+ });
95
+
96
+ it('When the user clicks on the \'REC\' button, the recording should start', () => {
97
+ audioResponsePage.steps.startRecordingStandardPreview();
98
+ utilities.verifyElementVisibilityState(audioResponsePage.startRecordingCountDown(), 'visible');
99
+ utilities.verifyInnerText(audioResponsePage.recordingStatusText(), 'Preparing to record');
100
+ utilities.verifyElementVisibilityState(audioResponsePage.recordingStatusText(), 'visible');
101
+ utilities.verifyElementVisibilityState(audioResponsePage.standardPreviewPauseRecordingButton(), 'visible');
102
+ utilities.verifyElementDisabled(audioResponsePage.standardPreviewPauseRecordingButton());
103
+ utilities.verifyElementVisibilityState(audioResponsePage.standardPreviewStopRecordingButton(), 'visible');
104
+ audioResponsePage.steps.verifyRecordingCountDownNotExists();
105
+ audioResponsePage.steps.waitForRecordingToStartStandardPreview();
106
+ audioResponsePage.steps.verifyRecordingTimeStandardPreview('00:04', '15:00');
107
+ utilities.verifyElementVisibilityState(audioResponsePage.previewVolumeMeter(), 'visible');
108
+ });
109
+
110
+ it('When the user clicks on the stop recording button, the recording should stop and the recording should get saved', () => {
111
+ audioResponsePage.steps.stopRecordingStandardPreview();
112
+ utilities.verifyInnerText(audioResponsePage.savingStatusText(), 'Saving');
113
+ utilities.verifyElementVisibilityState(audioResponsePage.savingStatusText(), 'visible');
114
+ utilities.verifyElementVisibilityState(audioResponsePage.hourGlassIcon(), 'visible');
115
+ utilities.verifyElementVisibilityState(audioResponsePage.standardPreviewRetakeButton(), 'visible');
116
+ utilities.verifyElementVisibilityState(audioResponsePage.playbackWaveform(), 'visible');
117
+ utilities.verifyElementVisibilityState(audioResponsePage.previewVolumeMeter(), 'visible');
118
+ utilities.verifyElementVisibilityState(audioResponsePage.playbackProgressBar(), 'visible');
119
+ utilities.verifyInnerText(audioResponsePage.recordedResponseHelpText(), 'Your response has been recorded.');
120
+ });
121
+ });
122
+ });
123
+ });