itemengine-cypress-automation 1.0.294 → 1.0.295-applitools-219e3f5.0

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.
Files changed (105) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +19 -19
  2. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +12 -2
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +10 -1
  4. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/allOrNothingScoringForAllViews.smoke.js +10 -1
  5. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +1 -1
  6. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/previewContentsForAllViews.smoke.js +10 -1
  7. package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +10 -1
  8. package/cypress/e2e/ILC/ChartsBar/gradingViewAndCorrectAnswerView.smoke.js +12 -2
  9. package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +10 -1
  10. package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +12 -2
  11. package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +12 -3
  12. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +12 -1
  13. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editQuestion.smoke.js +2 -2
  14. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/previewContentsForAllViews.smoke.js +10 -1
  15. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettingsForGroupedLayout.js +0 -4
  16. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +12 -2
  17. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +19 -21
  18. package/cypress/e2e/ILC/EditItem/editItem.ts +7 -7
  19. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +8 -0
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +10 -1
  21. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editQuestion.smoke.js +2 -2
  22. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +11 -1
  23. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +10 -1
  24. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViews.smoke.js +10 -1
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +10 -1
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editQuestion.smoke.js +2 -2
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +10 -1
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +10 -1
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +12 -3
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +10 -1
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +13 -4
  32. package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +10 -1
  33. package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViews.smoke.js +12 -3
  34. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +12 -2
  35. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +13 -4
  36. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +11 -1
  37. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +9 -1
  38. package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +11 -1
  39. package/cypress/e2e/ILC/ImageHighlight/previewContentsForAllViews.smoke.js +13 -4
  40. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +12 -3
  41. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/previewContentsForAllViews.smoke.js +10 -1
  42. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +10 -1
  43. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/previewContentsForAllViews.smoke.js +12 -3
  44. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +14 -4
  45. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/previewContentsForAllViews.smoke.js +3 -3
  46. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +14 -5
  47. package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +12 -3
  48. package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +5 -5
  49. package/cypress/e2e/ILC/MatchingDropdown/previewContentsForAllViews.smoke.js +13 -4
  50. package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +19 -10
  51. package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +11 -2
  52. package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +14 -5
  53. package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +14 -4
  54. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +5 -5
  55. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +12 -2
  56. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +13 -4
  57. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +5 -5
  58. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +3 -2
  59. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +4 -4
  60. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +5 -5
  61. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +10 -0
  62. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +10 -1
  63. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/allOrNothingForAllViews.smoke.js +5 -5
  64. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +2 -2
  65. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/previewContentsForAllViews.smoke.js +1 -1
  66. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  67. package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +1 -1
  68. package/cypress/e2e/ILC/Ruler/rulerPreviewContents.smoke.js +1 -1
  69. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +12 -3
  70. package/cypress/e2e/ILC/ShortTextResponseNew/previewContentsForAllViews.smoke.js +5 -6
  71. package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +1 -1
  72. package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +12 -3
  73. package/cypress/e2e/ILC/SingleSelection/previewContents.smoke.js +10 -1
  74. package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +14 -5
  75. package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +10 -1
  76. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +23 -14
  77. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +5 -6
  78. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +13 -4
  79. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +17 -17
  80. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +13 -5
  81. package/cypress/e2e/ILC/TextSelection/ScoringGeneric/basicScoringForAllTextSelectionTypes.smoke.js +4 -4
  82. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +16 -6
  83. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +8 -8
  84. package/cypress/e2e/ILC/ToolAudioPlayerNew/previewContents.smoke.js +3 -3
  85. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  86. package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +11 -1
  87. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +13 -4
  88. package/cypress/e2e/ILC/UploadResponse/thumbNail.smoke.js +16 -6
  89. package/cypress/e2e/ILC/VideoResponseNew/compactRecorderStyle.smoke.js +3 -3
  90. package/cypress/e2e/ILC/VideoResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +14 -4
  91. package/cypress/e2e/ILC/VideoResponseNew/previewContentsForAllViews.smoke.js +12 -3
  92. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +9 -9
  93. package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +2 -2
  94. package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +13 -4
  95. package/cypress/e2e/applitools.config.js +14 -0
  96. package/cypress/pages/components/autoScoredScoringPreviewTab.js +0 -1
  97. package/cypress/pages/components/equationEditorSectionCommonComponent.js +3 -1
  98. package/cypress/pages/components/gridQuestionCommonComponent.js +1 -39
  99. package/cypress/pages/components/optionsWrapperComponent.js +3 -0
  100. package/cypress/pages/createItemPage.js +2 -2
  101. package/cypress/pages/multipleSelectionPage.js +1 -39
  102. package/cypress/pages/singleSelectionPage.js +1 -39
  103. package/cypress/support/commands.js +11 -0
  104. package/cypress/support/e2e.js +1 -0
  105. package/package.json +4 -1
@@ -8,7 +8,7 @@ import { ckEditorInsertImageComponent } from "./components/ckEditorInsertImageCo
8
8
  import { ckEditorLinkComponent } from "../pages/components/ckEditorLinkComponent"
9
9
  import { createItemPage } from "./createItemPage";
10
10
  import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
11
- import { audioPlayerPage } from "./audioPlayerPage";
11
+ import {audioPlayerPage} from "./audioPlayerPage";
12
12
  const css = Cypress.env('css');
13
13
  const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
14
14
 
@@ -914,44 +914,6 @@ const tests = {
914
914
  ...ckEditorInsertTableComponent.tests,
915
915
  ...ckEditorInsertImageComponent.tests,
916
916
  ...ckEditorLinkComponent.tests,
917
- //Note: need to remove this as change the global function once save as you go is available for all question types
918
- verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet: () => {
919
- it('When the user has not set correct answer option(s) and alloted points, \'Student view\' radio button should be checked, \'Grading view\' button should not be checked, 0 points should be displayed and no correct or incorrect icons should be displayed in the preview tab', () => {
920
- utilities.verifyInnerText(autoScoredScoringPreviewTab.studentViewRadioButtonLabel(), 'Student view');
921
- utilities.verifyInnerText(autoScoredScoringPreviewTab.gradingViewRadioButtonLabel(), 'Grading view');
922
- autoScoredScoringPreviewTab.studentViewRadioButton()
923
- .should('be.checked');
924
- autoScoredScoringPreviewTab.gradingViewRadioButton()
925
- .should('not.be.checked');
926
- autoScoredScoringPreviewTab.steps.checkManuallyScoredScoringLabel();
927
- autoScoredScoringPreviewTab.steps.verifyCorrectIncorrectIconsNotExist();
928
- });
929
-
930
- it('CSS of Preview mode contents', { tags: 'css' }, () => {
931
- utilities.verifyCSS(autoScoredScoringPreviewTab.studentViewRadioButtonLabel(), {
932
- 'color': css.color.labelText,
933
- 'font-size': css.fontSize.normal,
934
- 'font-weight': css.fontWeight.regular
935
- });
936
- utilities.verifyCSS(autoScoredScoringPreviewTab.gradingViewRadioButtonLabel(), {
937
- 'color': css.color.labelText,
938
- 'font-size': css.fontSize.normal,
939
- 'font-weight': css.fontWeight.regular
940
- });
941
- utilities.verifyCSS(autoScoredScoringPreviewTab.scoreLabelPreviewTab(), {
942
- 'color': css.color.codeBlockText,
943
- 'font-size': css.fontSize.default,
944
- 'font-weight': css.fontWeight.bold
945
- });
946
- utilities.verifyCSS(autoScoredScoringPreviewTab.studentViewRadioButton().parent().find('svg'), {
947
- 'fill': css.color.activeButtons
948
- });
949
- utilities.verifyCSS(autoScoredScoringPreviewTab.gradingViewRadioButton().parent().find('svg path'), {
950
- 'fill': css.color.uncheckedCheckbox
951
- });
952
- });
953
- },
954
-
955
917
  /**
956
918
  * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
957
919
  * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
@@ -248,7 +248,7 @@ const steps = {
248
248
  singleSelectionPage.correctAnswerSectionWrapper()
249
249
  .should('be.visible');
250
250
  },
251
-
251
+
252
252
  verifyAnswerBannerNotExist: () => {
253
253
  singleSelectionPage.answerStatusBanner()
254
254
  .should('not.exist');
@@ -719,44 +719,6 @@ const tests = {
719
719
  ...autoScoredStudentViewSettings.tests,
720
720
  ...additionalSettingsAccessibilitySectionComponent.tests,
721
721
  ...mcqAdditionalSettingsBase.tests,
722
- //Note: need to remove this as change the global function once save as you go is available for all question types
723
- verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet: () => {
724
- it('When the user has not set correct answer option(s) and alloted points, \'Student view\' radio button should be checked, \'Grading view\' button should not be checked, 0 points should be displayed and no correct or incorrect icons should be displayed in the preview tab', () => {
725
- utilities.verifyInnerText(autoScoredScoringPreviewTab.studentViewRadioButtonLabel(), 'Student view');
726
- utilities.verifyInnerText(autoScoredScoringPreviewTab.gradingViewRadioButtonLabel(), 'Grading view');
727
- autoScoredScoringPreviewTab.studentViewRadioButton()
728
- .should('be.checked');
729
- autoScoredScoringPreviewTab.gradingViewRadioButton()
730
- .should('not.be.checked');
731
- autoScoredScoringPreviewTab.steps.checkManuallyScoredScoringLabel();
732
- autoScoredScoringPreviewTab.steps.verifyCorrectIncorrectIconsNotExist();
733
- });
734
-
735
- it('CSS of Preview mode contents', { tags: 'css' }, () => {
736
- utilities.verifyCSS(autoScoredScoringPreviewTab.studentViewRadioButtonLabel(), {
737
- 'color': css.color.labelText,
738
- 'font-size': css.fontSize.normal,
739
- 'font-weight': css.fontWeight.regular
740
- });
741
- utilities.verifyCSS(autoScoredScoringPreviewTab.gradingViewRadioButtonLabel(), {
742
- 'color': css.color.labelText,
743
- 'font-size': css.fontSize.normal,
744
- 'font-weight': css.fontWeight.regular
745
- });
746
- utilities.verifyCSS(autoScoredScoringPreviewTab.scoreLabelPreviewTab(), {
747
- 'color': css.color.codeBlockText,
748
- 'font-size': css.fontSize.default,
749
- 'font-weight': css.fontWeight.bold
750
- });
751
- utilities.verifyCSS(autoScoredScoringPreviewTab.studentViewRadioButton().parent().find('svg'), {
752
- 'fill': css.color.activeButtons
753
- });
754
- utilities.verifyCSS(autoScoredScoringPreviewTab.gradingViewRadioButton().parent().find('svg path'), {
755
- 'fill': css.color.uncheckedCheckbox
756
- });
757
- });
758
- },
759
-
760
722
  verifyContentsOfSpecifyCorrectAnswerSection: () => {
761
723
  it('In the \'Correct\' accordion, all options with checkboxes should be displayed', () => {
762
724
  utilities.verifyElementCount(singleSelectionPage.optionWrapperSpecifyCorrectAnswerSection(), 4);
@@ -5,6 +5,7 @@ import 'cypress-file-upload';
5
5
  import { iePage } from './migrationHelpers/verifyIeQuestionData';
6
6
  import { lrnPage } from './migrationHelpers/extractLrnQuestionData';
7
7
  require('cy-verify-downloads').addCustomCommand();
8
+ import { apiKey, browser, serverUrl } from '../e2e/applitools.config';
8
9
  //import addContext from "mochawesome/addContext";
9
10
 
10
11
  const randomUser = (j, username, i) => ({
@@ -154,6 +155,16 @@ Cypress.Commands.add('learnosityLoaderWait', () => {
154
155
  .should('be.visible');
155
156
  });
156
157
 
158
+ Cypress.Commands.add('startApplitools', () => {
159
+ cy.eyesOpen({
160
+ apiKey,
161
+ serverUrl,
162
+ browser,
163
+ appName: 'Applitools Demo - ILC',
164
+ testName: Cypress.currentTest.title,
165
+ });
166
+ });
167
+
157
168
  Cypress.Commands.add('lazyLoadPreviewQuestions', (count, retries = 5) => {
158
169
  iePage.questionAndResourceWrapper()
159
170
  .then((elements) => {
@@ -4,6 +4,7 @@ import 'cypress-axe';
4
4
  import './helpers/cypressUtilities';
5
5
  import './helpers/accessibility';
6
6
  import './helpers/selectText';
7
+ import '@applitools/eyes-cypress/commands'
7
8
 
8
9
  let windowConsoleError;
9
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.294",
3
+ "version": "1.0.295-applitools-219e3f5.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -35,5 +35,8 @@
35
35
  "node-fetch": "^3.3.2",
36
36
  "react-uuid": "^2.0.0",
37
37
  "typescript": "^5.6.3"
38
+ },
39
+ "devDependencies": {
40
+ "@applitools/eyes-cypress": "^3.49.1"
38
41
  }
39
42
  }