itemengine-cypress-automation 1.0.119 → 1.0.121
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +13 -1
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -0
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +2 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +273 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAnswerFunctionalityForAllViews.smoke.js +116 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +136 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +120 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViews.smoke.js +158 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +246 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +332 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +409 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +80 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +68 -68
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +3 -289
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -23
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +191 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +190 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +284 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +113 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +234 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsBasic.js +136 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +197 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +169 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +197 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +219 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAnswerFunctionalityForAllViews.smoke.js +115 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +142 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViews.smoke.js +152 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +39 -0
- package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +2 -12
- package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +497 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +503 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +233 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +291 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +332 -0
- package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +2 -12
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +9 -8
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -2
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +5 -2
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +334 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +419 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +166 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +166 -0
- package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +51 -0
- package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +99 -0
- package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +71 -0
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +155 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +66 -0
- package/cypress/e2e/migration/migration.js +6 -5
- package/cypress/e2e/migration/migration2.js +4 -3
- package/cypress/e2e/migration/migration3.js +4 -3
- package/cypress/e2e/migration/migration4.js +4 -3
- package/cypress/e2e/migration/migration5.js +4 -3
- package/cypress/fixtures/theme/ilc.json +3 -1
- package/cypress/pages/audioResponsePage.js +2 -1
- package/cypress/pages/components/additionalSettingsPanel.js +27 -0
- package/cypress/pages/components/autoScoredPreviewBase.js +1 -1
- package/cypress/pages/components/autoScoredScoringSection.js +1 -1
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +1 -1
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +2 -2
- package/cypress/pages/components/autoScoredStudentViewSettings.js +8 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +5 -5
- package/cypress/pages/components/createQuestionBasePage.js +8 -2
- package/cypress/pages/components/essayResponseCommonComponents.js +6 -0
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +13 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +40 -0
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +422 -314
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +438 -710
- package/cypress/pages/components/{figOverImageCanvasComponent.js → imageCanvasComponent.js} +274 -272
- package/cypress/pages/components/index.js +3 -3
- package/cypress/pages/components/maximumRecorderLengthComponent.js +55 -11
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +1 -1
- package/cypress/pages/components/questionInputFieldComponent.js +49 -23
- package/cypress/pages/components/scoringSectionBase.js +1 -1
- package/cypress/pages/createItemPage.js +67 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +172 -711
- package/cypress/pages/fillInTheGapsDropdownPage.js +75 -72
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +4 -4
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +109 -273
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +49 -291
- package/cypress/pages/fillInTheGapsTextPage.js +52 -199
- package/cypress/pages/index.js +5 -5
- package/cypress/pages/multipleSelectionPage.js +1 -0
- package/cypress/pages/shortTextResponsePage.js +575 -33
- package/cypress/pages/singleSelectionGridPage.js +1 -2
- package/cypress/pages/singleSelectionPage.js +5 -6
- package/cypress/pages/textEntryMathPage.js +46 -22
- package/cypress/pages/textEntryMathWithImagePage.js +212 -0
- package/cypress/pages/uploadResponsePage.js +74 -21
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +73 -2
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +49 -2
- package/package.json +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +0 -482
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +0 -412
- package/cypress/pages/components/figOverImageCommonComponent.js +0 -1113
- package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +0 -1155
- package/cypress/pages/dragAndDropIntoCategoriesCellsScoring.js +0 -1561
- package/cypress/pages/dragAndDropIntoCategoriesResponseScoring.js +0 -1396
- package/cypress/pages/fillInTheGapsScoring.js +0 -5872
- package/cypress/pages/fillInTheGapsSetCorrectAnswerSection.js +0 -260
@@ -23,7 +23,6 @@ export * from './maximumRecorderLengthComponent';
|
|
23
23
|
export * from './playbackControlsBaseComponent';
|
24
24
|
export * from './fillInTheGapsTextCommonComponent'
|
25
25
|
export * from './fillInTheGapsDropdownCommonComponent';
|
26
|
-
export * from './figOverImageCommonComponent';
|
27
26
|
export * from './uploadImageSectionComponent';
|
28
27
|
export * from './colorPopupComponent';
|
29
28
|
export * from './customizeHighlightPropertiesComponent';
|
@@ -44,7 +43,7 @@ export * from './allowMultipleInstancesOfSameDraggableOptionComponent';
|
|
44
43
|
export * from './questionInputFieldComponent';
|
45
44
|
export * from './studentViewSettingsLabelComponent';
|
46
45
|
export * from './backgroundImageUploadComponent';
|
47
|
-
export * from './
|
46
|
+
export * from './imageCanvasComponent';
|
48
47
|
export * from './correctIncorrectAnswerLabelComponent';
|
49
48
|
export * from './acceptedStudentInputComponent';
|
50
49
|
export * from './draggableOptionsSectionComponent';
|
@@ -53,4 +52,5 @@ export * from './customizeSpecialCharacterComponent';
|
|
53
52
|
export * from './opacityComponent';
|
54
53
|
export * from './imageActionsComponent';
|
55
54
|
export * from './createCustomCategoryFlyout';
|
56
|
-
export * from './customizeMathCharacterComponent';
|
55
|
+
export * from './customizeMathCharacterComponent';
|
56
|
+
export * from './fillInTheGapsDragAndDropCommonComponents';
|
@@ -37,6 +37,28 @@ const steps = {
|
|
37
37
|
.clear()
|
38
38
|
.blur();
|
39
39
|
},
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Selects the duration for maximum recorder length input field
|
43
|
+
* @param {('Secs' | 'Mins')} duration - The duration for maximum recorder length input field.
|
44
|
+
* @throws {Error} Will throw an error if an invalid duration is provided.
|
45
|
+
*/
|
46
|
+
toggleMaximumRecorderLengthInputField: (duration) => {
|
47
|
+
switch (duration) {
|
48
|
+
case 'Secs':
|
49
|
+
maximumRecorderLengthComponent.maximumRecorderLengthSecsToggleButton()
|
50
|
+
.click()
|
51
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
52
|
+
break;
|
53
|
+
case 'Mins':
|
54
|
+
maximumRecorderLengthComponent.maximumRecorderLengthMinsToggleButton()
|
55
|
+
.click()
|
56
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
57
|
+
break;
|
58
|
+
default:
|
59
|
+
throw new Error('Invalid duration');
|
60
|
+
}
|
61
|
+
}
|
40
62
|
}
|
41
63
|
|
42
64
|
const tests = {
|
@@ -78,16 +100,9 @@ const tests = {
|
|
78
100
|
});
|
79
101
|
|
80
102
|
//Note: a11y is covered for Maximum recorder length section in HeaderSection file using verifyCreateItemWrapperContentsA11y
|
81
|
-
|
82
|
-
it('When the user toggles to "Mins", "15" should be displayed in \'Maximum recorder length\' field', () => {
|
83
|
-
maximumRecorderLengthComponent.maximumRecorderLengthMinsToggleButton()
|
84
|
-
.click()
|
85
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
86
|
-
maximumRecorderLengthComponent.steps.verifyMaximumRecorderLength(15);
|
87
|
-
});
|
88
103
|
},
|
89
104
|
|
90
|
-
|
105
|
+
verifyMaximumRecorderLengthInputFieldErrorMessagesForSecsDuration: () => {
|
91
106
|
it('When the user focuses in and out of the empty \'Maximum recorder length\' input field, \'Error: Maximum recorder length is required.\' validation error should be displayed below the \'Maximum recorder length\' input field', () => {
|
92
107
|
maximumRecorderLengthComponent.steps.clearMaximumRecorderLengthInputField();
|
93
108
|
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Maximum recorder length is required.');
|
@@ -98,7 +113,7 @@ const tests = {
|
|
98
113
|
|
99
114
|
it('When the user updates the \'Maximum recorder length\' value, then the validation message \'Error: Maximum recorder length is required.\' should disappear.', () => {
|
100
115
|
maximumRecorderLengthComponent.steps.setMaximumRecorderLength('1000');
|
101
|
-
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), '
|
116
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'hidden');
|
102
117
|
});
|
103
118
|
|
104
119
|
it('When the user has set \'Maximum recorder length\' to \'0\' (zero), a validation message \'Error: Value must be greater than 0 secs.\' should be displayed', () => {
|
@@ -112,7 +127,7 @@ const tests = {
|
|
112
127
|
|
113
128
|
it('When the user updates the \'Maximum recorder length\' value, then the validation message \'Error: Value must be greater than 0 secs.\' should disappear', () => {
|
114
129
|
maximumRecorderLengthComponent.steps.setMaximumRecorderLength('1000');
|
115
|
-
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), '
|
130
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'hidden');
|
116
131
|
});
|
117
132
|
},
|
118
133
|
|
@@ -123,7 +138,36 @@ const tests = {
|
|
123
138
|
maximumRecorderLengthComponent.steps.setMaximumRecorderLength('!@#abcde584');
|
124
139
|
maximumRecorderLengthComponent.steps.verifyMaximumRecorderLength('584');
|
125
140
|
});
|
126
|
-
}
|
141
|
+
},
|
142
|
+
|
143
|
+
verifyMaximumRecorderLengthInputFieldErrorMessagesForMinsDuration: () => {
|
144
|
+
it('When the user focuses in and out of the empty \'Maximum recorder length\' input field, \'Error: Maximum recorder length is required.\' validation error should be displayed below the \'Maximum recorder length\' input field', () => {
|
145
|
+
maximumRecorderLengthComponent.steps.clearMaximumRecorderLengthInputField();
|
146
|
+
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Maximum recorder length is required.');
|
147
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
|
148
|
+
});
|
149
|
+
|
150
|
+
commonComponents.tests.verifyErrorMessageCSSAndA11y();
|
151
|
+
|
152
|
+
it('When the user updates the \'Maximum recorder length\' value, then the validation message \'Error: Maximum recorder length is required.\' should disappear.', () => {
|
153
|
+
maximumRecorderLengthComponent.steps.setMaximumRecorderLength('50');
|
154
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'hidden');
|
155
|
+
});
|
156
|
+
|
157
|
+
it('When the user has set \'Maximum recorder length\' to \'0\' (zero), a validation message \'Error: Value must be greater than 0 mins.\' should be displayed', () => {
|
158
|
+
maximumRecorderLengthComponent.steps.setMaximumRecorderLength('0');
|
159
|
+
maximumRecorderLengthComponent.steps.verifyMaximumRecorderLength('0');
|
160
|
+
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Value must be greater than 0 mins.');
|
161
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
|
162
|
+
});
|
163
|
+
|
164
|
+
commonComponents.tests.verifyErrorMessageCSSAndA11y();
|
165
|
+
|
166
|
+
it('When the user updates the \'Maximum recorder length\' value, then the validation message \'Error: Value must be greater than 0 mins.\' should disappear', () => {
|
167
|
+
maximumRecorderLengthComponent.steps.setMaximumRecorderLength('50');
|
168
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'hidden');
|
169
|
+
});
|
170
|
+
},
|
127
171
|
}
|
128
172
|
|
129
173
|
export const maximumRecorderLengthComponent = {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { createQuestionBasePage } from "./createQuestionBasePage";
|
2
2
|
const css = Cypress.env('css');
|
3
|
-
//
|
3
|
+
//Note: deprecated file
|
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),
|
@@ -4,36 +4,45 @@ import { commonComponents } from "./commonComponents";
|
|
4
4
|
const selectors = {
|
5
5
|
questionLabel: () => cy.get('.cloze-with-text-question-wrapper .title-casing'),
|
6
6
|
questionInputField: () => cy.get('.cloze-with-text-question-wrapper [title="question"]'),
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
responseArea: () => cy.get('.cke_widget_wrapper_add_response_element'),
|
8
|
+
responseAreaCloseButton: () => cy.get('.add_response_close'),
|
9
|
+
addResponseAreaButton: () => cy.get('.add-response-token-wrapper-cls button'),
|
10
|
+
responseAreaNumeration: () => cy.get('marker'),
|
11
|
+
responseAreaResponseLabel: () => cy.get('content'),
|
12
|
+
questionContainerPreviewTab: () => cy.get('.preview-question-text-wrapper'),
|
13
|
+
responseAreaSettingsButton: () => cy.get('.add_response_settings_btn')
|
12
14
|
}
|
13
15
|
|
14
16
|
const steps = {
|
17
|
+
addResponseAreaInQuestionField: () => {
|
18
|
+
questionInputFieldComponent.questionInputField()
|
19
|
+
.click();
|
20
|
+
questionInputFieldComponent.steps.clickOnAddResponseAreaButton();
|
21
|
+
},
|
22
|
+
|
15
23
|
/**
|
16
24
|
* @description Delete a response token by clicking on its close button
|
17
|
-
* @param {number}
|
25
|
+
* @param {number} responseAreaIndex response token index
|
18
26
|
*/
|
19
|
-
|
20
|
-
utilities.getNthElement(questionInputFieldComponent.
|
27
|
+
deleteAResponseArea: (responseAreaIndex) => {
|
28
|
+
utilities.getNthElement(questionInputFieldComponent.responseArea(), responseAreaIndex)
|
21
29
|
.within(() => {
|
22
|
-
questionInputFieldComponent.
|
30
|
+
questionInputFieldComponent.responseAreaCloseButton()
|
23
31
|
.click();
|
24
32
|
});
|
25
33
|
},
|
26
34
|
|
27
35
|
/**
|
28
36
|
* @description Verify response token numeration and close button
|
29
|
-
* @param {number}
|
37
|
+
* @param {number} responseAreaIndex response token index
|
30
38
|
*/
|
31
|
-
|
32
|
-
utilities.getNthElement(questionInputFieldComponent.
|
39
|
+
verifyResponseAreaContents: (responseAreaIndex) => {
|
40
|
+
utilities.getNthElement(questionInputFieldComponent.responseArea(), responseAreaIndex)
|
33
41
|
.within(() => {
|
34
|
-
utilities.verifyInnerText(questionInputFieldComponent.
|
35
|
-
utilities.verifyElementVisibilityState(questionInputFieldComponent.
|
36
|
-
utilities.verifyElementVisibilityState(questionInputFieldComponent.
|
42
|
+
utilities.verifyInnerText(questionInputFieldComponent.responseAreaNumeration(), `${responseAreaIndex + 1}`);
|
43
|
+
utilities.verifyElementVisibilityState(questionInputFieldComponent.responseAreaNumeration(), 'visible');
|
44
|
+
utilities.verifyElementVisibilityState(questionInputFieldComponent.responseAreaCloseButton(), 'visible');
|
45
|
+
utilities.verifyElementVisibilityState(questionInputFieldComponent.responseAreaSettingsButton(), 'visible');
|
37
46
|
});
|
38
47
|
},
|
39
48
|
|
@@ -53,14 +62,14 @@ const steps = {
|
|
53
62
|
.blur();
|
54
63
|
},
|
55
64
|
|
56
|
-
|
65
|
+
focusInQuestionInputField: () => {
|
57
66
|
questionInputFieldComponent.questionInputField()
|
58
67
|
.click();
|
59
68
|
},
|
60
69
|
|
61
|
-
|
62
|
-
questionInputFieldComponent.steps.
|
63
|
-
questionInputFieldComponent.
|
70
|
+
addResponseArea: () => {
|
71
|
+
questionInputFieldComponent.steps.focusInQuestionInputField();
|
72
|
+
questionInputFieldComponent.addResponseAreaButton()
|
64
73
|
.click();
|
65
74
|
},
|
66
75
|
|
@@ -73,6 +82,23 @@ const steps = {
|
|
73
82
|
questionInputFieldComponent.questionInputField()
|
74
83
|
.should('not.have.attr', 'data-cke-editorplaceholder');
|
75
84
|
},
|
85
|
+
|
86
|
+
clickOnAddResponseAreaButton: () => {
|
87
|
+
questionInputFieldComponent.addResponseAreaButton()
|
88
|
+
.click();
|
89
|
+
},
|
90
|
+
|
91
|
+
verifyResponseAreaButtonDisabled: () => {
|
92
|
+
questionInputFieldComponent.addResponseAreaButton()
|
93
|
+
.parent()
|
94
|
+
.should('have.class', 'disabled');
|
95
|
+
},
|
96
|
+
|
97
|
+
verifyResponseAreaButtonEnabled: () => {
|
98
|
+
questionInputFieldComponent.addResponseAreaButton()
|
99
|
+
.parent()
|
100
|
+
.should('not.have.class', 'disabled');
|
101
|
+
}
|
76
102
|
}
|
77
103
|
|
78
104
|
const tests = {
|
@@ -86,10 +112,10 @@ const tests = {
|
|
86
112
|
});
|
87
113
|
},
|
88
114
|
|
89
|
-
|
90
|
-
it('When the user adds a
|
91
|
-
questionInputFieldComponent.steps.
|
92
|
-
utilities.verifyElementCount(questionInputFieldComponent.
|
115
|
+
addResponseAreaAndVerifyMinimumOneAreaRequiredErrorMessageNotExist: () => {
|
116
|
+
it('When the user adds a response area in the question field, then the error message should disappear', () => {
|
117
|
+
questionInputFieldComponent.steps.addResponseArea();
|
118
|
+
utilities.verifyElementCount(questionInputFieldComponent.responseArea(), 1);
|
93
119
|
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
94
120
|
});
|
95
121
|
},
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
2
2
|
import { commonComponents } from "./commonComponents";
|
3
3
|
const css = Cypress.env('css');
|
4
|
-
|
4
|
+
//Note: deprecated file
|
5
5
|
const selectors = {
|
6
6
|
scoringLabel: () => cy.get('.edit-scoring-label'),
|
7
7
|
scoringTypeLabel: () => cy.get('#Scoring-Type-dropdown-label'),
|
@@ -12,6 +12,8 @@ const selectors = {
|
|
12
12
|
viewAllQuestionsButton: () => cy.get('.view-question-resource-button-wrapper'),
|
13
13
|
createItemContainer: () => cy.get('.edit-wrapper'),
|
14
14
|
referenceId: () => cy.get('.edit-item-reference-id'),
|
15
|
+
applyChangesButton: () => cy.get('.applyChangesBtn'),
|
16
|
+
titleInputField: () => cy.get('.edit-box-field-wrapper input'),
|
15
17
|
itemTitle: () => cy.get('.ItemLevel-Header'),
|
16
18
|
tagsButton: () => cy.get('.ngie-button').contains('Tags'),
|
17
19
|
tagsInputField: () => cy.get('.tags-chip-container'),
|
@@ -72,6 +74,23 @@ const steps = {
|
|
72
74
|
cy.visit('/item-engine/demo/create-item');
|
73
75
|
},
|
74
76
|
|
77
|
+
/**
|
78
|
+
* @param {string} reference id of the question to be navigated
|
79
|
+
* @description this function navigates to the edit item page of the
|
80
|
+
*/
|
81
|
+
navigateToEditItemUsingReferenceID: (reference) => {
|
82
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(reference)}`);
|
83
|
+
},
|
84
|
+
|
85
|
+
navigateToEditItemPage: () => {
|
86
|
+
createItemPage.referenceId()
|
87
|
+
.invoke('text')
|
88
|
+
.then(text => {
|
89
|
+
const referenceId = text;
|
90
|
+
steps.navigateToEditItemUsingReferenceID(referenceId);
|
91
|
+
});
|
92
|
+
},
|
93
|
+
|
75
94
|
verifyCreateItemContainerIsVisible: () => {
|
76
95
|
createItemPage.createItemContainer()
|
77
96
|
.should('be.visible');
|
@@ -96,6 +115,52 @@ const steps = {
|
|
96
115
|
.should('have.text', arrayOfTags.sort().join(''));
|
97
116
|
},
|
98
117
|
|
118
|
+
/**
|
119
|
+
* @param {string[]} arrayOfTags of text that need to enter in tags input field
|
120
|
+
* @description set tags for an item
|
121
|
+
*/
|
122
|
+
setTags: (arrayOfTags) => {
|
123
|
+
steps.clickOnTagsButton()
|
124
|
+
for (let index = 0; index < arrayOfTags.length; index++) {
|
125
|
+
createItemPage.tagsInputField()
|
126
|
+
.type(`${arrayOfTags[index]}{enter}`);
|
127
|
+
}
|
128
|
+
createItemPage.applyChangesButton()
|
129
|
+
.click();
|
130
|
+
},
|
131
|
+
|
132
|
+
/**
|
133
|
+
* @param {string[]} value of text that need to enter in title input field
|
134
|
+
* @description this function enters text in title input field
|
135
|
+
*/
|
136
|
+
enterTitle: (value) => {
|
137
|
+
createItemPage.titleInputField()
|
138
|
+
.type(value);
|
139
|
+
},
|
140
|
+
|
141
|
+
clickOnSubmitButton: () => {
|
142
|
+
createItemPage.submitButton()
|
143
|
+
.click();
|
144
|
+
},
|
145
|
+
|
146
|
+
|
147
|
+
navigateToStudentViewPage: () => {
|
148
|
+
createItemPage.referenceId()
|
149
|
+
.invoke('text')
|
150
|
+
.then(text => {
|
151
|
+
const referenceId = text;
|
152
|
+
steps.navigateToStudentViewUsingReferenceID(referenceId);
|
153
|
+
});
|
154
|
+
},
|
155
|
+
|
156
|
+
/**
|
157
|
+
* @param {string} reference id of the question to be navigated
|
158
|
+
* @description this function navigates to the student view page
|
159
|
+
*/
|
160
|
+
navigateToStudentViewUsingReferenceID: (reference) => {
|
161
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(reference)}`);
|
162
|
+
},
|
163
|
+
|
99
164
|
clickOnSettingsButton: () => {
|
100
165
|
createItemPage.settingsBtn()
|
101
166
|
.click();
|
@@ -106,7 +171,7 @@ const steps = {
|
|
106
171
|
* @param {number} questionNumber denotes question number
|
107
172
|
* @param {string} questionTitle denotes question title
|
108
173
|
* @param {string} questionInstruction denotes question instruction
|
109
|
-
* @description verify question content
|
174
|
+
* @description verify question content
|
110
175
|
*/
|
111
176
|
|
112
177
|
verifyBasicQuestionContentsPreview: ({ questionIndex, questionTitle, questionInstructions, panel = 0 }) => {
|
@@ -208,7 +273,7 @@ const steps = {
|
|
208
273
|
},
|
209
274
|
|
210
275
|
/**
|
211
|
-
* @param {string} spacing {("default"| "double"|"triple")}
|
276
|
+
* @param {string} spacing {("default"| "double"|"triple")}
|
212
277
|
* @param {boolean} isHorizontalCheckboxChecked {("true"| "false")}
|
213
278
|
* @description this function verifies spacing between questions
|
214
279
|
*/
|