itemengine-cypress-automation 1.0.249-repoUpdated26thSept-7283964.0 → 1.0.250-30SeptUpdates-a6d872b.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/AudioResponseNew/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -3
- package/cypress/e2e/ILC/AudioResponseNew/headerSection.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +1 -1
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -2
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +1 -2
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +2 -3
- package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/chartFunctionalitySpecifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/ChartsBar/gradingViewAndCorrectAnswerView.smoke.js +3 -4
- package/cypress/e2e/ILC/ChartsBar/headerSection.js +2 -2
- package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/selectChartTypeSection.js +8 -8
- package/cypress/e2e/ILC/ChartsBar/studentViewSettings.js +0 -1
- package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsLine/chartFunctionalitySpecifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +2 -3
- package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Compass/compassPreviewContent.smoke.js +1 -1
- package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/previewContentsForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +3 -5
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -6
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePageHeaderSection.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +2 -4
- package/cypress/e2e/ILC/EssayResponse/additionalSettings.js +4 -4
- package/cypress/e2e/ILC/EssayResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -3
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAlternateAnswerPopup.js +162 -0
- package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +15 -2
- package/cypress/e2e/ILC/MatchingDropdown/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +9 -9
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +6 -6
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/customSettings.js +1373 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +4 -4
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingAlternatePointsMoreThanCorrectPoints.js +161 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingCorrectPointsEqualToAlternatePoints.js +162 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingCorrectPointsMoreThanAlternatePoints.js +161 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsBasic.js +420 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsBasic.js +130 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +195 -0
- package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingAlternatePointsMoreThanCorrectPoints.js +161 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingCorrectPointsEqualToAlternatePoints.js +162 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingCorrectPointsMoreThanAlternatePoints.js +161 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsBasic.js +420 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +242 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsBasic.js +130 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +225 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
- package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +225 -0
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +2 -3
- package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +2 -2
- package/cypress/e2e/ILC/chartsDotsPlot/specifyCorrectAnswerSection.js +2 -2
- package/cypress/pages/audioResponsePage.js +0 -10
- package/cypress/pages/chartsBarPage.js +0 -13
- package/cypress/pages/chartsDotPlotPage.js +4 -85
- package/cypress/pages/chartsLinePage.js +2 -2
- package/cypress/pages/components/allowTeachersToDownloadStudentResponseComponent.js +1 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +11 -30
- package/cypress/pages/components/barAndLineChartComponent.js +0 -10
- package/cypress/pages/components/chartsCommonComponent.js +1 -25
- package/cypress/pages/components/colorPopupComponent.js +0 -31
- package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +0 -1
- package/cypress/pages/components/createQuestionBasePage.js +2 -8
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +1 -1
- package/cypress/pages/components/draggableOptionContainer.js +1 -1
- package/cypress/pages/components/equationEditorFlyout.js +0 -36
- package/cypress/pages/components/essayResponseCommonComponents.js +2 -2
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +2 -15
- package/cypress/pages/components/gridQuestionCommonComponent.js +26 -34
- package/cypress/pages/components/imageCanvasComponent.js +5 -5
- package/cypress/pages/components/index.js +0 -1
- package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +0 -12
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -1
- package/cypress/pages/components/optionsWrapperComponent.js +3 -3
- package/cypress/pages/components/scoringSectionBaseEditTab.js +2 -2
- package/cypress/pages/contentBlocksPage.js +1 -1
- package/cypress/pages/createItemPage.js +7 -6
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -41
- package/cypress/pages/essayResponsePage.js +0 -1
- package/cypress/pages/feedbackScalePage.js +0 -1
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
- package/cypress/pages/fillInTheGapsDropdownPage.js +79 -0
- package/cypress/pages/graphingPage.js +0 -1
- package/cypress/pages/gridFillPage.js +45 -112
- package/cypress/pages/imageHighlightPage.js +0 -10
- package/cypress/pages/itemPreviewSettingsPage.js +1 -4
- package/cypress/pages/listOrderingPage.js +0 -10
- package/cypress/pages/matchingPage.js +5 -142
- package/cypress/pages/multipleSelectionPage.js +0 -13
- package/cypress/pages/numberLineLabelPage.js +1 -1
- package/cypress/pages/numberLinePage.js +1 -1
- package/cypress/pages/protractorPage.js +1 -3
- package/cypress/pages/shortTextResponsePage.js +1 -3
- package/cypress/pages/simpleCalculatorPage.js +2 -2
- package/cypress/pages/singleSelectionPage.js +0 -10
- package/cypress/pages/textEntryMathPage.js +1 -8
- package/cypress/pages/textEntryMathWithImagePage.js +16 -38
- package/cypress/pages/textSelectionPage.js +34 -43
- package/cypress/pages/videoResponsePage.js +0 -5
- package/package.json +1 -1
- package/cypress/pages/components/customizeHighlightPropertiesComponent.js +0 -318
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/basicScoringForAllTextSelectionTypes.smoke.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/manuallyAndNonScored.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/singleSelectionPreviewScoring.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsBasic.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsBasic.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
- /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
@@ -327,6 +327,8 @@ const steps = {
|
|
327
327
|
.should('have.class', 'cell-content-subeading');
|
328
328
|
break;
|
329
329
|
case 'Text':
|
330
|
+
case 'No radio button':
|
331
|
+
case 'No checkbox':
|
330
332
|
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
|
331
333
|
.should('have.class', 'cell-content-text');
|
332
334
|
break;
|
@@ -340,11 +342,6 @@ const steps = {
|
|
340
342
|
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
|
341
343
|
.should('have.class', 'cell-content-radio-text');
|
342
344
|
break;
|
343
|
-
case 'No radio button':
|
344
|
-
case 'No checkbox':
|
345
|
-
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
|
346
|
-
.should('have.class', 'cell-content-text');
|
347
|
-
break;
|
348
345
|
default:
|
349
346
|
throw new Error('Invalid list option');
|
350
347
|
};
|
@@ -378,6 +375,8 @@ const steps = {
|
|
378
375
|
.should('have.class', 'cell-content-subeading');
|
379
376
|
break;
|
380
377
|
case 'Text':
|
378
|
+
case 'No radio button':
|
379
|
+
case 'No checkbox':
|
381
380
|
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
|
382
381
|
.should('have.class', 'cell-content-text');
|
383
382
|
break;
|
@@ -391,11 +390,6 @@ const steps = {
|
|
391
390
|
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
|
392
391
|
.should('have.class', 'cell-content-radio-text');
|
393
392
|
break;
|
394
|
-
case 'No radio button':
|
395
|
-
case 'No checkbox':
|
396
|
-
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
|
397
|
-
.should('have.class', 'cell-content-text');
|
398
|
-
break;
|
399
393
|
default:
|
400
394
|
throw new Error('Invalid list option');
|
401
395
|
};
|
@@ -485,7 +479,7 @@ const steps = {
|
|
485
479
|
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
|
486
480
|
.find('[role="math"]')
|
487
481
|
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
488
|
-
|
482
|
+
// .contains(constants.CKEditorInputFieldEnteredEquationText); ;
|
489
483
|
});
|
490
484
|
});
|
491
485
|
},
|
@@ -651,9 +645,10 @@ const steps = {
|
|
651
645
|
'background-color': css.color.correctAnswerLabelBg,
|
652
646
|
'border': `1px solid ${css.color.correctAnswer}`
|
653
647
|
});
|
654
|
-
utilities.getNthElement(gridQuestionCommonComponent.optionsButton(), column)
|
655
|
-
|
656
|
-
|
648
|
+
utilities.getNthElement(gridQuestionCommonComponent.optionsButton(), column)
|
649
|
+
.within(() => {
|
650
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
651
|
+
});
|
657
652
|
});
|
658
653
|
})
|
659
654
|
});
|
@@ -918,6 +913,8 @@ const steps = {
|
|
918
913
|
.should('have.class', 'cell-content-subeading');
|
919
914
|
break;
|
920
915
|
case 'Text':
|
916
|
+
case 'No radio button':
|
917
|
+
case 'No checkbox':
|
921
918
|
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
|
922
919
|
.should('have.class', 'cell-content-text');
|
923
920
|
break;
|
@@ -937,11 +934,6 @@ const steps = {
|
|
937
934
|
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
|
938
935
|
.should('have.class', 'cell-content-radio-text');
|
939
936
|
break;
|
940
|
-
case 'No radio button':
|
941
|
-
case 'No checkbox':
|
942
|
-
utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
|
943
|
-
.should('have.class', 'cell-content-text');
|
944
|
-
break;
|
945
937
|
default:
|
946
938
|
throw new Error('Invalid cell property');
|
947
939
|
}
|
@@ -2044,7 +2036,7 @@ const tests = {
|
|
2044
2036
|
gridQuestionCommonComponent.steps.setAnswerInSpecifyCorrectAnswerSection({ row: 1, column: 0 });
|
2045
2037
|
});
|
2046
2038
|
|
2047
|
-
it(`When the user has unchecked all the options in the ${accordionName} accordion,
|
2039
|
+
it(`When the user has unchecked all the options in the ${accordionName} accordion, 'Error: Please set a correct answer.' error message should be thrown along with an error icon on the '${accordionName}' accordion`, () => {
|
2048
2040
|
gridQuestionCommonComponent.steps.uncheckOptionInSpecifyCorrectAnswerSection({ row: 1, column: 0 });
|
2049
2041
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible')
|
2050
2042
|
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
|
@@ -2070,7 +2062,7 @@ const tests = {
|
|
2070
2062
|
|
2071
2063
|
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
2072
2064
|
|
2073
|
-
it(`CSS of
|
2065
|
+
it(`CSS of '${accordionName}' accordion contents`, { tags: 'css' }, () => {
|
2074
2066
|
gridQuestionCommonComponent.gridSpecifyCorrectAnswerSection()
|
2075
2067
|
.within(() => {
|
2076
2068
|
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell().parent(), 1), {
|
@@ -2176,7 +2168,7 @@ const tests = {
|
|
2176
2168
|
|
2177
2169
|
verifyDefaultTextLabelAndDropdown: () => {
|
2178
2170
|
const defaultTextDropdown = ['True / false', 'Yes / no', 'Agree / disagree', 'Custom'];
|
2179
|
-
it(
|
2171
|
+
it(`'Default text' label and dropdown should be displayed and in 'Default text' dropdown '${defaultTextDropdown[0]}' option should be selected by default`, () => {
|
2180
2172
|
utilities.verifyInnerText(gridQuestionCommonComponent.defaultTextLabel(), 'Default text');
|
2181
2173
|
utilities.verifyInnerText(gridQuestionCommonComponent.defaultTextDropdown(), defaultTextDropdown[0]);
|
2182
2174
|
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.defaultTextDropdown(), 'visible');
|
@@ -2448,7 +2440,7 @@ const tests = {
|
|
2448
2440
|
utilities.verifyInnerText(gridQuestionCommonComponent.optionAlignmentInCellLabel(), 'Option alignment in cell');
|
2449
2441
|
});
|
2450
2442
|
|
2451
|
-
it(`${optionAlignmentOptions} toggle options should be displayed and by default
|
2443
|
+
it(`${optionAlignmentOptions} toggle options should be displayed and by default 'Center' should be selected`, () => {
|
2452
2444
|
optionAlignmentOptions.forEach((option) => {
|
2453
2445
|
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.optionAlignmentInCellButton(option), 'visible');
|
2454
2446
|
});
|
@@ -2465,7 +2457,7 @@ const tests = {
|
|
2465
2457
|
},
|
2466
2458
|
|
2467
2459
|
verifyOptionAlignmentInCellFunctionalityPreviewTab: () => {
|
2468
|
-
it(`By default options should be
|
2460
|
+
it(`By default options should be 'Center' aligned`, () => {
|
2469
2461
|
gridQuestionCommonComponent.steps.verifyOptionAlignmentInCellPreviewTab('center');
|
2470
2462
|
});
|
2471
2463
|
|
@@ -2536,7 +2528,7 @@ const tests = {
|
|
2536
2528
|
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.rowSpacingDropdown(), 'visible');
|
2537
2529
|
});
|
2538
2530
|
|
2539
|
-
it(`When user expands
|
2531
|
+
it(`When user expands 'Row spacing' then ${rowColumnOptions} should be displayed then 'No spacing' option is selected`, () => {
|
2540
2532
|
gridQuestionCommonComponent.steps.expandRowSpacingDropdown();
|
2541
2533
|
rowColumnOptions.forEach((option, index) => {
|
2542
2534
|
utilities.verifyInnerText(utilities.getNthElement(gridQuestionCommonComponent.rowSpacingDropdownOptions(), index), option);
|
@@ -2547,7 +2539,7 @@ const tests = {
|
|
2547
2539
|
});
|
2548
2540
|
|
2549
2541
|
rowColumnOptions.forEach((option) => {
|
2550
|
-
it(`When user selects
|
2542
|
+
it(`When user selects 'Row spacing' ${option} option then ${option} spacing should be displayed between the row options`, () => {
|
2551
2543
|
gridQuestionCommonComponent.steps.expandRowSpacingDropdown();
|
2552
2544
|
gridQuestionCommonComponent.steps.selectRowSpacingDropdownOption(option);
|
2553
2545
|
gridQuestionCommonComponent.steps.verifyTableRowSpacingSpecifyCorrectAnswerSection(option);
|
@@ -2560,7 +2552,7 @@ const tests = {
|
|
2560
2552
|
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.columnSpacingDropdown(), 'visible');
|
2561
2553
|
});
|
2562
2554
|
|
2563
|
-
it(`When user expands
|
2555
|
+
it(`When user expands 'Column spacing' then ${rowColumnOptions} should be displayed then 'No spacing' option is selected`, () => {
|
2564
2556
|
gridQuestionCommonComponent.steps.expandColumnSpacingDropdown();
|
2565
2557
|
rowColumnOptions.forEach((option, index) => {
|
2566
2558
|
utilities.verifyInnerText(utilities.getNthElement(gridQuestionCommonComponent.columnSpacingDropdownOptions(), index), option);
|
@@ -2571,7 +2563,7 @@ const tests = {
|
|
2571
2563
|
});
|
2572
2564
|
|
2573
2565
|
rowColumnOptions.forEach((option) => {
|
2574
|
-
it(`When user selects
|
2566
|
+
it(`When user selects 'Column spacing' ${option} option then ${option} spacing should be displayed between the columns`, () => {
|
2575
2567
|
gridQuestionCommonComponent.steps.expandColumnSpacingDropdown();
|
2576
2568
|
gridQuestionCommonComponent.steps.selectColumnSpacingDropdownOption(option);
|
2577
2569
|
gridQuestionCommonComponent.steps.verifyTableColumnSpacingSpecifyCorrectAnswerSection(option);
|
@@ -2581,7 +2573,7 @@ const tests = {
|
|
2581
2573
|
|
2582
2574
|
verifyRowAndColumnSpacingFunctionalityPreviewTab: () => {
|
2583
2575
|
rowColumnOptions.forEach((option) => {
|
2584
|
-
it(`When user selects
|
2576
|
+
it(`When user selects 'Row spacing' ${option} option then ${option} spacing should be displayed between the row options`, () => {
|
2585
2577
|
gridQuestionCommonComponent.steps.expandRowSpacingDropdown();
|
2586
2578
|
gridQuestionCommonComponent.steps.selectRowSpacingDropdownOption(option);
|
2587
2579
|
createQuestionBasePage.steps.switchToPreviewTab();
|
@@ -2591,7 +2583,7 @@ const tests = {
|
|
2591
2583
|
});
|
2592
2584
|
|
2593
2585
|
rowColumnOptions.forEach((option) => {
|
2594
|
-
it(`When user selects
|
2586
|
+
it(`When user selects 'Column spacing' ${option} option then ${option} spacing should be displayed between the columns`, () => {
|
2595
2587
|
gridQuestionCommonComponent.steps.expandColumnSpacingDropdown();
|
2596
2588
|
gridQuestionCommonComponent.steps.selectColumnSpacingDropdownOption(option);
|
2597
2589
|
createQuestionBasePage.steps.switchToPreviewTab();
|
@@ -2646,7 +2638,7 @@ const tests = {
|
|
2646
2638
|
utilities.verifyInnerText(gridQuestionCommonComponent.columnDimensionsDropdown(), 'Auto');
|
2647
2639
|
});
|
2648
2640
|
|
2649
|
-
it(`When user expands
|
2641
|
+
it(`When user expands 'Column dimensions' then ${columnDimensions} should be displayed then 'Auto' option is selected`, () => {
|
2650
2642
|
gridQuestionCommonComponent.steps.expandColumnDimensionsDropdown();
|
2651
2643
|
columnDimensions.forEach((option, index) => {
|
2652
2644
|
utilities.verifyInnerText(utilities.getNthElement(gridQuestionCommonComponent.columnDimensionsDropdownOptions(), index), option);
|
@@ -2657,7 +2649,7 @@ const tests = {
|
|
2657
2649
|
});
|
2658
2650
|
|
2659
2651
|
columnDimensions.forEach((option) => {
|
2660
|
-
it(`When user selects
|
2652
|
+
it(`When user selects 'Column dimensions' ${option} option then ${option} spacing should be displayed between the columns`, () => {
|
2661
2653
|
gridQuestionCommonComponent.steps.expandColumnDimensionsDropdown();
|
2662
2654
|
gridQuestionCommonComponent.steps.selectColumnDimensionsDropdownOption(option);
|
2663
2655
|
gridQuestionCommonComponent.steps.verifyColumnDimensionsSpecifyCorrectAnswer(option);
|
@@ -2745,7 +2737,7 @@ const tests = {
|
|
2745
2737
|
|
2746
2738
|
verifyColumnDimensionsFunctionalityPreviewTab: () => {
|
2747
2739
|
columnDimensions.forEach((option) => {
|
2748
|
-
it(`When user selects
|
2740
|
+
it(`When user selects 'Column dimensions' ${option} option then ${option} spacing should be displayed between the columns`, () => {
|
2749
2741
|
gridQuestionCommonComponent.steps.expandColumnDimensionsDropdown();
|
2750
2742
|
gridQuestionCommonComponent.steps.selectColumnDimensionsDropdownOption(option);
|
2751
2743
|
createQuestionBasePage.steps.switchToPreviewTab();
|
@@ -3003,7 +2995,7 @@ const tests = {
|
|
3003
2995
|
},
|
3004
2996
|
|
3005
2997
|
verifyInnerBorderContentAndFunctionalityEditTab: () => {
|
3006
|
-
it(
|
2998
|
+
it(`'Inner border' label should be displayed along with 4 options - ${innerBorder}`, () => {
|
3007
2999
|
utilities.verifyInnerText(gridQuestionCommonComponent.innerBorderLabel(), 'Inner border');
|
3008
3000
|
innerBorder.forEach((option) => {
|
3009
3001
|
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.innerBorderOptions(option.toLowerCase()), 'exist');
|
@@ -848,8 +848,8 @@ const tests = {
|
|
848
848
|
imageCanvasComponent.steps.verifyRedoButtonDisabled();
|
849
849
|
});
|
850
850
|
|
851
|
-
it(`When the user reaches the initial state by performing undo actions, the
|
852
|
-
for (
|
851
|
+
it(`When the user reaches the initial state by performing undo actions, the 'Undo' button should get disabled and error message should not be displayed`, () => {
|
852
|
+
for (let i = 0; i < 4; i++) {
|
853
853
|
imageCanvasComponent.steps.undoAction();
|
854
854
|
}
|
855
855
|
utilities.verifyElementCount(imageCanvasComponent.responseArea(), 0);
|
@@ -858,7 +858,7 @@ const tests = {
|
|
858
858
|
});
|
859
859
|
|
860
860
|
it('When the user reaches the latest state by performing redo actions, the \'Redo\' button should get disabled and error message should disappear', () => {
|
861
|
-
for (
|
861
|
+
for (let i = 0; i < 4; i++) {
|
862
862
|
imageCanvasComponent.steps.redoAction();
|
863
863
|
}
|
864
864
|
utilities.verifyElementCount(imageCanvasComponent.responseArea(), 4);
|
@@ -866,7 +866,7 @@ const tests = {
|
|
866
866
|
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
867
867
|
});
|
868
868
|
|
869
|
-
it(`When user clicks on
|
869
|
+
it(`When user clicks on 'Clear all' button, then all response container should be deleted and error message should not be displayed`, () => {
|
870
870
|
imageCanvasComponent.steps.clearAllCanvas();
|
871
871
|
utilities.verifyElementVisibilityState(imageCanvasComponent.responseAreaWrapper(), 'notExist');
|
872
872
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
@@ -1017,7 +1017,7 @@ const tests = {
|
|
1017
1017
|
utilities.verifyElementVisibilityState(imageCanvasComponent.imageAlignmentLabel(), 'visible');
|
1018
1018
|
});
|
1019
1019
|
|
1020
|
-
it(
|
1020
|
+
it(`'Image alignment' section should have three options ${alignmentOptions} and ${alignmentOptions[0]} should be active selection by default`, () => {
|
1021
1021
|
utilities.verifyInnerText(imageCanvasComponent.topLeftAlignmentButton(), 'Top left');
|
1022
1022
|
utilities.verifyElementVisibilityState(imageCanvasComponent.topLeftAlignmentButton(), 'visible');
|
1023
1023
|
utilities.verifyInnerText(imageCanvasComponent.centerAlignmentButton(), 'Center');
|
@@ -15,7 +15,6 @@ export * from './fillInTheGapsTextCommonComponent'
|
|
15
15
|
export * from './fillInTheGapsDropdownCommonComponent';
|
16
16
|
export * from './uploadImageSectionComponent';
|
17
17
|
export * from './colorPopupComponent';
|
18
|
-
export * from './customizeHighlightPropertiesComponent';
|
19
18
|
export * from './browseItemsPage';
|
20
19
|
export * from './autoScoredSpecifyCorrectAnswerSection';
|
21
20
|
export * from './scoringSectionBaseEditTab';
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities"
|
2
2
|
import { colorPopupComponent } from "./colorPopupComponent";
|
3
|
-
import { commonComponents } from "./commonComponents";
|
4
3
|
import { createQuestionBasePage } from "./createQuestionBasePage";
|
5
4
|
const css = Cypress.env('css');
|
6
5
|
|
@@ -38,17 +37,6 @@ const selectors = {
|
|
38
37
|
}
|
39
38
|
|
40
39
|
const steps = {
|
41
|
-
/**
|
42
|
-
* Verifies the color of a color block.
|
43
|
-
* @param {number} blockIndex - The index of the color block.
|
44
|
-
* @param {string} color - The expected background color of the color block.
|
45
|
-
*/
|
46
|
-
verifyColorBlockColor: (blockIndex, color) => {
|
47
|
-
utilities.verifyCSS(utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.colorBlock(), blockIndex), {
|
48
|
-
'background-color': color
|
49
|
-
});
|
50
|
-
},
|
51
|
-
|
52
40
|
/**
|
53
41
|
* @param {number} blockIndex index of the color block in the style and layout customization section
|
54
42
|
* @description this function verifies the selected state of a block
|
@@ -78,7 +78,7 @@ const steps = {
|
|
78
78
|
.eq(index)
|
79
79
|
.within(() => {
|
80
80
|
commonComponents.errorMessage()
|
81
|
-
.should('
|
81
|
+
.should('not.exist');
|
82
82
|
});
|
83
83
|
},
|
84
84
|
|
@@ -295,7 +295,7 @@ const tests = {
|
|
295
295
|
* @param {number} optionFieldsCount - The expected number of option input fields.
|
296
296
|
*/
|
297
297
|
verifyOptionsSectionContents: ({ optionFieldsCount, optionLabel }) => {
|
298
|
-
it(
|
298
|
+
it(`'${optionLabel}' label should be displayed`, () => {
|
299
299
|
utilities.verifyInnerText(optionsWrapperComponent.optionsLabel(), optionLabel);
|
300
300
|
});
|
301
301
|
|
@@ -345,7 +345,7 @@ const tests = {
|
|
345
345
|
.eq(inputFieldIndex)
|
346
346
|
.click()
|
347
347
|
.blur();
|
348
|
-
utilities.
|
348
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
349
349
|
});
|
350
350
|
|
351
351
|
it('User should be able to enter text in options input field and \'Error: Option is required.\' error message should disappear', () => {
|
@@ -362,13 +362,13 @@ const tests = {
|
|
362
362
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
363
363
|
});
|
364
364
|
|
365
|
-
it('If the user enters points more than the allocated points in Minimum points input field, an error message \'Error: Minimum score cannot be greater than allocated points.: *points in points field*\' should be displayed', () => {
|
365
|
+
it('If the user enters points more than the allocated points in Minimum points input field, an error message \'Error: Minimum score cannot be greater than allocated points.: *points in points field*\' should not be displayed', () => {
|
366
366
|
scoringSectionBaseEditTab.steps.allotMinimumPoints(20);
|
367
367
|
scoringSectionBaseEditTab.minimumPointsInputField()
|
368
368
|
.focus();
|
369
369
|
scoringSectionBaseEditTab.minimumPointsInputField()
|
370
370
|
.blur();
|
371
|
-
utilities.
|
371
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
372
372
|
});
|
373
373
|
|
374
374
|
it('The error message should disappear once the user removes the entered points from the Minimum score awarded (if attempted) input field', () => {
|
@@ -438,7 +438,7 @@ const steps = {
|
|
438
438
|
* @param {string} label - The label expected on the tab list buttons.
|
439
439
|
*/
|
440
440
|
verifyTabListButtonLabel: (index, label) => {
|
441
|
-
for (
|
441
|
+
for (let i = 0; i < index; i++) {
|
442
442
|
|
443
443
|
contentBlocksPage.tabListButton()
|
444
444
|
.eq(i)
|
@@ -118,19 +118,20 @@ const steps = {
|
|
118
118
|
},
|
119
119
|
|
120
120
|
/**
|
121
|
-
|
122
|
-
|
123
|
-
|
121
|
+
* @param {string[]} arrayOfTags of text that need to enter in tags input field
|
122
|
+
* @description set tags for an item
|
123
|
+
*/
|
124
124
|
setTags: (arrayOfTags) => {
|
125
|
-
steps.clickOnTagsButton()
|
126
|
-
for (
|
125
|
+
steps.clickOnTagsButton();
|
126
|
+
for (const tag of arrayOfTags) {
|
127
127
|
createItemPage.tagsInputField()
|
128
|
-
.type(`${
|
128
|
+
.type(`${tag}{enter}`);
|
129
129
|
}
|
130
130
|
createItemPage.applyChangesButton()
|
131
131
|
.click();
|
132
132
|
},
|
133
133
|
|
134
|
+
|
134
135
|
/**
|
135
136
|
* @param {string[]} value of text that need to enter in title input field
|
136
137
|
* @description this function enters text in title input field
|
@@ -41,7 +41,6 @@ const selectors = {
|
|
41
41
|
correctAnswerOption: () => cy.get('[class*="Matrixstyles__AnswerWrapper"]'),
|
42
42
|
//Note: Items render twice in student view, need to remove .first()
|
43
43
|
categoryGridPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="Matrixstyles__TableWrapper"]').first(),
|
44
|
-
optionsWrapper: () => cy.get('[class*="CellDropZonestyles__DraggableItemWrapper"]'),
|
45
44
|
correctIncorrectAnswerBlock: () => cy.get('[class*="correct-answer-block"]'),
|
46
45
|
correctIncorrectStatusMessageText: () => cy.get('[class*="Matrixstyles__AnswerStatusText"]'),
|
47
46
|
correctIncorrectAnswerLabel: () => cy.get('[class*="Matrixstyles__CorrectIncorrectLabel"]'),
|
@@ -782,20 +781,6 @@ const steps = {
|
|
782
781
|
});
|
783
782
|
},
|
784
783
|
|
785
|
-
/**
|
786
|
-
* @param {number} categoryIndex optionIndex of the category cell in set correct answer section
|
787
|
-
* @param {string[]} responseArray array of options set as correct responses in a category cell
|
788
|
-
*/
|
789
|
-
verifyDraggableOptionInDropzoneOfPreviewTab: (dropzoneIndex, responseArray) => {
|
790
|
-
dragAndDropIntoCategoriesPage.dropzoneCellPreviewTab()
|
791
|
-
.eq(dropzoneIndex)
|
792
|
-
.within(() => {
|
793
|
-
responseArray.forEach((response, count) => {
|
794
|
-
utilities.verifyTextContent(utilities.getNthElement(dragAndDropIntoCategoriesPage.draggableOption(), count), response);
|
795
|
-
});
|
796
|
-
});
|
797
|
-
},
|
798
|
-
|
799
784
|
/**
|
800
785
|
* @description Verifies that the equation text in the Preview tab is correct.
|
801
786
|
* @param {number} optionIndex - The index of the option in the Preview tab.
|
@@ -844,19 +829,6 @@ const steps = {
|
|
844
829
|
});
|
845
830
|
},
|
846
831
|
|
847
|
-
/**
|
848
|
-
* @description Verify the text in subheading cell input field
|
849
|
-
* @param {number} cellIndex Index of cell in specify columns and rows table
|
850
|
-
* @param {string} text Text to be verified
|
851
|
-
*/
|
852
|
-
verifySubheadingCellTypeInputFieldText: (cellIndex, text) => {
|
853
|
-
dragAndDropIntoCategoriesPage.tableCellContainer()
|
854
|
-
.eq(cellIndex)
|
855
|
-
.within(() => {
|
856
|
-
utilities.verifyTextContent(dragAndDropIntoCategoriesPage.cellSubheadingTextArea(), `${text}`);
|
857
|
-
});
|
858
|
-
},
|
859
|
-
|
860
832
|
/**
|
861
833
|
* @param {number} categoryIndex optionIndex of the category cell in set correct answer section
|
862
834
|
* @param {string[]} responseArray array of options set as correct responses in a category cell
|
@@ -871,19 +843,6 @@ const steps = {
|
|
871
843
|
});
|
872
844
|
},
|
873
845
|
|
874
|
-
/**
|
875
|
-
* @description Verify the text in text type cell input field
|
876
|
-
* @param {number} cellIndex Index of cell in specify columns and rows table
|
877
|
-
* @param {string} text Text to be verified
|
878
|
-
*/
|
879
|
-
verifyTextCellTypeInputFieldText: (cellIndex, text) => {
|
880
|
-
dragAndDropIntoCategoriesPage.tableCellContainer()
|
881
|
-
.eq(cellIndex)
|
882
|
-
.within(() => {
|
883
|
-
utilities.verifyTextContent(dragAndDropIntoCategoriesPage.cellTextTextArea(), `${text}`);
|
884
|
-
});
|
885
|
-
},
|
886
|
-
|
887
846
|
/**
|
888
847
|
* Verify the text content of a table cell in the preview tab.
|
889
848
|
* @param { number } cellIndex - The index of the table cell to verify.
|
@@ -1225,7 +1225,6 @@ const tests = {
|
|
1225
1225
|
});
|
1226
1226
|
equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField(categoryName);
|
1227
1227
|
//Uncomment once https://redmine.zeuslearning.com/issues/525213 is resolved
|
1228
|
-
|
1229
1228
|
// if (categoryName === 'setNotation') {
|
1230
1229
|
// essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount('∈∉∋∌⊂⊃⊆⊇⊄⊅∅∪∩!,:\\/≺≻≼≽({[(])})', wordCount);
|
1231
1230
|
// } else if (categoryName === 'otherSymbols') {
|
@@ -65,7 +65,6 @@ const selectors = {
|
|
65
65
|
legendTextNumberBlock: () => cy.get('[class*="MoreInfostyles__NumberBox"]'),
|
66
66
|
legendTextStarIcon: () => cy.get('[class*="MoreInfostyles__StarWrapper"] svg'),
|
67
67
|
legendTextHeartIcon: () => cy.get('[class*="MoreInfostyles__StarWrapper"] svg'),
|
68
|
-
editColorButton: () => cy.get('.icon-pencil'),
|
69
68
|
thumbsUpFeedbackButton: () => cy.get('[role="button"][aria-label="Thumbs-Up"]'),
|
70
69
|
thumbsDownFeedbackButton: () => cy.get('[role="button"][aria-label="Thumbs-Down"]'),
|
71
70
|
thumbsUpButtonIcon: () => cy.get('[data-name="Thumbs up button"]'),
|
@@ -1014,7 +1014,7 @@ const tests = {
|
|
1014
1014
|
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0 });
|
1015
1015
|
});
|
1016
1016
|
|
1017
|
-
it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion,
|
1017
|
+
it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, 'Error: Please set a correct answer.' error message should be thrown along with an error icon on the '${accordionName}' accordion`, () => {
|
1018
1018
|
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
|
1019
1019
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist')
|
1020
1020
|
if (accordionName == 'Correct') {
|
@@ -31,6 +31,14 @@ const selectors = {
|
|
31
31
|
correctAnswerSectionWithoutEnumerationWrapper: () => cy.get('.cloze-with-text-correct-answer-wrapper .preview-question-text-wrapper'),
|
32
32
|
correctAnswersLabel: () => cy.get('.cloze-with-text-correct-answer-label'),
|
33
33
|
tooltipText: () => cy.get('[class*="MuiTooltip-tooltip"]'),
|
34
|
+
addAlternateButtonSpecifyCorrectAnswer: () => cy.get('.alternate-option-btn-wrapper .ngie-button'),
|
35
|
+
alternateAnswerPopup: () => cy.get('.alternate-option-popup-wrapper'),
|
36
|
+
alternateAnswerPopupTitle: () => cy.get('.alternate-option-title-wrapper div').eq(0),
|
37
|
+
alternateAnswerPopupHelpText: () => cy.get('.alternate-option-title-wrapper div').eq(1),
|
38
|
+
alternateAnswerPopupOptions: () => cy.get('.option-container'),
|
39
|
+
alternateAnswerPopupCancelButton: () => cy.get('[class*="AlternateOptionstyle__ButtonWrapper"] button').eq(0),
|
40
|
+
alternateAnswerPopupSaveButton: () => cy.get('[class*="AlternateOptionstyle__ButtonWrapper"] button').eq(1),
|
41
|
+
selectedAlternateAnswerCountSpecifyCorrectAnswer: () => cy.get('.selected-option-wrapper'),
|
34
42
|
}
|
35
43
|
|
36
44
|
const steps = {
|
@@ -232,6 +240,77 @@ const steps = {
|
|
232
240
|
.eq(index)
|
233
241
|
.trigger('mouseout');
|
234
242
|
},
|
243
|
+
|
244
|
+
saveSelectedAlternateAnswers: () => {
|
245
|
+
fillInTheGapsDropdownPage.alternateAnswerPopupSaveButton()
|
246
|
+
.click();
|
247
|
+
},
|
248
|
+
|
249
|
+
CancelDropdownAlternateAnswersPopup: () => {
|
250
|
+
fillInTheGapsDropdownPage.alternateAnswerPopupCancelButton()
|
251
|
+
.click();
|
252
|
+
},
|
253
|
+
|
254
|
+
/**
|
255
|
+
* @description Verify alternate button for a dropdown in specify correct answer section
|
256
|
+
* @param {number} dropdownIndex Index of dropdown
|
257
|
+
*/
|
258
|
+
verifyDefaultAddAlternateAnswerButtonIsDisplayed: (dropdownIndex) => {
|
259
|
+
const alternateButton = fillInTheGapsDropdownPage.addAlternateButtonSpecifyCorrectAnswer().eq(dropdownIndex);
|
260
|
+
utilities.verifyElementVisibilityState(alternateButton, 'visible');
|
261
|
+
utilities.verifyElementDisabled(alternateButton);
|
262
|
+
},
|
263
|
+
|
264
|
+
/**
|
265
|
+
* @description click on add alternate button for a dropdown in specify correct answer section
|
266
|
+
* @param {number} dropdownIndex Index of dropdown
|
267
|
+
*/
|
268
|
+
clickOnAddAlternateButton: (dropdownIndex) => {
|
269
|
+
utilities.getNthElement(fillInTheGapsDropdownPage.addAlternateButtonSpecifyCorrectAnswer(), dropdownIndex)
|
270
|
+
.click();
|
271
|
+
},
|
272
|
+
|
273
|
+
/**
|
274
|
+
* @description Verify dropdown's alternate answer popup options
|
275
|
+
* @param {string[]} optionsArray Array of options in dropdown's alternate answer popup
|
276
|
+
*/
|
277
|
+
verifyDropdownAlternateAnswerPopupOptions: (optionsArray) => {
|
278
|
+
optionsArray.forEach((option, index) => {
|
279
|
+
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsDropdownPage.alternateAnswerPopupOptions(), index), option);
|
280
|
+
});
|
281
|
+
},
|
282
|
+
|
283
|
+
/**
|
284
|
+
* @description select alternate answers for a dropdown in its alternate answer popup
|
285
|
+
* @param {string[]} alternateAnswerArray Array of options to be selected as alternate answer
|
286
|
+
*/
|
287
|
+
selectAlternateAnswerInAlternateAnswerPopup: (alternateAnswerArray) => {
|
288
|
+
alternateAnswerArray.forEach((alternateAnswer) => {
|
289
|
+
fillInTheGapsDropdownPage.alternateAnswerPopupOptions()
|
290
|
+
.contains(alternateAnswer)
|
291
|
+
.click();
|
292
|
+
fillInTheGapsDropdownPage.alternateAnswerPopupOptions()
|
293
|
+
.contains(alternateAnswer)
|
294
|
+
.parent()
|
295
|
+
.should('have.class', 'selected');
|
296
|
+
});
|
297
|
+
},
|
298
|
+
|
299
|
+
/**
|
300
|
+
* @description deselect alternate answers for a dropdown in its alternate answer popup
|
301
|
+
* @param {string[]} alternateAnswerArray Array of options to be deselected
|
302
|
+
*/
|
303
|
+
deselectAlternateAnswerInAlternateAnswerPopup: (alternateAnswerArray) => {
|
304
|
+
alternateAnswerArray.forEach((alternateAnswer) => {
|
305
|
+
fillInTheGapsDropdownPage.alternateAnswerPopupOptions()
|
306
|
+
.contains(alternateAnswer)
|
307
|
+
.click();
|
308
|
+
fillInTheGapsDropdownPage.alternateAnswerPopupOptions()
|
309
|
+
.contains(alternateAnswer)
|
310
|
+
.parent()
|
311
|
+
.should('not.have.class', 'selected');
|
312
|
+
});
|
313
|
+
},
|
235
314
|
}
|
236
315
|
|
237
316
|
const tests = {
|
@@ -231,7 +231,6 @@ const selectors = {
|
|
231
231
|
//Correct answer section
|
232
232
|
correctAnswerLabel: () => cy.get('[class*="AnswerLabel"]'),
|
233
233
|
graphCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg'),
|
234
|
-
graphSineWaveCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('path[stroke-linecap="butt"][stroke-opacity="1"]'),
|
235
234
|
graphCircleCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('ellipse[stroke-linecap="butt"]'),
|
236
235
|
graphLineCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('line[tabindex="null"]'),
|
237
236
|
graphPolygonCorrectAnswerSection: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox').eq(1).find('polygon'),
|