itemengine-cypress-automation 1.0.133-7thMarchFixes-0e78080.0 → 1.0.133

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/cypress/e2e/ILC/DesmosGraphing/previewTabContent.smoke.js +1 -2
  2. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +53 -54
  3. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +0 -149
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +312 -0
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +71 -0
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  7. package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +98 -0
  8. package/cypress/e2e/ILC/GeogebraActivity/editTabScoringSection.js +56 -0
  9. package/cypress/e2e/ILC/GeogebraActivity/gradingViewAndCorrectAnswerViewContents.smoke.js +106 -0
  10. package/cypress/e2e/ILC/GeogebraActivity/headerSection.js +74 -0
  11. package/cypress/e2e/ILC/GeogebraActivity/previewTabContent.smoke.js +91 -0
  12. package/cypress/e2e/ILC/GeogebraActivity/questionInstructions.js +28 -0
  13. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingPenaltyScoring.js +79 -0
  14. package/cypress/e2e/ILC/Graphing/Scoring/manuallyAndNonScoredScoring.js +253 -0
  15. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +307 -0
  16. package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +84 -0
  17. package/cypress/e2e/ILC/Graphing/editTabScoringSection.js +105 -0
  18. package/cypress/e2e/ILC/Graphing/headerSection.js +77 -0
  19. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +916 -0
  20. package/cypress/e2e/ILC/Graphing/minimumScoringPenaltyPointsAndRoundingDropdown.js +57 -0
  21. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -1
  22. package/cypress/e2e/ILC/Graphing/specifyCorrectAnswerSection.js +72 -0
  23. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +120 -0
  24. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +858 -0
  25. package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +337 -4
  26. package/cypress/fixtures/constants.js +1 -1
  27. package/cypress/fixtures/theme/ilc.json +3 -1
  28. package/cypress/pages/components/additionalSettingsAccessibilitySectionComponent.js +66 -0
  29. package/cypress/pages/components/additionalSettingsPanel.js +95 -90
  30. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +9 -7
  31. package/cypress/pages/components/backgroundImageUploadComponent.js +16 -14
  32. package/cypress/pages/components/colorPopupComponent.js +14 -17
  33. package/cypress/pages/components/commonComponents.js +1 -1
  34. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -1
  35. package/cypress/pages/components/imageCanvasComponent.js +3 -3
  36. package/cypress/pages/components/index.js +2 -2
  37. package/cypress/pages/components/opacityComponent.js +1 -1
  38. package/cypress/pages/components/scoringSectionBaseEditTab.js +18 -0
  39. package/cypress/pages/components/studentResponseAreaAndLayoutComponent.js +1 -1
  40. package/cypress/pages/dialogBoxBase.js +1 -1
  41. package/cypress/pages/drawingResponsePage.js +35 -4
  42. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +2 -2
  43. package/cypress/pages/fillInTheGapsOverImageTextPage.js +2 -0
  44. package/cypress/pages/geogebraActivityPage.js +106 -0
  45. package/cypress/pages/graphingPage.js +1458 -77
  46. package/cypress/pages/index.js +1 -0
  47. package/cypress/pages/multipleSelectionPage.js +0 -1
  48. package/cypress/pages/shortTextResponsePage.js +155 -3
  49. package/cypress/pages/uploadResponsePage.js +0 -2
  50. package/package.json +2 -2
@@ -398,12 +398,32 @@ const steps = {
398
398
  * @param {string} strokeColor color of the selected option displayed below the secondary option
399
399
  * @description this function verifies secondary option stroke color
400
400
  */
401
- verifySecondaryOptionStrokeColor: (index, strokeColor) => {
401
+ verifySecondaryOptionTextColor: (index, strokeColor) => {
402
+ utilities.verifyCSS(drawingResponsePage.previewTabSecondaryToolbarOption().eq(index).find('svg path[data-name*="Path"]').eq(0), {
403
+ 'fill': strokeColor
404
+ });
405
+ },
406
+
407
+ /**
408
+ * @param {string} strokeColor color of the selected option displayed below the secondary option
409
+ * @description this function verifies secondary option color
410
+ */
411
+ verifySecondaryOptionFillColor: (index, strokeColor) => {
402
412
  utilities.verifyCSS(drawingResponsePage.previewTabSecondaryToolbarOption().eq(index).find('svg path[data-name*="Path"]').eq(1), {
403
413
  'fill': strokeColor
404
414
  });
405
415
  },
406
416
 
417
+ /**
418
+ * @param {string} strokeColor color of the selected option displayed below the secondary option
419
+ * @description this function verifies secondary option stroke color
420
+ */
421
+ verifySecondaryOptionStrokeColor: (index, strokeColor) => {
422
+ utilities.verifyCSS(drawingResponsePage.previewTabSecondaryToolbarOption().eq(index).find('svg path[data-name*="Path"]').last(), {
423
+ 'fill': strokeColor
424
+ });
425
+ },
426
+
407
427
  verifyPreviewTabColorPickerLabel: () => {
408
428
  utilities.verifyInnerText(drawingResponsePage.previewTabColorPickerLabel(), 'Select color')
409
429
  },
@@ -421,7 +441,8 @@ const steps = {
421
441
  selectToolbarOptionsAndControlsFormattingOptionsTiles: (toolbarOptionsArray) => {
422
442
  toolbarOptionsArray.forEach((toolbarOption) => {
423
443
  drawingResponsePage.toolbarOptionsAndControlsFormattingOptionsTiles(toolbarOption)
424
- .click()
444
+ .click();
445
+ drawingResponsePage.toolbarOptionsAndControlsFormattingOptionsTiles(toolbarOption)
425
446
  .should('have.attr', 'aria-label', `${toolbarOption} selected`);
426
447
  });
427
448
  },
@@ -467,12 +488,22 @@ const steps = {
467
488
 
468
489
  verifyColorPopupCancelButton: () => {
469
490
  utilities.verifyInnerText(drawingResponsePage.colorPalleteCancelButton(), 'Cancel');
470
- utilities.verifyElementVisibilityState(drawingResponsePage.colorPalleteCancelButton(), 'visible');
491
+ utilities.verifyElementVisibilityState(drawingResponsePage.colorPalleteCancelButton(), 'exist');
471
492
  },
472
493
 
473
494
  verifyColorPopupOkButton: () => {
474
495
  utilities.verifyInnerText(drawingResponsePage.colorPalleteOkButton(), 'OK');
475
- utilities.verifyElementVisibilityState(drawingResponsePage.colorPalleteOkButton(), 'visible');
496
+ utilities.verifyElementVisibilityState(drawingResponsePage.colorPalleteOkButton(), 'exist');
497
+ },
498
+
499
+ clickOnColorPopupCancelButton: () => {
500
+ drawingResponsePage.colorPalleteCancelButton()
501
+ .realClick();
502
+ },
503
+
504
+ clickOnColorPopupOkButton: () => {
505
+ drawingResponsePage.colorPalleteOkButton()
506
+ .realClick();
476
507
  },
477
508
 
478
509
  clickOnEditTabColorPaletteOkButton: () => {
@@ -14,7 +14,7 @@ const selectors = {
14
14
  ...randomizeOptionsComponent,
15
15
  ...backgroundImageUploadComponent,
16
16
  ...autoScoredScoringSectionMultiResponseType,
17
- dropdownWrapperPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class="Canvasstyle__DropzoneWrapper"]'),
17
+ dropdownWrapperPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="Canvasstyle__DropzoneWrapper"]'),
18
18
  correctAnswerResponseWrapper: () => cy.get('[class*="LabelImageWithDropdownPreviewstyles__AnswerCell"]'),
19
19
  correctAnswerResponse: () => cy.get('[class*="LabelImageWithDropdownPreviewstyles__AnswerWrapper"]'),
20
20
  correctAnswerSectionWrapper: () => cy.get('.dnd-correct-answer-wrapper'),
@@ -176,7 +176,7 @@ const steps = {
176
176
  },
177
177
 
178
178
  verifyCorrectAnswerSectionNotExists: () => {
179
- utilities.verifyElementVisibilityState(fillInTheGapsDropdownPage.correctAnswerSectionWrapper(), 'notExist');
179
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDropdownPage.correctAnswerSectionWrapper(), 'notExist');
180
180
  },
181
181
  }
182
182
 
@@ -15,6 +15,7 @@ const selectors = {
15
15
  ...autoScoredScoringPreviewTab,
16
16
  ...backgroundImageUploadComponent,
17
17
  ...fillInTheGapsTextCommonComponent,
18
+ ...additionalSettingsPanel,
18
19
 
19
20
  //TODO: Update below selectors after https://redmine.zeuslearning.com/issues/557945 is resolved
20
21
 
@@ -252,6 +253,7 @@ const tests = {
252
253
  ...questionInstructionsComponent.tests,
253
254
  ...fillInTheGapsTextCommonComponent.tests,
254
255
  ...customizeSpecialCharacterComponent.tests,
256
+ ...additionalSettingsPanel.tests
255
257
  }
256
258
 
257
259
  export const fillInTheGapsOverImageTextPage = {
@@ -0,0 +1,106 @@
1
+ import utilities from "../support/helpers/utilities";
2
+ import { createQuestionBasePage, questionInstructionsComponent, scoringSectionBaseEditTab, commonComponents, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components"
3
+ const selectors = {
4
+ ...questionInstructionsComponent,
5
+ ...scoringSectionBaseEditTab,
6
+ ...commonComponents,
7
+ ...additionalSettingsPanel,
8
+ insertResourceLinkLabel: () => cy.get('.label-wrapper'),
9
+ httpsLabel: () => cy.get('.start-adornment'),
10
+ insertResourceLinkInputField: () => cy.get('.insert-resource-link-field input'),
11
+ geoGebraResourceFullScreenButton: () => cy.get('[data-title="Fullscreen"]'),
12
+ geoGebraResourceToolbarTool: () => cy.get('.toolbar_button'),
13
+ editApplicationTitle: () => cy.get('[class*="GeogebraActivitystyle__EditApplicationTitleWrapper"]'),
14
+ geoGebraItemCanvas: () => cy.get('canvas[data-test="euclidianView"]'),
15
+ widthLabel: () => cy.get('[class*="GeogebraDimensionstyle__LabelInputWrapper"]').eq(0),
16
+ heightLabel: () => cy.get('[class*="GeogebraDimensionstyle__LabelInputWrapper"]').eq(1),
17
+ widthInputField: () => cy.get('[class*="GeogebraDimensionstyle__DimensionInputWrapper"] input').eq(0),
18
+ heightInputField: () => cy.get('[class*="GeogebraDimensionstyle__DimensionInputWrapper"] input').eq(1),
19
+
20
+ //preview tab
21
+ geoGebraCanvasWrapperPreviewTab: () => cy.get('[id*="geogebra-activity-app-preview"]'),
22
+ geoGebraCanvasPreviewTab: () => cy.get('.geogebra-preview-applet-wrapper canvas[data-test="euclidianView"]'),
23
+ geoGebraResourceFullScreenButtonPreviewTab: () => cy.get('.geogebra-preview-applet-wrapper [data-title="Fullscreen"]'),
24
+ geoGebraResourceToolbarToolPreviewTab: () => cy.get('.geogebra-preview-applet-wrapper .toolbar_button'),
25
+ }
26
+
27
+ const steps = {
28
+ ...createQuestionBasePage.steps,
29
+ ...questionInstructionsComponent.steps,
30
+ ...scoringSectionBaseEditTab.steps,
31
+ ...commonComponents.steps,
32
+ ...additionalSettingsPanel.steps,
33
+
34
+ addGeoGebraResourceLink: () => {
35
+ geoGebraActivityPage.insertResourceLinkInputField()
36
+ .clear()
37
+ .type('https://www.geogebra.org/m/sajppba6')
38
+ .blur();
39
+ },
40
+
41
+ /**
42
+ * @description add input to width input field
43
+ * @param {number} width Width to be set for geoGebra applet
44
+ */
45
+ addInputToWidthInputField: (width) => {
46
+ geoGebraActivityPage.widthInputField()
47
+ .clear()
48
+ .type(width)
49
+ .blur();
50
+ utilities.verifyInputFieldValue(geoGebraActivityPage.widthInputField(), width);
51
+ },
52
+
53
+ /**
54
+ * @description add input to height input field
55
+ * @param {number} height Height to be set for geoGebra applet
56
+ */
57
+ addInputToHeightInputField: (height) => {
58
+ geoGebraActivityPage.heightInputField()
59
+ .clear()
60
+ .type(height)
61
+ .blur();
62
+ utilities.verifyInputFieldValue(geoGebraActivityPage.heightInputField(), height);
63
+ },
64
+
65
+ /**
66
+ * Verify width of geoGebra applet canvas in preview tab
67
+ * @param {number} width Width of geoGebra applet canvas in preview tab
68
+ */
69
+ verifyCanvasWidthPreviewTab: (width) => {
70
+ utilities.verifyCSS(geoGebraActivityPage.geoGebraCanvasWrapperPreviewTab(), {
71
+ 'width': `${width}px`
72
+ });
73
+ },
74
+
75
+ /**
76
+ * Verify height of geoGebra applet canvas in preview tab
77
+ * @param {number} height Height of geoGebra applet canvas in preview tab
78
+ */
79
+ verifyCanvasHeightPreviewTab: (height) => {
80
+ utilities.verifyCSS(geoGebraActivityPage.geoGebraCanvasWrapperPreviewTab(), {
81
+ 'height': `${height}px`
82
+ });
83
+ },
84
+
85
+ provideStudentResponseInStudentView: () => {
86
+ utilities.getNthElement(geoGebraActivityPage.geoGebraResourceToolbarToolPreviewTab(), 1)
87
+ .click();
88
+ geoGebraActivityPage.geoGebraCanvasPreviewTab()
89
+ .click();
90
+ }
91
+ }
92
+
93
+ const tests = {
94
+ ...questionInstructionsComponent.tests,
95
+ ...scoringSectionBaseEditTab.tests,
96
+ ...createQuestionBasePage.tests,
97
+ ...commonComponents.tests,
98
+ ...additionalSettingsPanel.tests,
99
+ ...additionalSettingsAccessibilitySectionComponent.tests,
100
+ }
101
+
102
+ export const geoGebraActivityPage = {
103
+ ...selectors,
104
+ steps,
105
+ tests
106
+ }