itemengine-cypress-automation 1.0.155-migrationScripts-86e4c95.0 → 1.0.155
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/DesmosGraphing/additionalSettings.js +5 -5
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +4 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +6 -6
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +2 -3
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +34 -29
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsForDropdowns.js +7 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +20 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +5 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +5 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +4 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +0 -8
- package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +39 -35
- package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +8 -6
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillColor.js +475 -0
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +669 -0
- package/cypress/e2e/ILC/GridFill/customizeLayoutSectionShadeCellsGridBorders.js +1 -1
- package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +0 -11
- package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +204 -0
- package/cypress/e2e/ILC/GridFill/gridLayoutEditTabFunctionality.js +229 -0
- package/cypress/e2e/ILC/GridFill/gridLayoutPreviewTabFunctionality.js +219 -0
- package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -0
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +0 -2
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/Matching/draggableOptions.js +1 -1
- package/cypress/e2e/ILC/Matching/headerSection.js +82 -0
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +93 -0
- package/cypress/e2e/ILC/MultipleSelection/blockCreateItem.js +2 -2
- package/cypress/e2e/ILC/MultipleSelection/editTabScoringSection.js +3 -0
- package/cypress/e2e/ILC/MultipleSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/multipleSelectionBasicAccessibility.js +8 -10
- package/cypress/e2e/ILC/MultipleSelection/specifyCorrectAnswerSection.js +3 -3
- package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +16 -25
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +403 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +363 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +393 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +377 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +341 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +373 -0
- package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +0 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +27 -8
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +15 -34
- package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +13 -15
- package/cypress/e2e/ILC/ShortTextResponseNew/specifyCorrectAnswerSection.js +4 -4
- package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +4 -2
- package/cypress/e2e/ILC/SingleSelection/blockCreateItem.js +2 -2
- package/cypress/e2e/ILC/SingleSelection/specifyCorrectAnswerSection.js +3 -3
- package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +183 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +185 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +263 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +233 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +205 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +233 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +214 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +213 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +21 -17
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +25 -25
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +20 -17
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -2
- package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +2 -3
- package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +3 -3
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +2 -2
- package/cypress/fixtures/fillColorDefaultProperties.js +35 -0
- package/cypress/fixtures/theme/ilc.json +2 -1
- package/cypress/fixtures/uploads/sampleVirus.zip +0 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +4 -1
- package/cypress/pages/components/colorPopupComponent.js +6 -3
- package/cypress/pages/components/commonComponents.js +1 -1
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +4 -3
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +47 -12
- package/cypress/pages/components/gridQuestionCommonComponent.js +0 -81
- package/cypress/pages/components/imageCanvasComponent.js +10 -8
- package/cypress/pages/components/listSortingAndOrderingBase.js +1 -1
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +1 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
- package/cypress/pages/essayResponsePage.js +4 -4
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +34 -23
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +0 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +26 -4
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +0 -29
- package/cypress/pages/graphingPage.js +26 -16
- package/cypress/pages/gridFillPage.js +1610 -90
- package/cypress/pages/matchingPage.js +164 -20
- package/cypress/pages/multipleSelectionGridPage.js +82 -2
- package/cypress/pages/multipleSelectionPage.js +7 -2
- package/cypress/pages/rulerPage.js +3 -8
- package/cypress/pages/shortTextResponsePage.js +13 -0
- package/cypress/pages/simpleCalculatorPage.js +8 -0
- package/cypress/pages/singleSelectionGridPage.js +58 -2
- package/cypress/pages/textEntryMathPage.js +58 -11
- package/cypress/pages/uploadResponsePage.js +4 -2
- package/package.json +2 -2
- package/cypress/e2e/ILC/MultipleSelection/multipleSelectionAdditionalSettings.js +0 -835
- package/cypress/e2e/ILC/SingleSelection/singleSelectionAdditionalSettings.js +0 -469
@@ -159,7 +159,7 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
159
159
|
|
160
160
|
multipleSelectionPage.tests.verifyAllowStudentsToCheckAnswerLabelAndCheckboxCSS();
|
161
161
|
|
162
|
-
it('When user checks the \'Allow
|
162
|
+
it('When user checks the \'Allow students to check answer\' checkbox then \'Disable previous incorrect options\' checkbox and \'Maximum check answer attempts\' dropdown should be displayed', () => {
|
163
163
|
multipleSelectionPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
164
164
|
utilities.verifyInnerText(multipleSelectionPage.disablePreviousIncorrectOptionLabel(), 'Disable previous incorrect options');
|
165
165
|
utilities.verifyElementVisibilityState(multipleSelectionPage.disablePreviousIncorrectOptionCheckbox(), 'exist');
|
@@ -326,6 +326,7 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
326
326
|
utilities.verifyInnerText(utilities.getNthElement(multipleSelectionPage.minimumNumberOfAnswersDropdownOptions(), index), `${index}`);
|
327
327
|
}
|
328
328
|
multipleSelectionPage.steps.selectOptionFromMinimumNumberOfAnswersDropdown('None');
|
329
|
+
utilities.hoverAwayFromElement();
|
329
330
|
multipleSelectionPage.steps.expandMaximumNumberOfAnswersDropdown();
|
330
331
|
utilities.verifyInnerText(utilities.getNthElement(multipleSelectionPage.maximumNumberOfAnswersDropdownOptions(), 0), 'None');
|
331
332
|
for (let index = 1; index < options.length + 1; index++) {
|
@@ -391,44 +392,34 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
391
392
|
});
|
392
393
|
|
393
394
|
it('When the user has set minimum and maximum number of answer as \'None\' then no warning message should be displayed in the \'Specify correct answer\' section before and after selecting options', () => {
|
394
|
-
multipleSelectionPage.steps.
|
395
|
+
multipleSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
|
395
396
|
multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(0);
|
396
|
-
multipleSelectionPage.steps.
|
397
|
+
multipleSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
|
397
398
|
});
|
398
399
|
|
399
400
|
it('When user sets minimum number of answers more than the number of correct answers, then in the \'Specify Correct Answer\' section a warning message should be displayed stating required number of answers', () => {
|
400
401
|
multipleSelectionPage.steps.expandMinimumNumberOfAnswersDropdown();
|
401
402
|
multipleSelectionPage.steps.selectOptionFromMinimumNumberOfAnswersDropdown('3');
|
402
|
-
multipleSelectionPage.steps.verifyMinMaxWarningMessage('At least 3 answers are required.');
|
403
|
+
multipleSelectionPage.steps.verifyMinMaxWarningMessage('Error: At least 3 answers are required.');
|
403
404
|
});
|
404
405
|
|
405
406
|
it('When user updates the value of minimum number of answers same as the number of correct answers the warning message should disappear', () => {
|
406
407
|
multipleSelectionPage.steps.expandMinimumNumberOfAnswersDropdown();
|
407
408
|
multipleSelectionPage.steps.selectOptionFromMinimumNumberOfAnswersDropdown('1');
|
408
|
-
multipleSelectionPage.steps.
|
409
|
+
multipleSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
|
409
410
|
});
|
410
411
|
|
411
412
|
it('When user updates the \'Minimum number of answers\' dropdown more than the correct answers then a warning message should be displayed', () => {
|
412
413
|
multipleSelectionPage.steps.expandMinimumNumberOfAnswersDropdown();
|
413
414
|
multipleSelectionPage.steps.selectOptionFromMinimumNumberOfAnswersDropdown('2');
|
414
|
-
multipleSelectionPage.steps.verifyMinMaxWarningMessage('At least 2 answers are required.');
|
415
|
-
});
|
416
|
-
|
417
|
-
it('CSS of warning message', { tags: 'css' }, () => {
|
418
|
-
utilities.verifyCSS(multipleSelectionPage.minMaxWarningMessage().find('.min-max-answer-error-text'), {
|
419
|
-
'color': css.color.warningText,
|
420
|
-
'font-size': css.fontSize.normal,
|
421
|
-
'font-weight': css.fontWeight.bold
|
422
|
-
});
|
415
|
+
multipleSelectionPage.steps.verifyMinMaxWarningMessage('Error: At least 2 answers are required.');
|
423
416
|
});
|
424
417
|
|
425
|
-
|
426
|
-
cy.checkAccessibility(multipleSelectionPage.minMaxWarningMessage());
|
427
|
-
});
|
418
|
+
multipleSelectionPage.tests.verifyErrorMessageCSSAndA11y();
|
428
419
|
|
429
420
|
it('When the user sets the number of correct answer same as minimum number of answers the warning message should disappear', () => {
|
430
421
|
multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(3);
|
431
|
-
multipleSelectionPage.steps.
|
422
|
+
multipleSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
|
432
423
|
});
|
433
424
|
|
434
425
|
it('When the user sets minimum number of answers greater than the maximum number of answers then snackbar with the text \'Minimum number of answers can\'t be more than the maximum number of answers\' should be displayed and the dropdown should set it equal to minimum number of answers dropdown', () => {
|
@@ -442,13 +433,13 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
442
433
|
|
443
434
|
it('When the user tries to checks more answer options than specified in the Maximum number of answers dropdown then a warning message should be displayed', () => {
|
444
435
|
multipleSelectionPage.steps.selectSpecifyCorrectAnswerOption(1);
|
445
|
-
multipleSelectionPage.steps.verifyMinMaxWarningMessage('Only 2 answers are permitted.');
|
436
|
+
multipleSelectionPage.steps.verifyMinMaxWarningMessage('Error: Only 2 answers are permitted.');
|
446
437
|
});
|
447
438
|
|
448
439
|
it('When the user updates the number of correct answer options then the warning message should disappear', () => {
|
449
440
|
multipleSelectionPage.steps.uncheckOptionsCheckboxInSpecifyCorrectAnswerSection(0);
|
450
441
|
multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(0);
|
451
|
-
multipleSelectionPage.steps.
|
442
|
+
multipleSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
|
452
443
|
});
|
453
444
|
});
|
454
445
|
|
@@ -480,14 +471,14 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
480
471
|
multipleSelectionPage.steps.selectOptionFromMaximumNumberOfAnswersDropdown('3');
|
481
472
|
multipleSelectionPage.steps.switchToPreviewTab();
|
482
473
|
multipleSelectionPage.steps.checkOptionsCheckboxInPreviewTab(0);
|
483
|
-
multipleSelectionPage.steps.
|
474
|
+
multipleSelectionPage.steps.verifyMinMaxWarningMessagePreviewTab('At least 2 answers are required.');
|
484
475
|
});
|
485
476
|
|
486
477
|
it('CSS of warning message', { tags: 'css' }, () => {
|
487
|
-
utilities.verifyCSS(multipleSelectionPage.minMaxWarningMessage().find('
|
488
|
-
'color': css.color.
|
478
|
+
utilities.verifyCSS(multipleSelectionPage.minMaxWarningMessage().find('[class*="DisabledTextWrapper"]'), {
|
479
|
+
'color': css.color.warningMessage,
|
489
480
|
'font-size': css.fontSize.normal,
|
490
|
-
'font-weight': css.fontWeight.
|
481
|
+
'font-weight': css.fontWeight.regular
|
491
482
|
});
|
492
483
|
});
|
493
484
|
|
@@ -503,7 +494,7 @@ describe('Create Item page - Multiple selection: Student view settings', () => {
|
|
503
494
|
it('When user tries to select options more than maximum number of answers, a warning message \'Only # answers are permitted.\' should be displayed below the options in the student preview', () => {
|
504
495
|
multipleSelectionPage.steps.checkOptionsCheckboxInPreviewTab(2);
|
505
496
|
multipleSelectionPage.steps.selectPreviewTabOption(3);
|
506
|
-
multipleSelectionPage.steps.
|
497
|
+
multipleSelectionPage.steps.verifyMinMaxWarningMessagePreviewTab('Only 3 answers are permitted.');
|
507
498
|
});
|
508
499
|
|
509
500
|
it('When user deselects any option, the warning message should disappear', () => {
|
@@ -0,0 +1,140 @@
|
|
1
|
+
import { multipleSelectionGridPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create Item page - Multiple selection grid: Manually and non scored', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Question Preview: Manually Scored', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
|
15
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
16
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
17
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
18
|
+
multipleSelectionGridPage.steps.expandScoringTypeDropdown();
|
19
|
+
multipleSelectionGridPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
20
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
21
|
+
});
|
22
|
+
|
23
|
+
it('In Preview tab, question instructions and the question grid as set by the user should be displayed', () => {
|
24
|
+
multipleSelectionGridPage.steps.verifyQuestionInstructionsTextPreviewTab('Please select following animals facts are correct or not');
|
25
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
|
26
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 1, column: 0 }, 'Heading');
|
27
|
+
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 2, column: 0 }, 'Subheading');
|
28
|
+
multipleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 1, column: 0 }, 'Elephants are the only mammals that can\'t jump');
|
29
|
+
multipleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 2, column: 0 }, 'Bats are blind and navigate by using echolocation');
|
30
|
+
multipleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 3, column: 0 }, 'Whale are mammals');
|
31
|
+
multipleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
32
|
+
});
|
33
|
+
|
34
|
+
multipleSelectionGridPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Manually scored');
|
35
|
+
});
|
36
|
+
|
37
|
+
describe('Question Preview: Non Scored', () => {
|
38
|
+
abortEarlySetup();
|
39
|
+
before(() => {
|
40
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
41
|
+
cy.barsPreLoaderWait();
|
42
|
+
multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
|
43
|
+
multipleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
44
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
45
|
+
multipleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
46
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
47
|
+
multipleSelectionGridPage.steps.expandScoringTypeDropdown();
|
48
|
+
multipleSelectionGridPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
49
|
+
multipleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
50
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
51
|
+
});
|
52
|
+
|
53
|
+
multipleSelectionGridPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Non scored');
|
54
|
+
|
55
|
+
it('When the user selects \'Grading\' view without attempting the question, correct answers section should be displayed with a preview of the entire grid with correct answers', () => {
|
56
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
57
|
+
multipleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
58
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
59
|
+
});
|
60
|
+
|
61
|
+
it('When the user attempts the question incorrectly and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
|
62
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
|
63
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
64
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
65
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
66
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
67
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
68
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
69
|
+
cy.log('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
70
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
71
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
72
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
73
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
74
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
75
|
+
});
|
76
|
+
|
77
|
+
it('When the user attempts the question partially correct with incorrect responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
|
78
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
79
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 1 }, { row: 4, column: 0 }]);
|
80
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
81
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
82
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
83
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
84
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
85
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
86
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
87
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
88
|
+
cy.log('When the user attempts the question partially correct with incorrect responses and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
89
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
90
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
91
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
92
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
93
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
94
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
95
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
96
|
+
});
|
97
|
+
|
98
|
+
it('When the user attempts the question partially correct with incomplete responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
|
99
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
100
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }]);
|
101
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
102
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
103
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
104
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
105
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
106
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
107
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
108
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
109
|
+
cy.log('When the user attempts the question partially correct with incomplete responses and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
110
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
111
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
112
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
113
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
114
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
115
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
116
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
117
|
+
});
|
118
|
+
|
119
|
+
it('When user attempts the question correctly and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
120
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
121
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
122
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
123
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
124
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
125
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
126
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
127
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
128
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
129
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
130
|
+
cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
131
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
132
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
133
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
134
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
135
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
136
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
137
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
138
|
+
});
|
139
|
+
});
|
140
|
+
});
|