itemengine-cypress-automation 1.0.68 → 1.0.70
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +2 -2
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseScoringSection.js +2 -2
- package/cypress/e2e/ILC/FeedbackScale/feedbackScaleAdditionalSettingsBasic.js +8 -9
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedOptionsPartialEqualWeightsWithAlternateAnswer.js +0 -4
- package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +2 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingScoring.js +2 -0
- package/cypress/e2e/ILC/Highlight/{highlightBasicScoringForTextSelectionTypes.js → HighlightScoring/highlightBasicScoringForTextSelectionTypes.js} +1 -1
- package/cypress/e2e/ILC/Highlight/HighlightScoring/{manualAndNonScored.js → manuallyAndNonScored.js} +1 -1
- package/cypress/e2e/ILC/Highlight/HighlightScoring/{partialDifferentWeightsCorrectEqualToAlternatePoints.js → partialDifferentWeightsCorrectPointsEqualToAlternatePoints.js} +2 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsScoring.js +7 -2
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsCorrectPointEqualToAlternatePoints.js +2 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsScoring.js +6 -1
- package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsBasic.js +2 -3
- package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsMaximumNumberOfAnswers.js +0 -2
- package/cypress/e2e/ILC/Highlight/highlightEditTabScoringSection.js +4 -3
- package/cypress/e2e/ILC/HighlightImage/highlightImageAdditionalSettings.js +4 -4
- package/cypress/e2e/ILC/HighlightImage/highlightImageAdditionalSettingsBasic.js +4 -10
- package/cypress/e2e/ILC/HighlightImage/highlightImageAllOrNothingScoring.js +3 -3
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabScoring.js +9 -5
- package/cypress/e2e/ILC/HighlightImage/highlightImageManuallyAndNonScoredScoring.js +1 -1
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialDifferentWeightsScoring.js +14 -15
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialDifferentWeightsWithAlternateAnswer.js +0 -3
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialEqualWeightsScoring.js +14 -14
- package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +60 -66
- package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +84 -109
- package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +4 -18
- package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +119 -150
- package/cypress/e2e/ILC/UploadResponse/uploadResponseScoringSection.js +2 -2
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +110 -164
- package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettings.js +1 -1
- package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettingsBasic.js +11 -12
- package/cypress/e2e/ILC/VideoResponse/videoResponsePreviewTab.js +6 -5
- package/cypress/fixtures/theme/ilc.json +2 -1
- package/cypress/pages/audioPlayerPage.js +2 -2
- package/cypress/pages/components/additionalSettingsPanel.js +46 -14
- package/cypress/pages/components/autoScoredAdditionalSettings.js +6 -6
- package/cypress/pages/components/autoScoredPreviewBase.js +6 -8
- package/cypress/pages/components/autoScoredScoringSection.js +22 -18
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +60 -9
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +7 -7
- package/cypress/pages/components/createQuestionBasePage.js +8 -2
- package/cypress/pages/components/draggableOptionsContainer.js +2 -1
- package/cypress/pages/components/equationEditorFlyout.js +2 -1
- package/cypress/pages/components/essayResponseCommonComponents.js +10 -4
- package/cypress/pages/components/figOverImageCommonComponent.js +2 -1
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +34 -14
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -1
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +7 -7
- package/cypress/pages/components/listSortingAndOrderingBase.js +1 -1
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +10 -0
- package/cypress/pages/components/mcqQuestionCommonComponents.js +1 -1
- package/cypress/pages/components/mcqScoringComponent.js +1 -1
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +20 -18
- package/cypress/pages/components/questionInstructionsComponent.js +1 -1
- package/cypress/pages/components/scoringSectionBase.js +30 -1
- package/cypress/pages/components/setPointsPopupBase.js +2 -1
- package/cypress/pages/components/uploadImageSectionComponent.js +8 -8
- package/cypress/pages/createItemPage.js +83 -1
- package/cypress/pages/dialogBoxBase.js +3 -7
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +5 -4
- package/cypress/pages/essayResponsePage.js +1 -0
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -0
- package/cypress/pages/fillInTheGapsScoring.js +215 -317
- package/cypress/pages/highlightImagePage.js +6 -4
- package/cypress/pages/highlightPage.js +1 -2
- package/cypress/pages/index.js +4 -0
- package/cypress/pages/listMatchingPage.js +5 -4
- package/cypress/pages/listMatchingScoring.js +274 -272
- package/cypress/pages/listOrderingPage.js +23 -14
- package/cypress/pages/listSortingPage.js +7 -9
- package/cypress/pages/multipleSelectionPage.js +2 -1
- package/cypress/pages/shortTextResponsePage.js +9 -0
- package/cypress/pages/singleSelectionPage.js +1 -0
- package/cypress/pages/uploadResponsePage.js +296 -15
- package/cypress/pages/videoResponsePage.js +5 -6
- package/package.json +1 -1
@@ -350,7 +350,7 @@ const tests = {
|
|
350
350
|
scoringSectionBase.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored')
|
351
351
|
});
|
352
352
|
|
353
|
-
it('When the user has selected \'Manually Scored\' option from the Scoring Type dropdown then the \'Set Correct Answer\' section should not be displayed; \'All or Nothing\', \'Partial - equal weights\' and \'Partial - different weights\' radio buttons should not be displayed; \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed; and inside Additional Settings accordion Check Answer section i.e. \'Allow
|
353
|
+
it('When the user has selected \'Manually Scored\' option from the Scoring Type dropdown then the \'Set Correct Answer\' section should not be displayed; \'All or Nothing\', \'Partial - equal weights\' and \'Partial - different weights\' radio buttons should not be displayed; \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed; and inside Additional Settings accordion Check Answer section i.e. \'Allow student to check answer\' checkbox should not be displayed', () => {
|
354
354
|
utilities.verifyElementVisibilityState(autoScoredSetCorrectAnswerSection.setCorrectAnswerLabel(), 'notExist');
|
355
355
|
utilities.verifyElementVisibilityState(autoScoredScoringSectionMultipleResponsesType.allOrNothingCheckbox(), 'notExist');
|
356
356
|
utilities.verifyElementVisibilityState(autoScoredScoringSectionMultipleResponsesType.partialEqualWeightsCheckbox(), 'notExist');
|
@@ -39,6 +39,15 @@ const selectors = {
|
|
39
39
|
optionOrientationListOptions: (optionIndex) => cy.get('[aria-labelledby="Option-Orientation-dropdown-label Option-Orientation-placeholder"] li[role="option"]').eq(optionIndex)
|
40
40
|
}
|
41
41
|
|
42
|
+
const steps = {
|
43
|
+
selectNumberOfOptionColumnsFromDropdown: (optionNumber) => {
|
44
|
+
mcqAdditionalSettingsBase.numberOfOptionColumnsDropdown()
|
45
|
+
.click();
|
46
|
+
mcqAdditionalSettingsBase.numberOfOptionColumnsListOptions(optionNumber)
|
47
|
+
.click();
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
42
51
|
const tests = {
|
43
52
|
verifyNumberOfOptionsColumns: (orientation) => {
|
44
53
|
let option = [2, 3, 4, 5, 6];
|
@@ -386,5 +395,6 @@ const tests = {
|
|
386
395
|
|
387
396
|
export const mcqAdditionalSettingsBase = {
|
388
397
|
...selectors,
|
398
|
+
steps,
|
389
399
|
tests
|
390
400
|
}
|
@@ -159,7 +159,7 @@ const tests = {
|
|
159
159
|
|
160
160
|
verifyEditTabCorrectAnswerSectionAndPreviewTabFontSize: () => {
|
161
161
|
//TODO: Comment: we'll need to move to object loopings in case of 2 parameters please ask for more details
|
162
|
-
const fontsizes = ['
|
162
|
+
const fontsizes = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
|
163
163
|
const font = ['16px', '12px', '14px', '17px', '20px', '24px'];
|
164
164
|
fontsizes.forEach((option, count) => {
|
165
165
|
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview (options, question instructions and check answer button) should be changed to ${option} in the \'Set Correct Answer\' section as well as in the \'Preview\' tab`, () => {
|
@@ -4,13 +4,18 @@ const css = Cypress.env('css');
|
|
4
4
|
const selectors = {
|
5
5
|
showCorrectAnswerCheckbox: () => cy.get('input[aria-label="Show correct answer"]'),
|
6
6
|
showCorrectAnswerCheckboxLabel: () => cy.get('.showAnswer-options-label').eq(1),
|
7
|
-
previewScoreText: () => cy.get('
|
7
|
+
previewScoreText: () => cy.get('[class*="PreviewTabstyles__ScoreWrapper"]'),
|
8
|
+
gradingViewRadioButton: () => cy.get('.edit-question-preview-wrapper .ngie-radio-group-wrapper .radio-option-wrapper input').eq(1),
|
9
|
+
studentViewRadioButton: () => cy.get('.edit-question-preview-wrapper .ngie-radio-group-wrapper .radio-option-wrapper input').eq(0),
|
10
|
+
studentViewRadioButtonLabel: () => cy.get('.edit-question-preview-wrapper .ngie-radio-group-wrapper .radio-option-wrapper label').eq(0),
|
11
|
+
gradingViewRadioButtonLabel: () => cy.get('.edit-question-preview-wrapper .ngie-radio-group-wrapper .radio-option-wrapper label').eq(1),
|
12
|
+
previewScoreLabel: () => cy.get('[class*="PreviewTabstyles__ScoreLabelWrapper"]')
|
8
13
|
}
|
9
14
|
|
10
15
|
const steps = {
|
11
16
|
//V3 - This function should be updated in all files
|
12
17
|
checkShowCorrectAnswerCheckbox: () => {
|
13
|
-
previewScoringAndShowCorrectAnswerComponent.
|
18
|
+
previewScoringAndShowCorrectAnswerComponent.gradingViewRadioButton()
|
14
19
|
.click()
|
15
20
|
.should('be.checked');
|
16
21
|
},
|
@@ -18,18 +23,15 @@ const steps = {
|
|
18
23
|
//V3 - This function should be updated in all files
|
19
24
|
uncheckShowCorrectAnswerCheckbox: () => {
|
20
25
|
cy.log('Deselect the show correct checkbox')
|
21
|
-
previewScoringAndShowCorrectAnswerComponent.
|
26
|
+
previewScoringAndShowCorrectAnswerComponent.studentViewRadioButton()
|
22
27
|
.click()
|
23
|
-
.should('
|
28
|
+
.should('be.checked');
|
24
29
|
},
|
25
30
|
|
26
31
|
//V3 - This function should be updated in all files
|
27
32
|
verifyDefaultShowCorrectAnswerCheckboxAndLabel: () => {
|
28
|
-
previewScoringAndShowCorrectAnswerComponent.
|
29
|
-
.verifyInnerText('
|
30
|
-
previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
|
31
|
-
.should('exist')
|
32
|
-
.and('not.be.checked');
|
33
|
+
previewScoringAndShowCorrectAnswerComponent.previewScoreLabel()
|
34
|
+
.verifyInnerText('Score:');
|
33
35
|
},
|
34
36
|
|
35
37
|
//V3 - This function should be updated in all files
|
@@ -45,24 +47,24 @@ const steps = {
|
|
45
47
|
}
|
46
48
|
|
47
49
|
const tests = {
|
48
|
-
verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab: () => {
|
50
|
+
verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab: (scoringType) => {
|
49
51
|
it('Show correct answer checkbox as well as points besides it should not be displayed', () => {
|
50
52
|
previewScoringAndShowCorrectAnswerComponent.showCorrectAnswerCheckbox()
|
51
53
|
.should('not.exist');
|
52
54
|
previewScoringAndShowCorrectAnswerComponent.previewScoreText()
|
53
|
-
.
|
55
|
+
.verifyInnerText(scoringType);
|
54
56
|
});
|
55
57
|
},
|
56
58
|
|
57
59
|
//V3 - This function should be updated in all files
|
58
60
|
verifyShowCorrectAnswerLabelAndCheckboxExistAndPreviewScoreNotExistInPreviewTab: () => {
|
59
61
|
it('Show correct answer checkbox should be displayed and it should be unchecked by default and points should not be displayed beside it ', () => {
|
60
|
-
previewScoringAndShowCorrectAnswerComponent.
|
62
|
+
previewScoringAndShowCorrectAnswerComponent.gradingViewRadioButton()
|
61
63
|
.should('not.be.checked');
|
62
|
-
previewScoringAndShowCorrectAnswerComponent.
|
63
|
-
.
|
64
|
+
previewScoringAndShowCorrectAnswerComponent.studentViewRadioButton()
|
65
|
+
.should('be.checked');
|
64
66
|
previewScoringAndShowCorrectAnswerComponent.previewScoreText()
|
65
|
-
.
|
67
|
+
.verifyInnerText('Non scored');
|
66
68
|
});
|
67
69
|
},
|
68
70
|
|
@@ -76,9 +78,9 @@ const tests = {
|
|
76
78
|
createQuestionBasePage.previewTab()
|
77
79
|
.verifyCSS(css.color.activeButtons, css.fontSize.default, css.fontWeight.bold);
|
78
80
|
previewScoringAndShowCorrectAnswerComponent.previewScoreText()
|
79
|
-
.verifyCSS(css.color.
|
80
|
-
previewScoringAndShowCorrectAnswerComponent.
|
81
|
-
.verifyCSS(css.color.
|
81
|
+
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
82
|
+
previewScoringAndShowCorrectAnswerComponent.previewScoreLabel()
|
83
|
+
.verifyCSS(css.color.text, css.fontSize.normal, css.fontWeight.regular);
|
82
84
|
});
|
83
85
|
}
|
84
86
|
}
|
@@ -5,7 +5,7 @@ const css = Cypress.env('css');
|
|
5
5
|
const selectors = {
|
6
6
|
questionInstructionsLabelEditTab: () => cy.get('.edit-question-instruction-label'),
|
7
7
|
questionInstructionsInputField: () => cy.get('[title="Question Instructions"]'),
|
8
|
-
questionInstructionsText: () => cy.get('.question-instruction')
|
8
|
+
questionInstructionsText: () => cy.get('.question-instruction'),
|
9
9
|
}
|
10
10
|
|
11
11
|
const steps = {
|
@@ -14,6 +14,15 @@ const selectors = {
|
|
14
14
|
pointsInputField: () => cy.get('.points-input-field input[type="text"]'),
|
15
15
|
pleaseEnterPointsErrorMessage: () => cy.get('[class*="ErrorBlockstyles__ErrorText"]'),
|
16
16
|
pointsWrapper: () => cy.get('.set-correct-answer-points-wrapper'),
|
17
|
+
minimumScoringLabel: () => cy.get('#minimum-scoring-dropdown-label'),
|
18
|
+
minimumScoringDropdown: () => cy.get('#minimum-scoring-select'),
|
19
|
+
minimumScoringDropdownListOptions: (ariaLabel = null) => {
|
20
|
+
if (ariaLabel) {
|
21
|
+
return cy.get(`[aria-labelledby*="minimum-scoring-dropdown-label"] [role="option"][aria-label*="${ariaLabel}"]`)
|
22
|
+
} else {
|
23
|
+
return cy.get('[aria-labelledby*="minimum-scoring-dropdown-label"] [role="option"]')
|
24
|
+
}
|
25
|
+
},
|
17
26
|
}
|
18
27
|
|
19
28
|
const steps = {
|
@@ -34,8 +43,11 @@ const steps = {
|
|
34
43
|
},
|
35
44
|
|
36
45
|
verifyDefaultMinimumScoreIfAttemptedLabelAndPointsField: () => {
|
46
|
+
//Enhancement: Will need to update these steps when updating scripts
|
47
|
+
scoringSectionBase.steps.expandMinimumScoringDropdown();
|
48
|
+
scoringSectionBase.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
|
37
49
|
scoringSectionBase.minimumScoreIfAttemptedLabel()
|
38
|
-
.verifyInnerText('Minimum
|
50
|
+
.verifyInnerText('Minimum points');
|
39
51
|
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
40
52
|
.should('have.value', '')
|
41
53
|
.and('be.visible');
|
@@ -115,6 +127,20 @@ const steps = {
|
|
115
127
|
.eq(index)
|
116
128
|
.focus()
|
117
129
|
.blur();
|
130
|
+
},
|
131
|
+
|
132
|
+
expandMinimumScoringDropdown: () => {
|
133
|
+
scoringSectionBase.minimumScoringDropdown()
|
134
|
+
.click();
|
135
|
+
},
|
136
|
+
|
137
|
+
/**
|
138
|
+
* @param {('No minimum score'| 'Award minimum score'|'Award minimum score only if attempted')} listOption
|
139
|
+
* @description this function selects an option from expanded minimum scoring dropdown
|
140
|
+
*/
|
141
|
+
selectMinimumScoringTypeListOption: (listOption) => {
|
142
|
+
scoringSectionBase.minimumScoringDropdownListOptions(listOption)
|
143
|
+
.click();
|
118
144
|
}
|
119
145
|
}
|
120
146
|
|
@@ -229,6 +255,9 @@ const tests = {
|
|
229
255
|
*/
|
230
256
|
verifyMinimumScoreIfAttemptedFieldErrorState: (allocatedPoints, minimumPoints, maxPoints) => {
|
231
257
|
it('When the user focuses in and out of the empty Minimum score awarded (if attempted) input field, any validation text should not be displayed', () => {
|
258
|
+
cy.log('Pre-step: Selecting minimum scoring');
|
259
|
+
scoringSectionBase.steps.expandMinimumScoringDropdown();
|
260
|
+
scoringSectionBase.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
|
232
261
|
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
233
262
|
.click()
|
234
263
|
.blur();
|
@@ -4,6 +4,7 @@ import { scoringSectionBase } from "./scoringSectionBase";
|
|
4
4
|
|
5
5
|
const selector = {
|
6
6
|
...dialogBoxBase,
|
7
|
+
dialogBox: () => cy.get('[aria-labelledby="alert-dialog-title"][role="alertdialog"]'),
|
7
8
|
setPointsPopupOptions: () => cy.get('#alert-dialog-description .question-text-wrapper'),
|
8
9
|
setPointsPopupPointsLabel: () => cy.get('[class*="ListOrderingstyles__PointsLabel"]')
|
9
10
|
}
|
@@ -34,7 +35,7 @@ const steps = {
|
|
34
35
|
scoringSectionBase.pointsInputField()
|
35
36
|
.eq(index)
|
36
37
|
.clear()
|
37
|
-
.type(points)
|
38
|
+
.type(points, { delay: 500 })
|
38
39
|
.should('have.value', points);
|
39
40
|
});
|
40
41
|
});
|
@@ -17,15 +17,15 @@ const selector = {
|
|
17
17
|
deleteImageButton: () => cy.get('.edit-delete-btn-wrapper button').eq(1),
|
18
18
|
//Upload image popup
|
19
19
|
inputTypeFile: () => cy.get('input[type="file"]'),
|
20
|
-
uploadImagePopup: () => cy.get('
|
21
|
-
imagePopupTitle: () => cy.get('
|
20
|
+
uploadImagePopup: () => cy.get('.image-upload-popup'),
|
21
|
+
imagePopupTitle: () => cy.get('.dialog-title'),
|
22
22
|
imagePopupPreviewLabel: () => cy.get('.preview-label-wrapper'),
|
23
|
-
imagePopupWidthLabel: () => cy.get('
|
24
|
-
imagePopupWidthInputField: () => cy.get('
|
25
|
-
imagePopupHeightLabel: () => cy.get('
|
26
|
-
imagePopupHeightInputField: () => cy.get('
|
27
|
-
buttonAspectRatio: () => cy.get('
|
28
|
-
buttonResetDimensions: () => cy.get('
|
23
|
+
imagePopupWidthLabel: () => cy.get('.image-upload-popup .highlight-image-property-label.text-label').eq(0),
|
24
|
+
imagePopupWidthInputField: () => cy.get('.image-upload-popup .highlight-image-input-field input').eq(0),
|
25
|
+
imagePopupHeightLabel: () => cy.get('.image-upload-popup .highlight-image-property-label.text-label').eq(1),
|
26
|
+
imagePopupHeightInputField: () => cy.get('.image-upload-popup .highlight-image-input-field input').eq(1),
|
27
|
+
buttonAspectRatio: () => cy.get('.lock-unlock-reset-btn').eq(0),
|
28
|
+
buttonResetDimensions: () => cy.get('.lock-unlock-reset-btn').eq(1),
|
29
29
|
imagePopupButtonCancel: () => cy.get('.compact-popup-action-button-wrapper button').eq(0),
|
30
30
|
imagePopupButtonOk: () => cy.get('.compact-popup-action-button-wrapper button').eq(1),
|
31
31
|
imagePopupButtonReplace: () => cy.get('.preview-replace-button'),
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import utilities from "../support/helpers/utilities";
|
2
|
+
|
1
3
|
const css = Cypress.env('css');
|
2
4
|
|
3
5
|
const selectors = {
|
@@ -12,7 +14,14 @@ const selectors = {
|
|
12
14
|
referenceId: () => cy.get('.edit-item-reference-id'),
|
13
15
|
itemTitle: () => cy.get('.ItemLevel-Header'),
|
14
16
|
tagsButton: () => cy.get('.ngie-button').contains('Tags'),
|
15
|
-
tagsInputField: () => cy.get('.tags-chip-container')
|
17
|
+
tagsInputField: () => cy.get('.tags-chip-container'),
|
18
|
+
editItemPageWrapper: () => cy.get('.edit-wrapper'),
|
19
|
+
editItemReferenceId: () => cy.get('.edit-item-reference-id'),
|
20
|
+
applyChangesButton: () => cy.get('.ngie-btn-contained').contains('Apply changes'),
|
21
|
+
editTitleIcon: () => cy.get('.icon-pencil'),
|
22
|
+
titleInputField: () => cy.get('.edit-box-header-input-wrapper'),
|
23
|
+
submitButton: () => cy.get('[class*="StudentViewstyles__ButtonsWrapper"] button').eq(1),
|
24
|
+
studentViewReferenceId: () => cy.get('[class*="StudentViewstyles__ViewInfoWrapper"]')
|
16
25
|
}
|
17
26
|
|
18
27
|
const steps = {
|
@@ -30,6 +39,23 @@ const steps = {
|
|
30
39
|
cy.visit('/item-engine/demo/create-item');
|
31
40
|
},
|
32
41
|
|
42
|
+
/**
|
43
|
+
* @param {string} reference id of the question to be navigated
|
44
|
+
* @description this function navigates to the edit item page of the
|
45
|
+
*/
|
46
|
+
navigateToEditItemUsingReferenceID: (reference) => {
|
47
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(reference)}`);
|
48
|
+
},
|
49
|
+
|
50
|
+
navigateToEditItemPage: () => {
|
51
|
+
createItemPage.referenceId()
|
52
|
+
.invoke('text')
|
53
|
+
.then(text => {
|
54
|
+
const referenceId = text;
|
55
|
+
steps.navigateToEditItemUsingReferenceID(referenceId);
|
56
|
+
});
|
57
|
+
},
|
58
|
+
|
33
59
|
verifyCreateItemContainerIsVisible: () => {
|
34
60
|
createItemPage.createItemContainer()
|
35
61
|
.should('be.visible');
|
@@ -52,6 +78,62 @@ const steps = {
|
|
52
78
|
verifyTagsInInputField: (arrayOfTags) => {
|
53
79
|
createItemPage.tagsInputField()
|
54
80
|
.should('have.text', arrayOfTags.sort().join(''));
|
81
|
+
},
|
82
|
+
|
83
|
+
/**
|
84
|
+
* @param {string[]} arrayOfTags of text that need to enter in tags input field
|
85
|
+
* @description set tags for an item
|
86
|
+
*/
|
87
|
+
setTags: (arrayOfTags) => {
|
88
|
+
steps.clickOnTagsButton()
|
89
|
+
for (let index = 0; index < arrayOfTags.length; index++) {
|
90
|
+
createItemPage.tagsInputField()
|
91
|
+
.type(`${arrayOfTags[index]}{enter}`);
|
92
|
+
}
|
93
|
+
createItemPage.applyChangesButton()
|
94
|
+
.click();
|
95
|
+
},
|
96
|
+
|
97
|
+
/**
|
98
|
+
* @param {string[]} value of text that need to enter in title input field
|
99
|
+
* @description this function enters text in title input field
|
100
|
+
*/
|
101
|
+
enterTitle: (value) => {
|
102
|
+
createItemPage.titleInputField()
|
103
|
+
.type(value);
|
104
|
+
},
|
105
|
+
|
106
|
+
clickOnSubmitButton: () => {
|
107
|
+
createItemPage.submitButton()
|
108
|
+
.click();
|
109
|
+
},
|
110
|
+
|
111
|
+
|
112
|
+
navigateToStudentViewPage: () => {
|
113
|
+
createItemPage.referenceId()
|
114
|
+
.invoke('text')
|
115
|
+
.then(text => {
|
116
|
+
const referenceId = text;
|
117
|
+
steps.navigateToStudentViewUsingReferenceID(referenceId);
|
118
|
+
});
|
119
|
+
},
|
120
|
+
|
121
|
+
navigateToEditItemPageFromStudentView: () => {
|
122
|
+
createItemPage.studentViewReferenceId()
|
123
|
+
.invoke('text')
|
124
|
+
.then(text => {
|
125
|
+
let value = text;
|
126
|
+
let referenceId = value.split(':')[1].trim();
|
127
|
+
steps.navigateToEditItemUsingReferenceID(referenceId);
|
128
|
+
});
|
129
|
+
},
|
130
|
+
|
131
|
+
/**
|
132
|
+
* @param {string} reference id of the question to be navigated
|
133
|
+
* @description this function navigates to the student view page
|
134
|
+
*/
|
135
|
+
navigateToStudentViewUsingReferenceID: (reference) => {
|
136
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(reference)}`);
|
55
137
|
}
|
56
138
|
}
|
57
139
|
|
@@ -3,11 +3,11 @@ import { createQuestionBasePage } from "./components";
|
|
3
3
|
const css = Cypress.env('css');
|
4
4
|
|
5
5
|
const selectors = {
|
6
|
-
dialogBox: () => cy.get('[
|
6
|
+
dialogBox: () => cy.get('[aria-labelledby="alert-dialog-title"]'),
|
7
7
|
dialogBoxTitle: () => cy.get('.dialog-title'),
|
8
8
|
dialogBoxContent: () => cy.get('div[id="alert-dialog-description"]'),
|
9
|
-
buttonReject: () => cy.get('
|
10
|
-
buttonAccept: () => cy.get('
|
9
|
+
buttonReject: () => cy.get('[class*="action"][class*="wrapper"] button').eq(0),
|
10
|
+
buttonAccept: () => cy.get('[class*="action"][class*="wrapper"] button').eq(1),
|
11
11
|
buttonClose: () => cy.get('[aria-label="CLOSE"]')
|
12
12
|
}
|
13
13
|
|
@@ -33,15 +33,11 @@ const steps = {
|
|
33
33
|
clickOnAcceptButtonInDialogBox: () => {
|
34
34
|
dialogBoxBase.buttonAccept()
|
35
35
|
.click();
|
36
|
-
dialogBoxBase.dialogBox()
|
37
|
-
.should('not.exist');
|
38
36
|
},
|
39
37
|
|
40
38
|
clickOnRejectButtonInDialogBox: () => {
|
41
39
|
dialogBoxBase.buttonReject()
|
42
40
|
.click();
|
43
|
-
dialogBoxBase.dialogBox()
|
44
|
-
.should('not.exist');
|
45
41
|
}
|
46
42
|
}
|
47
43
|
|
@@ -746,9 +746,7 @@ const steps = {
|
|
746
746
|
|
747
747
|
verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked: () => {
|
748
748
|
cy.log('After deselecting Show correct answer checkbox, the question preview should return to the previous state');
|
749
|
-
previewScoringAndShowCorrectAnswerComponent.
|
750
|
-
.click()
|
751
|
-
.should('not.be.checked');
|
749
|
+
previewScoringAndShowCorrectAnswerComponent.steps.uncheckShowCorrectAnswerCheckbox();
|
752
750
|
autoScoredPreviewBase.correctIcon()
|
753
751
|
.should('not.exist');
|
754
752
|
autoScoredPreviewBase.incorrectIcon()
|
@@ -1362,6 +1360,8 @@ const tests = {
|
|
1362
1360
|
it('When user has provided minimum score awarded (if attempted) points, then in Preview tab on entering incorrect answer, minimum score should be provided for the question', () => {
|
1363
1361
|
cy.log('Switch to edit tab and set minimum score if attempted points')
|
1364
1362
|
createQuestionBasePage.steps.switchToEditTab();
|
1363
|
+
scoringSectionBase.steps.expandMinimumScoringDropdown();
|
1364
|
+
scoringSectionBase.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
|
1365
1365
|
scoringSectionBase.steps.allotMinimumScoreAwardedIfAttempted(1)
|
1366
1366
|
createQuestionBasePage.steps.switchToPreviewTab()
|
1367
1367
|
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 2);
|
@@ -1496,7 +1496,8 @@ const tests = {
|
|
1496
1496
|
it('When the \'Round down score\' checkbox is not selected, then in preview tab when user selects partially or fully correct answers the points should be displayed in decimal points if applicable as per the options selected by the user', () => {
|
1497
1497
|
cy.log('Switching to Edit tab')
|
1498
1498
|
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
1499
|
-
dragAndDropIntoCategoriesPage.steps.
|
1499
|
+
dragAndDropIntoCategoriesPage.steps.expandRoundingDropdown();
|
1500
|
+
dragAndDropIntoCategoriesPage.steps.selectOptionFromRoundingDropdownOption('none');
|
1500
1501
|
cy.log('Switching to Preview tab')
|
1501
1502
|
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
1502
1503
|
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
@@ -14,6 +14,7 @@ const selectors = {
|
|
14
14
|
...additionalSettingsPanel,
|
15
15
|
...questionInstructionsComponent,
|
16
16
|
...essayResponseCommonComponents,
|
17
|
+
...commonComponents,
|
17
18
|
//Basic section
|
18
19
|
setWordLimitLabel: () => cy.get('[class*="EssayResponseComponentstyles__PropertyLabel"]'),
|
19
20
|
setWordLimitInputField: () => cy.get('.essay-response-question-word-limit-setting-wrapper input[type="text"]'),
|
@@ -350,6 +350,7 @@ const tests = {
|
|
350
350
|
});
|
351
351
|
});
|
352
352
|
|
353
|
+
//Failing due to https://redmine.zeuslearning.com/issues/547859
|
353
354
|
it('CSS of inactive state of draggable options and response areas', { tags: 'css' }, () => {
|
354
355
|
fillInTheGapsDragAndDropPage.setCorrectAnswerDraggableOption()
|
355
356
|
.should('have.css', 'border', `1px solid ${css.color.figDefaultComponentBorder}`)
|