itemengine-cypress-automation 1.0.190 → 1.0.191
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +1 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +3 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +4 -20
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +2 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/headerSection.js +2 -4
- package/cypress/e2e/ILC/FeedbackScaleNew/additionalSettings.js +5 -5
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +3 -3
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +2 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +4 -5
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +4 -6
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +0 -1
- package/cypress/e2e/ILC/Graphing/headerSection.js +3 -3
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -8
- package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/editTabBasicSection.js +2 -1
- package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +1 -1
- package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +2 -2
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/MultipleSelection/headerSection.js +2 -4
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/headerSection.js +2 -3
- package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +14 -8
- package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/SingleSelection/headerSection.js +2 -2
- package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +2 -2
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/headerSection.js +2 -2
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +11 -13
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +4 -4
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -2
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +25 -43
- package/cypress/e2e/ILC/TextSelection/headerSection.js +2 -4
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +4 -4
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +11 -11
- package/cypress/e2e/ILC/ThirdPartyGeogebraActivity/headerSection.js +4 -4
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +17 -16
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +4 -18
- package/cypress/fixtures/evaluationMethodsAndCustomSettings.js +2 -2
- package/cypress/pages/components/colorPopupComponent.js +1 -1
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +5 -2
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/pages/components/optionsWrapperComponent.js +0 -1
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/toolSettingsComponent.js +12 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +2 -2
- package/cypress/pages/feedbackScalePage.js +20 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -15
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +2 -2
- package/cypress/pages/graphingPage.js +3 -3
- package/cypress/pages/listOrderingPage.js +1 -1
- package/cypress/pages/protractorPage.js +2 -2
- package/cypress/pages/rulerPage.js +13 -1
- package/cypress/pages/simpleCalculatorPage.js +1 -1
- package/cypress/pages/singleSelectionPage.js +10 -0
- package/cypress/pages/textEntryMathPage.js +5 -4
- package/cypress/pages/textSelectionPage.js +31 -8
- package/cypress/pages/uploadResponsePage.js +4 -1
- package/package.json +1 -1
@@ -45,7 +45,8 @@ describe('Create item page - Single selection grid: Header section and Saving qu
|
|
45
45
|
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
46
46
|
|
47
47
|
it('Validation error messages should be displayed below required input fields', () => {
|
48
|
-
singleSelectionGridPage.steps.
|
48
|
+
singleSelectionGridPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
|
49
|
+
singleSelectionGridPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
|
49
50
|
utilities.verifyInnerText(utilities.getNthElement(singleSelectionGridPage.errorMessage(), 1), 'Error: Please enter some text.');
|
50
51
|
utilities.verifyInnerText(utilities.getNthElement(singleSelectionGridPage.errorMessage(), 2), 'Error: Please enter points.');
|
51
52
|
for (let index = 1; index < 4; index++) {
|
@@ -56,7 +57,6 @@ describe('Create item page - Single selection grid: Header section and Saving qu
|
|
56
57
|
});
|
57
58
|
|
58
59
|
it('Validation error messages should disappear when required input fields are filled', () => {
|
59
|
-
singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
|
60
60
|
singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
61
61
|
singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
62
62
|
singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
@@ -173,7 +173,7 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
|
|
173
173
|
textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(0);
|
174
174
|
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Answer is required.');
|
175
175
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
|
176
|
-
utilities.verifyElementCount(textEntryMathPage.
|
176
|
+
utilities.verifyElementCount(textEntryMathPage.responseAccordionAnswerInputField(), 2);
|
177
177
|
});
|
178
178
|
|
179
179
|
it('When user gives an input to \'Answer\' input field,then error message should disappear', () => {
|
@@ -183,7 +183,7 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
|
|
183
183
|
|
184
184
|
it('When user clicks on \'Add alternate\' button, then one more answer input field should be displayed', () => {
|
185
185
|
textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(0);
|
186
|
-
utilities.verifyElementCount(textEntryMathPage.
|
186
|
+
utilities.verifyElementCount(textEntryMathPage.responseAccordionAnswerInputField(), 3);
|
187
187
|
});
|
188
188
|
|
189
189
|
it('When more than one answer input fields are present, then answer field numeration and input field delete buttons should be displayed for both input fields', () => {
|
@@ -206,7 +206,7 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
|
|
206
206
|
'font-size': css.fontSize.normal,
|
207
207
|
'font-weight': css.fontWeight.semibold,
|
208
208
|
});
|
209
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.
|
209
|
+
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.responseAccordionAnswerInputField(), 1), {
|
210
210
|
'color': css.color.text,
|
211
211
|
'font-size': css.fontSize.default,
|
212
212
|
'font-weight': css.fontWeight.regular,
|
@@ -234,7 +234,7 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
|
|
234
234
|
cy.log('Pre-step: Add one more answer input field');
|
235
235
|
textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(0);
|
236
236
|
textEntryMathPage.steps.clickOnAnswerInputDeleteButton(0);
|
237
|
-
utilities.verifyElementCount(textEntryMathPage.
|
237
|
+
utilities.verifyElementCount(textEntryMathPage.responseAccordionAnswerInputField(), 3);
|
238
238
|
textEntryMathPage.steps.verifyAnswerInputFieldNumerationAndDeleteButtonIsVisible(0);
|
239
239
|
textEntryMathPage.steps.verifyAnswerInputFieldNumerationAndDeleteButtonIsVisible(1);
|
240
240
|
textEntryMathPage.steps.verifyAnswerInputFieldNumerationAndDeleteButtonIsVisible(2);
|
@@ -244,7 +244,7 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
|
|
244
244
|
cy.log('Pre-step: Reduce number of answer input fields to 1');
|
245
245
|
textEntryMathPage.steps.clickOnAnswerInputDeleteButton(0);
|
246
246
|
textEntryMathPage.steps.clickOnAnswerInputDeleteButton(0);
|
247
|
-
utilities.verifyElementCount(textEntryMathPage.
|
247
|
+
utilities.verifyElementCount(textEntryMathPage.responseAccordionAnswerInputField(), 1);
|
248
248
|
textEntryMathPage.steps.verifyAnswerInputFieldNumerationAndDeleteButtonNotExists();
|
249
249
|
});
|
250
250
|
});
|
@@ -377,24 +377,22 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
|
|
377
377
|
if (evaluationMethod.customSettings.includes('Decimal separator')) {
|
378
378
|
textEntryMathPage.steps.verifyDecimalSeparatorsContents();
|
379
379
|
} else {
|
380
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.
|
380
|
+
utilities.verifyElementVisibilityState(textEntryMathPage.toggleSeparatorWrapper(), 'notExist');
|
381
381
|
}
|
382
382
|
if (evaluationMethod.customSettings.includes('Thousands separator')) {
|
383
383
|
textEntryMathPage.steps.verifyThousandsSeparatorsContents(thousandsSeparatorForDotDecimalSeparator);
|
384
384
|
} else {
|
385
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.
|
385
|
+
utilities.verifyElementVisibilityState(textEntryMathPage.toggleSeparatorWrapper(), 'notExist');
|
386
386
|
}
|
387
387
|
if (evaluationMethod.customSettings.includes('Decimal places to be compared')) {
|
388
388
|
textEntryMathPage.steps.verifyDecimalPlacesToBeComparedSectionContents();
|
389
389
|
} else {
|
390
390
|
utilities.verifyElementVisibilityState(textEntryMathPage.decimalPlacesToBeComparedInputField(), 'notExist');
|
391
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.decimalPlacesToBeComparedLabel(), 'notExist');
|
392
391
|
}
|
393
392
|
if (evaluationMethod.customSettings.includes('Tolerance')) {
|
394
393
|
textEntryMathPage.steps.verifyToleranceSectionContents();
|
395
394
|
} else {
|
396
395
|
utilities.verifyElementVisibilityState(textEntryMathPage.toleranceInputField(), 'notExist');
|
397
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.toleranceLabel(), 'notExist');
|
398
396
|
}
|
399
397
|
if (evaluationMethod.customSettings.includes('Type of expression')) {
|
400
398
|
utilities.verifyElementVisibilityState(textEntryMathPage.typeOfExpressionLabel(), 'visible');
|
@@ -420,23 +418,23 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
|
|
420
418
|
}
|
421
419
|
if (evaluationMethod.customSettings.includes('Syntax')) {
|
422
420
|
utilities.verifyElementVisibilityState(textEntryMathPage.syntaxLabel(), 'visible');
|
423
|
-
utilities.verifyInnerText(textEntryMathPage.syntaxLabel(), '
|
421
|
+
utilities.verifyInnerText(textEntryMathPage.syntaxLabel(), 'Syntax');
|
424
422
|
utilities.verifyElementVisibilityState(textEntryMathPage.syntaxDropdown(), 'visible');
|
425
423
|
utilities.verifyInnerText(textEntryMathPage.syntaxDropdown(), 'Number');
|
426
424
|
cy.log(`When user expands \'Syntax\' dropdown, then the followings options should be displayed ${syntaxDropdown.join(', ')}`);
|
427
|
-
cy.log('Pre-step: Expanding \'
|
425
|
+
cy.log('Pre-step: Expanding \'Syntax\' dropdown');
|
428
426
|
textEntryMathPage.steps.expandSyntaxDropdown();
|
429
427
|
syntaxDropdown.forEach((type, index) => {
|
430
428
|
utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.syntaxDropdownOption(), index), type);
|
431
429
|
});
|
432
430
|
textEntryMathPage.steps.verifySyntaxDropdownListOptionActiveState(0);
|
433
|
-
for (let index =
|
431
|
+
for (let index = 1; index < syntaxDropdown.length; index++) {
|
434
432
|
textEntryMathPage.steps.verifySyntaxDropdownListOptionInactiveState(index);
|
435
433
|
};
|
436
434
|
cy.log('When user selects a different option in \'Syntax\' dropdown, then the dropdown should be collapsed and the selected option should be displayed in the dropdown');
|
437
435
|
textEntryMathPage.steps.selectSyntaxDropdownListOption('Number');
|
438
436
|
textEntryMathPage.steps.verifySyntaxDropdownIsCollapsed();
|
439
|
-
utilities.verifyInnerText(textEntryMathPage.syntaxDropdown(), '
|
437
|
+
utilities.verifyInnerText(textEntryMathPage.syntaxDropdown(), 'Number');
|
440
438
|
} else {
|
441
439
|
utilities.verifyElementVisibilityState(textEntryMathPage.syntaxLabel(), 'notExist');
|
442
440
|
utilities.verifyElementVisibilityState(textEntryMathPage.syntaxDropdown(), 'notExist');
|
@@ -41,6 +41,7 @@ describe('Create Item page - Text selection - Basic scoring for all text selecti
|
|
41
41
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(customTextSelectionArray[1]);
|
42
42
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(customTextSelectionArray[0]);
|
43
43
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(customTextSelectionArray[1]);
|
44
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
44
45
|
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
45
46
|
});
|
46
47
|
|
@@ -33,6 +33,7 @@ describe('Create item page - Text selection: Partial different weights', () => {
|
|
33
33
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
34
34
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
35
35
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[2]);
|
36
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
36
37
|
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
37
38
|
});
|
38
39
|
|
@@ -30,7 +30,7 @@ describe('Create item page - Text selection: Partial different with alternative
|
|
30
30
|
textSelectionPage.steps.switchToPreviewTab();
|
31
31
|
});
|
32
32
|
|
33
|
-
it('When the user selects \'Grading view\' without attempting the question, status message should
|
33
|
+
it('When the user selects \'Grading view\' without attempting the question, status message incorrect should be displayed and correct answer section should be displayed with correct answers of the alternate accordion', () => {
|
34
34
|
textSelectionPage.steps.verifyPreviewScore(0, 15);
|
35
35
|
textSelectionPage.steps.switchToGradingView();
|
36
36
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
@@ -38,7 +38,7 @@ describe('Create item page - Text selection: Partial different with alternative
|
|
38
38
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[2]);
|
39
39
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[3]);
|
40
40
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[4]);
|
41
|
-
textSelectionPage.steps.
|
41
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
42
42
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[2]);
|
43
43
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[3]);
|
44
44
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[4]);
|
@@ -177,9 +177,9 @@ describe('Create item page - Text selection: Partial different with alternative
|
|
177
177
|
cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message should not be displayed and correct answer section should not be displayed')
|
178
178
|
textSelectionPage.steps.checkAnswer();
|
179
179
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
180
|
-
textSelectionPage.steps.
|
180
|
+
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[1]);
|
181
181
|
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[2]);
|
182
|
-
textSelectionPage.steps.
|
182
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[3]);
|
183
183
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[4]);
|
184
184
|
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[5]);
|
185
185
|
textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
@@ -30,7 +30,7 @@ describe('Create item page - Text selection: Partial different with alternative
|
|
30
30
|
textSelectionPage.steps.switchToPreviewTab();
|
31
31
|
});
|
32
32
|
|
33
|
-
it('When the user selects \'Grading view\' without attempting the question, status message should
|
33
|
+
it('When the user selects \'Grading view\' without attempting the question, incorrect status message should be displayed and correct answer section should be displayed with correct answers of the correct accordion', () => {
|
34
34
|
textSelectionPage.steps.verifyPreviewScore(0, 15);
|
35
35
|
textSelectionPage.steps.switchToGradingView();
|
36
36
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
@@ -38,7 +38,7 @@ describe('Create item page - Text selection: Partial different with alternative
|
|
38
38
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[2]);
|
39
39
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[3]);
|
40
40
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[4]);
|
41
|
-
textSelectionPage.steps.
|
41
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
42
42
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
43
43
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
44
44
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[2]);
|
@@ -30,7 +30,7 @@ describe('Create item page - Text selection: Partial different with alternative
|
|
30
30
|
textSelectionPage.steps.switchToPreviewTab();
|
31
31
|
});
|
32
32
|
|
33
|
-
it('When the user selects \'Grading view\' without attempting the question, status message should
|
33
|
+
it('When the user selects \'Grading view\' without attempting the question, incorrect status message should be displayed and correct answer section should be displayed with correct answers of the correct accordion', () => {
|
34
34
|
textSelectionPage.steps.verifyPreviewScore(0, 15);
|
35
35
|
textSelectionPage.steps.switchToGradingView();
|
36
36
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
@@ -38,7 +38,7 @@ describe('Create item page - Text selection: Partial different with alternative
|
|
38
38
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[2]);
|
39
39
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[3]);
|
40
40
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[4]);
|
41
|
-
textSelectionPage.steps.
|
41
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
42
42
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
43
43
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
44
44
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[2]);
|
@@ -132,7 +132,7 @@ describe('Create item page - Text selection: Partial different with alternative
|
|
132
132
|
textSelectionPage.steps.resetQuestionPreview();
|
133
133
|
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
|
134
134
|
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[4]);
|
135
|
-
textSelectionPage.steps.verifyPreviewScore(
|
135
|
+
textSelectionPage.steps.verifyPreviewScore(12, 15);
|
136
136
|
textSelectionPage.steps.switchToGradingView();
|
137
137
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
138
138
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
@@ -30,6 +30,7 @@ describe('Create item page - Text selection: Partial equal weights', () => {
|
|
30
30
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
31
31
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
32
32
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
33
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
33
34
|
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
34
35
|
});
|
35
36
|
|
@@ -30,7 +30,7 @@ describe('Create item page - Text selection: Partial equal with alternative answ
|
|
30
30
|
textSelectionPage.steps.switchToPreviewTab();
|
31
31
|
});
|
32
32
|
|
33
|
-
it('When the user selects \'Grading view\' without attempting the question, status message should
|
33
|
+
it('When the user selects \'Grading view\' without attempting the question, incorrect status message should be displayed and correct answer section should be displayed with correct answers of the correct accordion', () => {
|
34
34
|
textSelectionPage.steps.verifyPreviewScore(0, 15);
|
35
35
|
textSelectionPage.steps.switchToGradingView();
|
36
36
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
@@ -38,7 +38,7 @@ describe('Create item page - Text selection: Partial equal with alternative answ
|
|
38
38
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[2]);
|
39
39
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[3]);
|
40
40
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[4]);
|
41
|
-
textSelectionPage.steps.
|
41
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
42
42
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[2]);
|
43
43
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[3]);
|
44
44
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[4]);
|
@@ -30,7 +30,7 @@ describe('Create item page - Text selection: Partial equal with alternative answ
|
|
30
30
|
textSelectionPage.steps.switchToPreviewTab();
|
31
31
|
});
|
32
32
|
|
33
|
-
it('When the user selects \'Grading view\' without attempting the question, status message should
|
33
|
+
it('When the user selects \'Grading view\' without attempting the question, incorrect status message should be displayed and correct answer section should be displayed with correct answers of the correct accordion', () => {
|
34
34
|
textSelectionPage.steps.verifyPreviewScore(0, 15);
|
35
35
|
textSelectionPage.steps.switchToGradingView();
|
36
36
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
@@ -38,7 +38,7 @@ describe('Create item page - Text selection: Partial equal with alternative answ
|
|
38
38
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[2]);
|
39
39
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[3]);
|
40
40
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[4]);
|
41
|
-
textSelectionPage.steps.
|
41
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
42
42
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
43
43
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
44
44
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[2]);
|
@@ -30,7 +30,7 @@ describe('Create item page - Text selection: Partial equal with alternative answ
|
|
30
30
|
textSelectionPage.steps.switchToPreviewTab();
|
31
31
|
});
|
32
32
|
|
33
|
-
it('When the user selects \'Grading view\' without attempting the question, status message should
|
33
|
+
it('When the user selects \'Grading view\' without attempting the question, incorrect status message should be displayed and correct answer section should be displayed with correct answers of the correct accordion', () => {
|
34
34
|
textSelectionPage.steps.verifyPreviewScore(0, 15);
|
35
35
|
textSelectionPage.steps.switchToGradingView();
|
36
36
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
@@ -38,7 +38,7 @@ describe('Create item page - Text selection: Partial equal with alternative answ
|
|
38
38
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[2]);
|
39
39
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[3]);
|
40
40
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[4]);
|
41
|
-
textSelectionPage.steps.
|
41
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
42
42
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
43
43
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
44
44
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[2]);
|
@@ -262,7 +262,6 @@ describe('Create item page - Text selection: All or nothing ', () => {
|
|
262
262
|
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
263
263
|
textSelectionPage.steps.resetQuestionPreview();
|
264
264
|
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
|
265
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
|
266
265
|
textSelectionPage.steps.verifyPreviewScore(2, 20);
|
267
266
|
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
268
267
|
});
|
@@ -281,7 +280,6 @@ describe('Create item page - Text selection: All or nothing ', () => {
|
|
281
280
|
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
282
281
|
textSelectionPage.steps.resetQuestionPreview();
|
283
282
|
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
|
284
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
|
285
283
|
textSelectionPage.steps.verifyPreviewScore(2, 20);
|
286
284
|
});
|
287
285
|
});
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { textSelectionPage } from "../../../pages";
|
2
|
+
import { commonComponents } from "../../../pages/components";
|
2
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
4
|
import utilities from "../../../support/helpers/utilities";
|
4
5
|
const css = Cypress.env('css');
|
@@ -103,29 +104,29 @@ describe('Create item page - Text selection: Scoring section', () => {
|
|
103
104
|
utilities.verifyElementVisibilityState(textSelectionPage.pointsPerResponseLabel(), 'visible');
|
104
105
|
});
|
105
106
|
|
106
|
-
it('When the user gives a score input to \'Points\' input field, then the score should be equally divided among the
|
107
|
+
it('When the user gives a score input to \'Points\' input field, then the score should be equally divided among the selected options \'Points per response\' label', () => {
|
107
108
|
textSelectionPage.steps.allotPoints(6);
|
108
|
-
textSelectionPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(
|
109
|
+
textSelectionPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3);
|
109
110
|
});
|
110
111
|
|
111
|
-
it('When the user inserts one more
|
112
|
+
it('When the user inserts one more selected option, then points per response should get updated accordingly', () => {
|
112
113
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[2]);
|
113
|
-
textSelectionPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(
|
114
|
+
textSelectionPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(2);
|
114
115
|
});
|
115
116
|
|
116
|
-
it('When the user
|
117
|
+
it('When the user deselects an option, then points per response should get updated accordingly', () => {
|
117
118
|
textSelectionPage.steps.deselectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[2]);
|
118
|
-
textSelectionPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(
|
119
|
+
textSelectionPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3);
|
119
120
|
});
|
120
121
|
|
121
|
-
it('When the user adds an option
|
122
|
+
it('When the user adds an option then the points should not change', () => {
|
122
123
|
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[3]);
|
123
|
-
textSelectionPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(
|
124
|
+
textSelectionPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3);
|
124
125
|
});
|
125
126
|
|
126
|
-
it('When the user deletes an option
|
127
|
+
it('When the user deletes an option then the points should not change', () => {
|
127
128
|
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[3]);
|
128
|
-
textSelectionPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(
|
129
|
+
textSelectionPage.steps.verifyPartialEqualWeightsPointsPerResponseScore(3);
|
129
130
|
});
|
130
131
|
|
131
132
|
it('When the user switches to \'All or nothing\' scoring, the \'Points per response\' label and the points displayed for individual responses should not be displayed and the points displayed in \'Points\' input field should remain unchanged', () => {
|
@@ -217,19 +218,13 @@ describe('Create item page - Text selection: Scoring section', () => {
|
|
217
218
|
utilities.verifyInnerText(textSelectionPage.setPointsPopupTitle(), 'Set points');
|
218
219
|
});
|
219
220
|
|
220
|
-
it('When user
|
221
|
+
it('When the user focuses in and out of the empty points input field, \'Please enter points.\' validation text should not be displayed below the points input field', () => {
|
221
222
|
textSelectionPage.steps.focusInAndFocusOutOfPointsInputField(0);
|
222
|
-
utilities.
|
223
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
223
224
|
});
|
224
225
|
|
225
|
-
|
226
|
-
|
227
|
-
it('When user enters points then the error message should disappear', () => {
|
228
|
-
textSelectionPage.steps.allotPointsToSetPointsPopupPointsInputField([5]);
|
229
|
-
utilities.verifyElementVisibilityState(textSelectionPage.errorMessage(), 'notExist');
|
230
|
-
});
|
231
|
-
|
232
|
-
it('When user clicks on Cancel button then the popup should close and on opening the popup again empty points fields should be displayed', () => {
|
226
|
+
it('When user has entered points and clicks on Cancel button then the popup should close and on opening the popup again empty points fields should be displayed', () => {
|
227
|
+
textSelectionPage.steps.allotPointsToSetPointsPopupPointsInputField([4.8]);
|
233
228
|
textSelectionPage.steps.cancelSetPointsPopup();
|
234
229
|
textSelectionPage.steps.openSetPointsPopup();
|
235
230
|
utilities.verifyInnerText(textSelectionPage.pointsInputField(), '');
|
@@ -304,35 +299,22 @@ describe('Create item page - Text selection: Scoring section', () => {
|
|
304
299
|
textSelectionPage.steps.cancelSetPointsPopup();
|
305
300
|
});
|
306
301
|
|
307
|
-
it('When user tries to add \'Alternate\' tab without adding points to all options points field then a warning popup
|
302
|
+
it('When user tries to add \'Alternate\' tab without adding points to all options points field then a warning popup and error message should not be displayed', () => {
|
308
303
|
textSelectionPage.steps.clickOnAddAlternativeAnswerButton();
|
309
|
-
textSelectionPage.
|
310
|
-
|
311
|
-
|
312
|
-
it('Warning popup should close on clicking the Close icon button', () => {
|
313
|
-
textSelectionPage.steps.closeWarningPopup();
|
304
|
+
utilities.verifyElementVisibilityState(textSelectionPage.dialogBox(), 'notExist');
|
305
|
+
textSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
|
306
|
+
textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
|
314
307
|
});
|
315
308
|
|
316
|
-
it('\'
|
317
|
-
textSelectionPage.steps.
|
318
|
-
utilities.verifyInnerText(textSelectionPage.errorMessage(), 'Error: Please enter points.');
|
309
|
+
it('\'Alternate 1\' tab should be added', () => {
|
310
|
+
textSelectionPage.steps.verifyAlternativeAnswerAccordionLabel(0);
|
319
311
|
});
|
320
312
|
|
321
|
-
it('When user opens the Set points popup
|
313
|
+
it('When user opens the Set points popup in correct accordion then error message should be not be displayed', () => {
|
314
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
315
|
+
textSelectionPage.steps.expandCorrectAnswerAccordion();
|
322
316
|
textSelectionPage.steps.openSetPointsPopup();
|
323
|
-
textSelectionPage.steps.
|
324
|
-
textSelectionPage.steps.allotPointsToSetPointsPopupPointsInputField([4, 3]);
|
325
|
-
utilities.verifyElementVisibilityState(textSelectionPage.errorMessage(), 'notExist');
|
326
|
-
});
|
327
|
-
|
328
|
-
it('When user has alloted points to all options then the error message and error icon should not be displayed', () => {
|
329
|
-
textSelectionPage.steps.saveSetPointsPopup();
|
330
|
-
textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
|
331
|
-
utilities.verifyElementVisibilityState(textSelectionPage.errorMessage(), 'notExist');
|
332
|
-
});
|
333
|
-
|
334
|
-
it('User should be able to add \'Alternate\' tab', () => {
|
335
|
-
textSelectionPage.steps.addAlternativeAnswerAccordion(1);
|
317
|
+
textSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
|
336
318
|
});
|
337
319
|
});
|
338
320
|
});
|
@@ -45,17 +45,15 @@ describe('Create item page - Text selection: Header section and Saving question'
|
|
45
45
|
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
46
46
|
|
47
47
|
it('Validation error messages should be displayed below required input fields', () => {
|
48
|
-
textSelectionPage.steps.
|
49
|
-
textSelectionPage.steps.
|
48
|
+
textSelectionPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
|
49
|
+
textSelectionPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
|
50
50
|
textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
|
51
51
|
textSelectionPage.steps.verifySpecifyCorrectAnswerErrorMessage();
|
52
52
|
});
|
53
53
|
|
54
54
|
it('Validation error messages should disappear when required input fields are filled', () => {
|
55
|
-
textSelectionPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
56
55
|
textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Custom', 'Lorem');
|
57
56
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection('Lorem');
|
58
|
-
textSelectionPage.steps.allotPoints(10);
|
59
57
|
textSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
|
60
58
|
textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
|
61
59
|
});
|
@@ -38,12 +38,12 @@ describe('Create Item page - Text selection: Question Instructions and Question
|
|
38
38
|
|
39
39
|
it('\'Question\' label and input field should be displayed and by default in the question input field, sample \'Lorem Ipsum\' text should be present', () => {
|
40
40
|
utilities.verifyInnerText(textSelectionPage.questionLabel(), 'Question');
|
41
|
-
utilities.verifyInnerText(textSelectionPage.questionInputField(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\
|
41
|
+
utilities.verifyInnerText(textSelectionPage.questionInputField(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
|
42
42
|
});
|
43
43
|
|
44
44
|
it('The default sample \'Lorem Ipsum\' text in the question input field should also be displayed in specify possible options section and specify correct answer section in the edit tab.', () => {
|
45
|
-
utilities.verifyInnerText(textSelectionPage.specifyPossibleOptionsTextFieldWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\
|
46
|
-
utilities.verifyInnerText(textSelectionPage.specifyCorrectAnswerTextWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\
|
45
|
+
utilities.verifyInnerText(textSelectionPage.specifyPossibleOptionsTextFieldWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
|
46
|
+
utilities.verifyInnerText(textSelectionPage.specifyCorrectAnswerTextWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
|
47
47
|
});
|
48
48
|
|
49
49
|
it('When the user removes all the text from the question input field and focuses out of it, an error message \'Error: Question is required.\' should be displayed', () => {
|
@@ -124,7 +124,7 @@ describe('Create Item page - Text selection: Question Instructions and Question
|
|
124
124
|
|
125
125
|
it('In Preview tab, the sample \'Lorem Ipsum\' text should be displayed in the question field', () => {
|
126
126
|
textSelectionPage.steps.switchToPreviewTab()
|
127
|
-
utilities.verifyInnerText(textSelectionPage.questionTextWrapperPreviewTab(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\
|
127
|
+
utilities.verifyInnerText(textSelectionPage.questionTextWrapperPreviewTab(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
|
128
128
|
});
|
129
129
|
|
130
130
|
it('The user should be able to edit text in the question input field and the updated question should be displayed in the preview tab', () => {
|
@@ -4,9 +4,9 @@ import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
5
5
|
|
6
6
|
const textSelectionModeArray = ['Custom', 'Paragraph', 'Sentence', 'Word'];
|
7
|
-
const paragraphTextArray = ['Horses cannot breat& through their mouth! Cows
|
8
|
-
const sentenceTextArray = ['Horses cannot breat& through their mouth! ', 'Cows
|
9
|
-
const wordTextArray = ['Horses', 'cannot', 'breat&', 'through', 'their', 'mouth', 'Cows', '
|
7
|
+
const paragraphTextArray = ['Horses cannot breat& through their mouth! Cows sleep standing up?', 'Dogs have e#cellent \'hearing\'.', 'Deers possess nearly, 300 degree field of vision.'];
|
8
|
+
const sentenceTextArray = ['Horses cannot breat& through their mouth! ', 'Cows sleep standing up?', 'Dogs have e#cellent \'hearing\'.', 'Deers possess nearly, 300 degree field of vision.'];
|
9
|
+
const wordTextArray = ['Horses', 'cannot', 'breat&', 'through', 'their', 'mouth', 'Cows', 'sleep', 'standing', 'up', 'Dogs', 'have', 'e#cellent', 'hearing', 'Deers', 'possess', 'nearly', '300', 'degree', 'field', 'of', 'vision'];
|
10
10
|
const customTextArray = ['Cows can sleep', 'Dogs have e#cellent \'hearing\'', 'nearly, 300 degree field of vision.'];
|
11
11
|
|
12
12
|
describe('Create Item page - Text selection: Text selection modes in specify possible options section', () => {
|
@@ -42,8 +42,8 @@ describe('Create Item page - Text selection: Text selection modes in specify pos
|
|
42
42
|
textSelectionPage.steps.verifyTextSelectionModeIsNotSelected('Word');
|
43
43
|
});
|
44
44
|
|
45
|
-
it('\'Specify possible
|
46
|
-
utilities.verifyInnerText(textSelectionPage.specifyPossibleOptionsLabel(), '
|
45
|
+
it('\'Specify possible options\' label should be displayed', () => {
|
46
|
+
utilities.verifyInnerText(textSelectionPage.specifyPossibleOptionsLabel(), 'Specify possible options');
|
47
47
|
utilities.verifyElementVisibilityState(textSelectionPage.specifyPossibleOptionsLabel(), 'visible');
|
48
48
|
});
|
49
49
|
|
@@ -212,7 +212,7 @@ describe('Create Item page - Text selection: Text selection modes in specify pos
|
|
212
212
|
textSelectionPage.steps.clickOnRejectButtonInDialogBox();
|
213
213
|
utilities.verifyElementVisibilityState(textSelectionPage.dialogBox(), 'notExist');
|
214
214
|
textSelectionPage.steps.verifyOptionIsSelectedInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
215
|
-
textSelectionPage.steps.
|
215
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
|
216
216
|
textSelectionPage.steps.verifyOptionIsNotSelectedInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
|
217
217
|
});
|
218
218
|
|
@@ -327,8 +327,8 @@ describe('Create Item page - Text selection: Text selection modes in specify pos
|
|
327
327
|
it('When user has switched to \'Word\' text selection type, the previously added input should be divided into options as per \'Word\' text selection type and all the options should be in deselected state', () => {
|
328
328
|
utilities.verifyElementCount(textSelectionPage.optionSpecifyCorrectAnswer(), 0);
|
329
329
|
utilities.verifyElementCount(textSelectionPage.specifyPossibleOptionsTextParagraphs(), 3);
|
330
|
-
utilities.verifyElementCount(textSelectionPage.specifyCorrectAnswerTextSpans(),
|
331
|
-
textSelectionPage.steps.verifyNumberOfOptionsInAParagraphInSpecifyPossibleOptionsSection(0,
|
330
|
+
utilities.verifyElementCount(textSelectionPage.specifyCorrectAnswerTextSpans(), 22);
|
331
|
+
textSelectionPage.steps.verifyNumberOfOptionsInAParagraphInSpecifyPossibleOptionsSection(0, 10);
|
332
332
|
textSelectionPage.steps.verifyNumberOfOptionsInAParagraphInSpecifyPossibleOptionsSection(1, 4);
|
333
333
|
textSelectionPage.steps.verifyNumberOfOptionsInAParagraphInSpecifyPossibleOptionsSection(2, 8);
|
334
334
|
wordTextArray.forEach((wordText, index) => {
|
@@ -338,12 +338,12 @@ describe('Create Item page - Text selection: Text selection modes in specify pos
|
|
338
338
|
});
|
339
339
|
|
340
340
|
it('The option count should be displayed as per the number of \'Word\'.', () => {
|
341
|
-
textSelectionPage.steps.verifyOptionCounterTextAndValue(
|
341
|
+
textSelectionPage.steps.verifyOptionCounterTextAndValue(0);
|
342
342
|
});
|
343
343
|
|
344
344
|
it('When user clicks on an option, then the option should be selected and the option count should increase by 1.', () => {
|
345
|
-
textSelectionPage.steps.
|
346
|
-
textSelectionPage.steps.
|
345
|
+
textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Word', wordTextArray[0])
|
346
|
+
textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Word', wordTextArray[1])
|
347
347
|
for (let arrayIndex = 2; arrayIndex < wordTextArray.length; arrayIndex++) {
|
348
348
|
textSelectionPage.steps.verifyOptionIsNotSelectedInSpecifyPossibleOptionsSection(wordTextArray[arrayIndex]);
|
349
349
|
}
|
@@ -49,10 +49,10 @@ describe('Create item page - GeoGebra activity: Question instructions', () => {
|
|
49
49
|
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
50
50
|
|
51
51
|
it('Validation error messages should be displayed below required input fields', () => {
|
52
|
-
geoGebraActivityPage.steps.
|
53
|
-
utilities.verifyInnerText(
|
54
|
-
utilities.verifyElementVisibilityState(
|
55
|
-
geoGebraActivityPage.steps.
|
52
|
+
geoGebraActivityPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
|
53
|
+
utilities.verifyInnerText(geoGebraActivityPage.errorMessage(), 'Error: Resource link is required.');
|
54
|
+
utilities.verifyElementVisibilityState(geoGebraActivityPage.errorMessage(), 'visible');
|
55
|
+
geoGebraActivityPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
|
56
56
|
});
|
57
57
|
|
58
58
|
it('Validation error messages should disappear when required input fields are filled', () => {
|