itemengine-cypress-automation 1.0.207-18thJuneRepoUpdate-460e9c8.0 → 1.0.208-19thJuneUpdates-bd9686f.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/audioOverviewAndTranscript.js +1 -1
  2. package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +13 -13
  3. package/cypress/e2e/ILC/ChartsBar/selectChartTypeSection.js +13 -13
  4. package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +7 -7
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +2 -2
  6. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +1 -1
  7. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +3 -1
  8. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +388 -823
  9. package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +2 -0
  10. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +1 -0
  11. package/cypress/pages/components/additionalSettingsPanel.js +1 -0
  12. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +2 -1
  13. package/cypress/pages/components/barAndLineChartComponent.js +3 -7
  14. package/cypress/pages/components/createQuestionBasePage.js +2 -1
  15. package/cypress/pages/components/draggableOptionContainer.js +2 -2
  16. package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +1 -1
  17. package/cypress/pages/dragAndDropIntoCategoriesPage.js +7 -6
  18. package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
  19. package/cypress/pages/graphingPage.js +4 -0
  20. package/cypress/pages/gridFillPage.js +2 -2
  21. package/cypress/pages/imageHighlightPage.js +11 -1
  22. package/package.json +1 -1
@@ -53,6 +53,7 @@ describe('Create item page - List ordering: All or nothing for "Horizontal" opti
53
53
  break;
54
54
  case 'Grading view':
55
55
  cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
56
+ cy.wait(3000);
56
57
  break;
57
58
  }
58
59
  });
@@ -67,6 +68,7 @@ describe('Create item page - List ordering: All or nothing for "Horizontal" opti
67
68
 
68
69
  it('When the user selects \'Grading\' view without attempting the question, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
69
70
  if (view === 'Grading view') {
71
+ utilities.verifyElementVisibilityState(studentViewPage.submitButton(), 'visible');
70
72
  studentViewPage.steps.submitResponse();
71
73
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
72
74
  studentViewPage.steps.clickOnGoToGradingViewButton();
@@ -318,6 +318,7 @@ describe('Create item page - Text entry math: Question instructions, Options sec
318
318
 
319
319
  it('When user selects a text container and changes text container pointer style in edit tab, then changes in text container pointer should be reflected in preview tab', () => {
320
320
  textEntryMathWithImagePage.steps.switchToEditTab();
321
+ textEntryMathWithImagePage.steps.selectCanvasMenuButton('Select text container');
321
322
  textEntryMathWithImagePage.steps.selectResponseArea(0);
322
323
  textEntryMathWithImagePage.steps.selectResponseAreaPointerStyle(textContainerPointerStyles[7]);
323
324
  textEntryMathWithImagePage.steps.switchToPreviewTab();
@@ -168,6 +168,7 @@ const tests = {
168
168
  });
169
169
 
170
170
  it(`Clicking on \'Font size\' dropdown should open a list of ${Object.keys(fontSizes).length} options - ${Object.keys(fontSizes).join(',')}`, () => {
171
+ commonComponents.steps.verifyDropdownIsCollapsed();
171
172
  additionalSettingsPanel.steps.expandFontSizeDropdown();
172
173
  cy.wait(200)
173
174
  utilities.verifyElementVisibilityState(commonComponents.dropdownList(), 'visible');
@@ -31,7 +31,8 @@ const selectors = {
31
31
  totalPenaltyPointsInputField: () => cy.get('input[aria-label="total penalty points"]'),
32
32
  specifyPointsForEachIncorrectOptionRadioButton: () => cy.get('input[aria-label*="Specify points for each incorrect"]'),
33
33
  specifyPointsForEachIncorrectOptionRadioButtonLabel: () => cy.get('label[aria-label*="Specify points for each incorrect"]'),
34
- penaltyPointsForEachIncorrectOptionInputField: () => cy.get('input[aria-label*="Penalty points for each incorrect"]'),
34
+ //Note: Need to change the selector after https://redmine.zeuslearning.com/issues/575044 is resolved
35
+ penaltyPointsForEachIncorrectOptionInputField: () => cy.get('input[aria-label*="enalty points for each incorrect"]'),
35
36
  penaltyPointsDetailsSectionInputFieldLabel: () => cy.get('[class*="PenaltyScoreForEachIncorrectstyles__PointsLabel"]'),
36
37
  penaltyPointsDetailsSectionAllottedPointsLabel: () => cy.get('[class*="PenaltyScoreForEachIncorrectstyles__LabelFieldWrapper"]'),
37
38
  roundingLabel: () => cy.get('#rounding-dropdown-label'),
@@ -56,7 +56,7 @@ const selectors = {
56
56
  yAxisLabelSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail [class*="ChartsPreviewstyles__LeftWrapper"] .title-container'),
57
57
 
58
58
  //Preview tab
59
- previewTabToolsAddBarOrPointButton: (ariaLabel) => cy.get(`[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button[aria-label*="${ariaLabel}"]`),
59
+ previewTabToolsAddBarOrPointButton: () => cy.get(`[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button[aria-label*="Add"]`),
60
60
  previewTabToolsUndoButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(1),
61
61
  previewTabToolsRedoButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(2),
62
62
  previewTabToolsResetButton: () => cy.get('[class*="question-preview-wrapper"] [class*="ChartsPreviewstyles__PreviewWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(3),
@@ -175,12 +175,8 @@ const steps = {
175
175
  .click();
176
176
  },
177
177
 
178
- /**
179
- * @description selects add bar or add point button
180
- * @param {("Add bar"| "Add point")} ariaLabel ariaLabel holds aria-label for the element
181
- */
182
- addBarOrPointInChartInPreviewTab: (ariaLabel) => {
183
- barAndLineChartComponent.previewTabToolsAddBarOrPointButton(ariaLabel)
178
+ addBarOrPointInChartInPreviewTab: () => {
179
+ barAndLineChartComponent.previewTabToolsAddBarOrPointButton()
184
180
  .click();
185
181
  },
186
182
 
@@ -14,7 +14,8 @@ const selectors = {
14
14
  headerTitle: () => cy.get('div[class*="HeaderComponentstyles__BlockLabel"]'),
15
15
  cancelButton: () => cy.get('[class*="header-wrapper"] .ngie-button').eq(0),
16
16
  saveQuestionButton: () => cy.get('[class*="header-wrapper"] .ngie-button').eq(1),
17
- editTabWrapper: () => cy.get('[class*="EditTabWrapper"]')
17
+ //Note: Adding visible as this is hidden in tools and does not exist in questions
18
+ editTabWrapper: () => cy.get('[class*="EditTabWrapper"]:visible')
18
19
  }
19
20
 
20
21
  const steps = {
@@ -619,13 +619,13 @@ const tests = {
619
619
  draggableOptionContainer.steps.verifyGroupedContainerContentsInPreviewTab(1, ['', '']);
620
620
  });
621
621
 
622
- //Need to update once https://redmine.zeuslearning.com/issues/557984 is resolved
623
622
  it('When the user deletes a group, it should get removed from options container of the \'Preview tab\'', () => {
624
623
  cy.log('Pre step: Switching to edit tab')
625
624
  createQuestionBasePage.steps.switchToEditTab();
626
- cy.log('Pre step: Entering text into the text fields of group 2 response container')
625
+ draggableOptionsSectionComponent.steps.switchToGroupTab(1);
627
626
  optionsWrapperComponent.steps.addInputToOptionsInputField(['option 3', 'option 4']);
628
627
  draggableOptionsSectionComponent.steps.addGroupTitle('Group title B');
628
+ cy.log('Pre step: Entering text into the text fields of group 2 response container')
629
629
  draggableOptionsSectionComponent.steps.switchToGroupTab(0);
630
630
  draggableOptionsSectionComponent.steps.deleteGroup(0);
631
631
  createQuestionBasePage.steps.switchToPreviewTab();
@@ -9,7 +9,7 @@ const selectors = {
9
9
  borderColorLabel: () => cy.get('.sub-section-label').eq(1),
10
10
  colorBlock: () => cy.get('.color-picker-block'),
11
11
  editColorButton: () => cy.get('button[aria-label="edit color"]'),
12
- borderStyleLabel: () => cy.get('[class*="styles__LabelWrapper"].options-label').last(),
12
+ borderStyleLabel: () => cy.get('.options-border-style .options-label'),
13
13
  dashedBorderStyleToggleButton: () => cy.get('[data-ngie-testid="dashed-toggle-button"]').eq(0),
14
14
  dottedBorderStyleToggleButton: () => cy.get('[data-ngie-testid="dotted-toggle-button"]').eq(0),
15
15
  solidBorderStyleToggleButton: () => cy.get('[data-ngie-testid="solid-toggle-button"]').eq(0),
@@ -154,6 +154,7 @@ const selectors = {
154
154
  optionAlignmentInPanelOptions: (alignmentOption) => cy.get(`.option-alignment button[aria-label*="option alignment in panel ${alignmentOption}"]`),
155
155
  optionsWrapper: () => cy.get('[class*="StandardDropZonestyles__DraggableItemsGrid"]'),
156
156
  optionsWrapperPreviewTab: () => cy.get('.edit-question-preview-wrapper [class*="StandardDropZonestyles__DraggableItemsGrid"]'),
157
+ optionsPreviewTab: () => cy.get('[class*="CellDropZonestyles__DraggableItemWrapper"]'),
157
158
  optionPanelWrapper: () => cy.get('.option-drag-and-drop')
158
159
  }
159
160
 
@@ -476,7 +477,7 @@ const steps = {
476
477
  verifyIncorrectOptionIcon: (optionIndex) => {
477
478
  dragAndDropIntoCategoriesPage.categoryGridPreviewTab()
478
479
  .within(() => {
479
- dragAndDropIntoCategoriesPage.optionsWrapper()
480
+ dragAndDropIntoCategoriesPage.optionsPreviewTab()
480
481
  .eq(optionIndex)
481
482
  .should('have.class', 'incorrect-answer-item');
482
483
  });
@@ -489,7 +490,7 @@ const steps = {
489
490
  verifyCorrectOptionIcon: (optionIndex) => {
490
491
  dragAndDropIntoCategoriesPage.categoryGridPreviewTab()
491
492
  .within(() => {
492
- dragAndDropIntoCategoriesPage.optionsWrapper()
493
+ dragAndDropIntoCategoriesPage.optionsPreviewTab()
493
494
  .eq(optionIndex)
494
495
  .should('have.class', 'correct-answer-item');
495
496
  });
@@ -1967,11 +1968,11 @@ const steps = {
1967
1968
  switch (dragHandleOption) {
1968
1969
  case 'drag icon':
1969
1970
  dragAndDropIntoCategoriesPage.dragHandle()
1970
- .should('have.class', 'drag-icon-button ');
1971
+ .should('have.class', 'drag-icon-button');
1971
1972
  break;
1972
1973
  case 'arrow icon':
1973
1974
  dragAndDropIntoCategoriesPage.dragHandle()
1974
- .should('have.class', 'drag-arrows-icon ');
1975
+ .should('have.class', 'drag-arrows-icon');
1975
1976
  break;
1976
1977
  case 'none':
1977
1978
  dragAndDropIntoCategoriesPage.dragHandle()
@@ -1990,14 +1991,14 @@ const steps = {
1990
1991
  dragAndDropIntoCategoriesPage.previewTabQuestionWrapper()
1991
1992
  .within(() => {
1992
1993
  dragAndDropIntoCategoriesPage.dragHandle()
1993
- .should('have.class', 'drag-icon-button ');
1994
+ .should('have.class', 'drag-icon-button');
1994
1995
  });
1995
1996
  break;
1996
1997
  case 'arrow icon':
1997
1998
  dragAndDropIntoCategoriesPage.previewTabQuestionWrapper()
1998
1999
  .within(() => {
1999
2000
  dragAndDropIntoCategoriesPage.dragHandle()
2000
- .should('have.class', 'drag-arrows-icon ');
2001
+ .should('have.class', 'drag-arrows-icon');
2001
2002
  });
2002
2003
  break;
2003
2004
  case 'none':
@@ -1016,7 +1016,7 @@ const tests = {
1016
1016
  it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
1017
1017
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
1018
1018
  utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible')
1019
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
1019
+ utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Minimum one response token is required.');
1020
1020
  if (accordionName == 'Correct') {
1021
1021
  autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1022
1022
  .within(() => {
@@ -1498,9 +1498,11 @@ const steps = {
1498
1498
  .find('image')
1499
1499
  .invoke('attr', 'width')
1500
1500
  .then((imageValue) => {
1501
+ graphingPage.steps.switchToEditTab();
1501
1502
  graphingPage.widthInputField()
1502
1503
  .invoke('attr', 'value')
1503
1504
  .then((widthInputFieldValue) => {
1505
+ graphingPage.steps.switchToPreviewTab();
1504
1506
  expect(imageValue).to.eq(widthInputFieldValue);
1505
1507
  });
1506
1508
  });
@@ -1511,9 +1513,11 @@ const steps = {
1511
1513
  .find('image')
1512
1514
  .invoke('attr', 'width')
1513
1515
  .then((imageValue) => {
1516
+ graphingPage.steps.switchToEditTab();
1514
1517
  graphingPage.widthInputField()
1515
1518
  .invoke('attr', 'value')
1516
1519
  .then((widthInputFieldValue) => {
1520
+ graphingPage.steps.switchToPreviewTab();
1517
1521
  expect(imageValue).to.not.eq(widthInputFieldValue);
1518
1522
  });
1519
1523
  });
@@ -185,8 +185,8 @@ const selectors = {
185
185
  rowsWrapperPreviewTab: () => cy.get('[class*="GridFillResponsestyles__RowContainer"]:visible'),
186
186
  paginationButtonWrapperPreviewTab: () => cy.get('[class*="PaginationControlWrapper"]'),
187
187
  paginationTextPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationDetails"]'),
188
- previousPaginationButtonPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(2),
189
- nextPaginationButtonPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(3),
188
+ previousPaginationButtonPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(0),
189
+ nextPaginationButtonPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(1),
190
190
  canvasTitlePreviewTab: () => cy.get('[class*="GridFillResponsestyles__CanvasTitleWrapper"]'),
191
191
  correctAnswerLabel: () => cy.get('[class*="GridFillResponsestyles__CorrectAnswerLabel"]'),
192
192
  warningMessageContainer: () => cy.get('.disabled-wrapper-cls'),
@@ -888,7 +888,7 @@ const steps = {
888
888
  */
889
889
  verifyCorrectHighlightRegion: (index) => {
890
890
  utilities.verifyCSS(imageHighlightPage.highlightPolygonPreviewTab().eq(index), {
891
- 'fill': css.color.correctAnswerHighlightRegion,
891
+ 'fill': css.color.correctAnswer,
892
892
  'stroke': css.color.correctAnswer
893
893
  });
894
894
  imageHighlightPage.highlightPreviewTab()
@@ -900,6 +900,16 @@ const steps = {
900
900
  });
901
901
  },
902
902
 
903
+ /**
904
+ * @param {number} index of highlight region
905
+ * @description this function verifies the highlight region is correct when unattempted in grading view
906
+ */
907
+ verifyCorrectHighlightRegionNotAttemptedGradingView: (index) => {
908
+ utilities.verifyCSS(imageHighlightPage.highlightPolygonPreviewTab().eq(index), {
909
+ 'stroke': css.color.correctAnswer
910
+ });
911
+ },
912
+
903
913
  /**
904
914
  * @param {*} index of highlight region
905
915
  * @description this function verifies the highlight region is incorrect
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.207-18thJuneRepoUpdate-460e9c8.0",
3
+ "version": "1.0.208-19thJuneUpdates-bd9686f.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {