itemengine-cypress-automation 1.0.89 → 1.0.91

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. package/cypress/e2e/ILC/Desmos/desmosGeometryToolPreviewContents.smoke.js +1 -1
  2. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +3 -3
  3. package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +418 -0
  4. package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +1 -1
  5. package/cypress/e2e/ILC/EssayResponseBasic/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
  6. package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +1 -1
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +0 -1
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +79 -0
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/conditionalCheckboxScoring.js +335 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +64 -1
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +334 -0
  12. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +180 -0
  13. package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +55 -0
  14. package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +257 -0
  15. package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +68 -0
  16. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +773 -0
  17. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +1 -1
  18. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +50 -50
  19. package/cypress/fixtures/theme/ilc.json +1 -1
  20. package/cypress/pages/components/commonComponents.js +1 -1
  21. package/cypress/pages/components/desmosToolComponent.js +1 -1
  22. package/cypress/pages/components/equationEditorFlyout.js +118 -7
  23. package/cypress/pages/components/essayResponseCommonComponents.js +26 -1
  24. package/cypress/pages/components/figOverImageCanvasComponent.js +1 -1
  25. package/cypress/pages/drawingResponsePage.js +1 -1
  26. package/cypress/pages/essayResponsePage.js +106 -1
  27. package/cypress/pages/fillInTheGapsOverImageTextPage.js +270 -8
  28. package/cypress/pages/readingRulerPage.js +64 -5
  29. package/cypress/pages/textEntryMathPage.js +112 -8
  30. package/deploy/e2e/deploy.yaml +2 -2
  31. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
+ import { equationEditorCategoriesAndSymbols } from "../fixtures/equationEditorCategoriesAndSymbols ";
1
2
  import { decimalSeparator, evaluationMethods } from "../fixtures/evaluationMethodsAndCustomSettings"
2
3
  import utilities from "../support/helpers/utilities"
3
- import { questionInstructionsComponent, questionInputFieldComponent, createQuestionBasePage, commonComponents, additionalSettingsPanel, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType } from "./components"
4
+ import { questionInstructionsComponent, questionInputFieldComponent, createQuestionBasePage, commonComponents, additionalSettingsPanel, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, autoScoredScoringPreviewTab, equationEditorFlyout, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, ckEditorToolbar } from "./components"
5
+ const css = Cypress.env('css');
4
6
 
5
7
  const selectors = {
6
8
  ...questionInstructionsComponent,
@@ -26,7 +28,7 @@ const selectors = {
26
28
  evaluationTabCloseButton: () => cy.get('.styled-close-button[aria-label*="Evaluation"]'),
27
29
  evaluationContainer: (evaluationMethodTitle = null) => {
28
30
  if (evaluationMethodTitle) {
29
- return cy.get(`.evaluation-styled-card[title*="${evaluationMethodTitle}"]`)
31
+ return cy.get(`.evaluation-styled-card`).contains(evaluationMethodTitle)
30
32
  } else {
31
33
  return cy.get('.evaluation-styled-card')
32
34
  }
@@ -68,13 +70,20 @@ const selectors = {
68
70
  syntaxDropdown: () => cy.get('#Syntax-select'),
69
71
  syntaxDropdownOption: () => cy.get('[aria-labelledby*="Syntax-dropdown-label"] li'),
70
72
 
71
- //preview tab, TODO: Update selectors once preview is finalized
72
- responseFieldPreviewTab: () => cy.get('.cloze-with-text-response-preview-wrapper [role="textbox"]'),
73
- questionContainerPreviewTab: () => cy.get('[class*="ClozeWithTextPreviewstyle__QuestionPreviewWrapper"]'),
74
-
75
73
  //Additional settings
76
74
  textContainersAriaLabelInputField: () => cy.get('[class*="ClozeMathstyle__SingleAriaLabelContainer"]'),
77
75
  textContainersAriaLabelInputFieldNumeration: () => cy.get('[class*="ClozeMathstyle__Numeration"]'),
76
+
77
+ //Preview tab
78
+ responseFieldPreviewTab: () => cy.get('.preview-question-text-wrapper [role="textbox"]'),
79
+ responseFieldNumerationPreviewTab: () => cy.get('.preview-question-text-wrapper .response-input-adornment'),
80
+ questionContainerPreviewTab: () => cy.get('[class*="ClozeWithTextPreviewstyle__QuestionPreviewWrapper"]'),
81
+ tickIcon: () => cy.get('.cloze-with-text-answer-status-response-preview-wrapper .tick-icon-wrapper'),
82
+ correctAnswersContainerResponse: () => cy.get('.cloze-with-text-correct-response-wrapper .response-input-field'),
83
+ correctAnswersContainerResponseNumeration: () => cy.get('.cloze-with-text-correct-response-wrapper .response-input-adornment'),
84
+ correctAnswersLabel: () => cy.get('.cloze-with-text-correct-answer-label'),
85
+ correctIncorrectStatusMessageText: () => cy.get('[class*="AnswerLabelText"]'),
86
+ correctAnswersContainer: () => cy.get('[class*="__AnswerLabelWrapper"]')
78
87
  }
79
88
 
80
89
  const steps = {
@@ -84,6 +93,12 @@ const steps = {
84
93
  ...autoScoredSpecifyCorrectAnswerSection.steps,
85
94
  ...scoringSectionBaseEditTab.steps,
86
95
  ...autoScoredScoringSectionMultiResponseType.steps,
96
+ ...questionInstructionsComponent.steps,
97
+ ...autoScoredScoringPreviewTab.steps,
98
+ ...autoScoredStudentViewSettings.steps,
99
+ ...equationEditorFlyout.steps,
100
+ ...correctIncorrectAnswerLabelComponent.steps,
101
+ ...ckEditorToolbar.steps,
87
102
 
88
103
  verifyAddStructureTabIsSelected: () => {
89
104
  textEntryMathPage.addStructureTab()
@@ -152,6 +167,15 @@ const steps = {
152
167
  .blur();
153
168
  },
154
169
 
170
+ /**
171
+ * clear answer input field in specify correct answer section
172
+ * @param {number} answerFieldIndex answer input field index
173
+ */
174
+ clearAnswerInputFieldSpecifyCorrectAnswer: (answerFieldIndex) => {
175
+ utilities.getNthElement(textEntryMathPage.responseAccordionAnswerInputField(), answerFieldIndex)
176
+ .clear();
177
+ },
178
+
155
179
  /**
156
180
  * Add input to response accordion answer input field in specify correct answer section
157
181
  * @param {string} input input to be given in answer input field
@@ -187,7 +211,8 @@ const steps = {
187
211
  */
188
212
  verifyEvaluationMethodActiveState: (evaluationMethodTitle) => {
189
213
  textEntryMathPage.evaluationContainer(evaluationMethodTitle)
190
- .should('have.class', 'evaluation-selected-styled-card');
214
+ .parents('.evaluation-styled-card')
215
+ .should('exist');
191
216
  },
192
217
 
193
218
  /**
@@ -587,7 +612,86 @@ const steps = {
587
612
  .within(() => {
588
613
  scoringSectionBaseEditTab.steps.allotPoints(pointsInputFieldValue);
589
614
  });
590
- }
615
+ },
616
+
617
+ //Preview tab
618
+ /**
619
+ *@description Verifies the correctness of answer responses in the correct answer section, including the count.
620
+ * @param {string[][]} correctAnswerArray An array of arrays, each containing the expected answer options for a specific correct answer section.
621
+ */
622
+ verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount: (correctAnswerArray) => {
623
+ utilities.verifyElementCount(textEntryMathPage.correctAnswersContainerResponse(), correctAnswerArray.length);
624
+ correctAnswerArray.forEach((correctAnswer, index) => {
625
+ utilities.verifyTextContent(utilities.getNthElement(textEntryMathPage.correctAnswersContainerResponseNumeration(), index), index + 1);
626
+ correctAnswer.forEach((answerOption) => {
627
+ utilities.verifyTextContent(utilities.getNthElement(textEntryMathPage.correctAnswersContainerResponse(), index), answerOption);
628
+ });
629
+ });
630
+ },
631
+
632
+ verifyResponseFieldNumerationPreviewTab: () => {
633
+ textEntryMathPage.responseFieldNumerationPreviewTab()
634
+ .each(($element, index) => {
635
+ cy.wrap($element)
636
+ .should('have.text', `${index + 1}`)
637
+ });
638
+ },
639
+
640
+ /**
641
+ * Focus in the answer input fields of the preview tab
642
+ * @param {number} responseIndex indx of the response to add input
643
+ */
644
+ focusInResponseAnswerInputFieldPreviewTab: (responseIndex) => {
645
+ textEntryMathPage.responseFieldPreviewTab()
646
+ .eq(responseIndex)
647
+ .click();
648
+ },
649
+
650
+ /**
651
+ * Focus in the answer input fields of the preview tab
652
+ * @param {number} responseIndex indx of the response to add input
653
+ */
654
+ focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection: (responseIndex) => {
655
+ textEntryMathPage.responseAccordionAnswerInputField()
656
+ .eq(responseIndex)
657
+ .click();
658
+ },
659
+
660
+ verifyCorrectResponseIcon: (index) => {
661
+ textEntryMathPage.tickIcon()
662
+ .eq(index)
663
+ .verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
664
+ },
665
+
666
+ verifyIncorrectResponseIcon: (index) => {
667
+ textEntryMathPage.tickIcon()
668
+ .eq(index)
669
+ .verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
670
+ },
671
+
672
+ verifyCorrectAnswerSectionNotExists: () => {
673
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctAnswersLabel(), 'notExist');
674
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctAnswersContainerResponse(), 'notExist');
675
+ },
676
+
677
+ /**
678
+ * @param {("correct" | "incorrect")} answerStatus - The status of the answer.
679
+ * @description Verifies the visibility and content of the correct/incorrect answer label block.
680
+ * If the answer is correct, it also verifies the visibility of the correct icon;
681
+ * otherwise, it verifies the visibility of the incorrect icon.
682
+ */
683
+ verifyCorrectIncorrectAnswerLabel: (answerStatus) => {
684
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctAnswersContainer(), 'visible');
685
+ utilities.verifyInnerText(textEntryMathPage.correctIncorrectStatusMessageText(), `Your answer is ${answerStatus}.`)
686
+ textEntryMathPage.correctAnswersContainer()
687
+ .within(() => {
688
+ if (answerStatus === 'correct') {
689
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
690
+ } else {
691
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'visible');
692
+ }
693
+ });
694
+ },
591
695
  }
592
696
 
593
697
  const tests = {
@@ -9,8 +9,8 @@ variables:
9
9
  deployment:
10
10
  job:
11
11
  activeDeadlineSeconds: 7200
12
- parallelism: 3
13
- completions: 3
12
+ parallelism: 5
13
+ completions: 5
14
14
 
15
15
  image:
16
16
  cmd: /ie-e2e/deploy/e2e/run.sh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.89",
3
+ "version": "1.0.91",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {