itemengine-cypress-automation 1.0.90 → 1.0.92
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/Desmos/desmosGeometryToolPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +3 -3
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +418 -0
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseBasic/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +79 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/conditionalCheckboxScoring.js +335 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +64 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +334 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +180 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +55 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +257 -0
- package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +68 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +773 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +50 -50
- package/cypress/fixtures/theme/ilc.json +1 -1
- package/cypress/pages/components/commonComponents.js +1 -1
- package/cypress/pages/components/desmosToolComponent.js +1 -1
- package/cypress/pages/components/equationEditorFlyout.js +118 -7
- package/cypress/pages/components/essayResponseCommonComponents.js +26 -1
- package/cypress/pages/components/figOverImageCanvasComponent.js +1 -1
- package/cypress/pages/drawingResponsePage.js +1 -1
- package/cypress/pages/essayResponsePage.js +106 -1
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +270 -8
- package/cypress/pages/readingRulerPage.js +64 -5
- package/cypress/pages/textEntryMathPage.js +112 -8
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +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
|
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
|
-
.
|
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 = {
|
package/package.json
CHANGED
@@ -40,7 +40,7 @@ function setCommandLineEnvArgs() {
|
|
40
40
|
|
41
41
|
if (env === 'dev') {
|
42
42
|
fileConfig = 'fileConfig=ildev'
|
43
|
-
} else if (env === '
|
43
|
+
} else if (env === 'staging') {
|
44
44
|
fileConfig = 'fileConfig=ilstage'
|
45
45
|
} else if (env === 'qa') {
|
46
46
|
fileConfig = 'fileConfig=ilqa'
|