itemengine-cypress-automation 1.0.204-graphQLUpdate-b0c0036.0 → 1.0.204
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +22 -22
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneBasic.js +4 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneMinimumAndPenaltyScoring.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +8 -8
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +5 -1
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +19 -21
- package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +2 -4
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +14 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +6 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +4 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +3 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/conditionalCheckboxScoring.js +56 -56
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +6 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +8 -3
- package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +2 -2
- package/cypress/e2e/ILC/Matching/toolSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/additionalSettings.js +248 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +3 -0
- package/cypress/e2e/ILC/SingleSelection/additionalSettings.js +249 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +6 -6
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/chartsDotsPlot/dotTypeFunctionality.js +235 -0
- package/cypress/e2e/ILC/chartsDotsPlot/minimumScoringPenaltyPointsAndRoundingDropdown.js +5 -5
- package/cypress/e2e/ILC/chartsDotsPlot/numberLineAxisSettings.js +265 -0
- package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +6 -6
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/manualAndNonScoredScoring.js +3 -3
- package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +594 -0
- package/cypress/e2e/ILC/chartsDotsPlot/studentViewSettings.js +2 -3
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
- package/cypress/fixtures/fillColorDefaultProperties.js +2 -2
- package/cypress/pages/chartsDotPlotPage.js +588 -59
- package/cypress/pages/components/autoScoredScoringPreviewTab.js +1 -1
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/chartsCommonComponent.js +10 -1
- package/cypress/pages/components/customizeMathCharacterComponent.js +10 -5
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +2 -2
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +4 -3
- package/cypress/pages/components/gridQuestionCommonComponent.js +11 -11
- package/cypress/pages/components/imageCanvasComponent.js +2 -2
- package/cypress/pages/components/layoutSectionComponent.js +20 -18
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +164 -24
- package/cypress/pages/dialogBoxBase.js +1 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -5
- package/cypress/pages/drawingResponsePage.js +3 -3
- package/cypress/pages/feedbackScalePage.js +16 -9
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +6 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +2 -1
- package/cypress/pages/gridFillPage.js +17 -14
- package/cypress/pages/itemPreviewSettingsPage.js +1 -0
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +173 -1
- package/cypress/pages/singleSelectionPage.js +171 -1
- package/package.json +2 -2
@@ -553,7 +553,12 @@ const steps = {
|
|
553
553
|
verifyDropzoneExistInPreviewTab: () => {
|
554
554
|
fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
|
555
555
|
.should('be.visible');
|
556
|
-
}
|
556
|
+
},
|
557
|
+
|
558
|
+
verifyNoImageAlternativeTextPresentInPreviewTab: () => {
|
559
|
+
imageCanvasComponent.canvasImageInPreviewTab()
|
560
|
+
.should('have.attr', 'alt', 'highlightImage.jpg');
|
561
|
+
},
|
557
562
|
}
|
558
563
|
|
559
564
|
const tests = {
|
@@ -27,6 +27,7 @@ const selectors = {
|
|
27
27
|
correctAnswerResponse: () => cy.get('[class*="LabelImageWithDropdownPreviewstyles__AnswerWrapper"]'),
|
28
28
|
correctAnswerSectionWrapper: () => cy.get('.dnd-correct-answer-wrapper'),
|
29
29
|
correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="correct-answers-label"]'),
|
30
|
+
previewTabCanvas: () => cy.get('.drag-and-drop-canvas')
|
30
31
|
}
|
31
32
|
|
32
33
|
const steps = {
|
@@ -157,7 +158,7 @@ const steps = {
|
|
157
158
|
* @description this function verifies width of canvas
|
158
159
|
*/
|
159
160
|
verifyCanvasWidthInPreviewTab: (width) => {
|
160
|
-
fillInTheGapsOverImageDropdownPage.
|
161
|
+
fillInTheGapsOverImageDropdownPage.previewTabCanvas()
|
161
162
|
.should('have.attr', 'width', width);
|
162
163
|
},
|
163
164
|
|
@@ -82,11 +82,11 @@ const selectors = {
|
|
82
82
|
outlineCellOnHoverLabel: () => cy.get('[data-ngie-testid="outline-cell-on-hover-checkbox"] [class*="label"]'),
|
83
83
|
canvasTitleLabel: () => cy.get('.canvas-title-wrapper .text-label'),
|
84
84
|
canvasTitleInputField: () => cy.get('.canvas-title-wrapper input'),
|
85
|
-
gridBordersTitle: () => cy.get('.single-select-toggle-group-title').eq(
|
85
|
+
gridBordersTitle: () => cy.get('.single-select-toggle-group-title').eq(0),
|
86
86
|
fullGridToggleButton: () => cy.get('.single-select-toggle-group-double button').eq(0),
|
87
87
|
onlyBorderToggleButton: () => cy.get('.single-select-toggle-group-double button').eq(1),
|
88
88
|
noneToggleButton: () => cy.get('.single-select-toggle-group-double button').eq(2),
|
89
|
-
gridBorderStyleTitle: () => cy.get('.single-select-toggle-group-title').eq(
|
89
|
+
gridBorderStyleTitle: () => cy.get('.single-select-toggle-group-title').eq(1),
|
90
90
|
solidToggleButton: () => cy.get('.single-select-toggle-group-double button').eq(3),
|
91
91
|
dashedToggleButton: () => cy.get('.single-select-toggle-group-double button').eq(4),
|
92
92
|
dottedToggleButton: () => cy.get('.single-select-toggle-group-double button').eq(5),
|
@@ -164,7 +164,7 @@ const selectors = {
|
|
164
164
|
filledImageUploadedFileNameLabel: () => cy.get('[class*="styles__SelectedFileWithIcon"][class*="Upload"]').eq(0),
|
165
165
|
filledImageAltTextLabel: () => cy.get('[class*="UploadImagestyles__InputWrapper"] .text-label').eq(0),
|
166
166
|
filledImageAltTextInputField: () => cy.get('[class*="UploadImagestyles__InputWrapper"] input').eq(0),
|
167
|
-
filledImageDeleteImageButton: () => cy.get('[aria-label
|
167
|
+
filledImageDeleteImageButton: () => cy.get('[aria-label="Delete image-button"]').eq(0),
|
168
168
|
//Background image - Image properties
|
169
169
|
imagePropertiesLabel: () => cy.get('[class*="UploadImagestyles__SectionLabel"]'),
|
170
170
|
fillImageToGridCheckboxLabel: () => cy.get('[data-ngie-testid="fill-image-to-grid-checkbox"] .MuiFormControlLabel-label'),
|
@@ -397,7 +397,7 @@ const steps = {
|
|
397
397
|
.within(() => {
|
398
398
|
utilities.getNthElement(gridFillPage.cellInEditTab(), columnIndex)
|
399
399
|
.invoke('attr', 'aria-label')
|
400
|
-
.should('include', '
|
400
|
+
.should('include', 'Shade cell');
|
401
401
|
});
|
402
402
|
});
|
403
403
|
},
|
@@ -641,7 +641,7 @@ const steps = {
|
|
641
641
|
.within(() => {
|
642
642
|
utilities.getNthElement(gridFillPage.cellInEditTab(), columnIndex)
|
643
643
|
.invoke('attr', 'aria-label')
|
644
|
-
.should('include', '
|
644
|
+
.should('include', 'Hide cell');
|
645
645
|
});
|
646
646
|
},
|
647
647
|
|
@@ -2596,14 +2596,14 @@ const steps = {
|
|
2596
2596
|
const win = $element[0].ownerDocument.defaultView
|
2597
2597
|
const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
|
2598
2598
|
const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
|
2599
|
-
expect(CSSStyleDeclarationValue).to.deep.eq('url(
|
2599
|
+
expect(CSSStyleDeclarationValue).to.deep.eq('url("")');
|
2600
2600
|
});
|
2601
2601
|
gridFillPage.gridSpecifyCorrectAnswerSection()
|
2602
2602
|
.then(($element) => {
|
2603
2603
|
const win = $element[0].ownerDocument.defaultView
|
2604
2604
|
const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
|
2605
2605
|
const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
|
2606
|
-
expect(CSSStyleDeclarationValue).to.deep.eq('url(
|
2606
|
+
expect(CSSStyleDeclarationValue).to.deep.eq('url("")');
|
2607
2607
|
});
|
2608
2608
|
},
|
2609
2609
|
|
@@ -2613,24 +2613,25 @@ const steps = {
|
|
2613
2613
|
const win = $element[0].ownerDocument.defaultView
|
2614
2614
|
const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
|
2615
2615
|
const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
|
2616
|
-
expect(CSSStyleDeclarationValue).to.deep.eq('url(
|
2616
|
+
expect(CSSStyleDeclarationValue).to.deep.eq('url("")');
|
2617
2617
|
});
|
2618
2618
|
},
|
2619
2619
|
|
2620
2620
|
verifyBackgroundImageIsDisplayedInEditTabGrids: () => {
|
2621
|
+
utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadImageProgressBar(), 'notExist');
|
2621
2622
|
gridFillPage.gridCustomizeLayoutSection()
|
2622
2623
|
.then(($element) => {
|
2623
2624
|
const win = $element[0].ownerDocument.defaultView
|
2624
2625
|
const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
|
2625
2626
|
const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
|
2626
|
-
expect(CSSStyleDeclarationValue).to.include('url("https://itemengine-file-management.itemengine-
|
2627
|
+
expect(CSSStyleDeclarationValue).to.include('url("https://itemengine-file-management.itemengine-');
|
2627
2628
|
});
|
2628
2629
|
gridFillPage.gridSpecifyCorrectAnswerSection()
|
2629
2630
|
.then(($element) => {
|
2630
2631
|
const win = $element[0].ownerDocument.defaultView
|
2631
2632
|
const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
|
2632
2633
|
const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
|
2633
|
-
expect(CSSStyleDeclarationValue).to.include('url("https://itemengine-file-management.itemengine-
|
2634
|
+
expect(CSSStyleDeclarationValue).to.include('url("https://itemengine-file-management.itemengine-');
|
2634
2635
|
});
|
2635
2636
|
},
|
2636
2637
|
|
@@ -2640,7 +2641,7 @@ const steps = {
|
|
2640
2641
|
const win = $element[0].ownerDocument.defaultView
|
2641
2642
|
const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
|
2642
2643
|
const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
|
2643
|
-
expect(CSSStyleDeclarationValue).to.include('url("https://itemengine-file-management.itemengine-
|
2644
|
+
expect(CSSStyleDeclarationValue).to.include('url("https://itemengine-file-management.itemengine-');
|
2644
2645
|
});
|
2645
2646
|
},
|
2646
2647
|
|
@@ -2688,14 +2689,14 @@ const steps = {
|
|
2688
2689
|
const win = $element[0].ownerDocument.defaultView
|
2689
2690
|
const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
|
2690
2691
|
const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
|
2691
|
-
expect(CSSStyleDeclarationValue).to.deep.eq('
|
2692
|
+
expect(CSSStyleDeclarationValue).to.deep.eq('500px 500px');
|
2692
2693
|
});
|
2693
2694
|
gridFillPage.gridSpecifyCorrectAnswerSection()
|
2694
2695
|
.then(($element) => {
|
2695
2696
|
const win = $element[0].ownerDocument.defaultView
|
2696
2697
|
const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
|
2697
2698
|
const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
|
2698
|
-
expect(CSSStyleDeclarationValue).to.deep.eq('
|
2699
|
+
expect(CSSStyleDeclarationValue).to.deep.eq('500px 500px');
|
2699
2700
|
});
|
2700
2701
|
},
|
2701
2702
|
|
@@ -2705,7 +2706,7 @@ const steps = {
|
|
2705
2706
|
const win = $element[0].ownerDocument.defaultView
|
2706
2707
|
const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
|
2707
2708
|
const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
|
2708
|
-
expect(CSSStyleDeclarationValue).to.deep.eq('
|
2709
|
+
expect(CSSStyleDeclarationValue).to.deep.eq('500px 500px');
|
2709
2710
|
});
|
2710
2711
|
},
|
2711
2712
|
|
@@ -2831,6 +2832,8 @@ const steps = {
|
|
2831
2832
|
* @param {string} height height of image in px
|
2832
2833
|
*/
|
2833
2834
|
verifyGridBackgroundImageDimensionsInEditTab: (width, height) => {
|
2835
|
+
cy.log('Adding wait for image to load properly before the assertions');
|
2836
|
+
cy.wait(2000);
|
2834
2837
|
gridFillPage.gridCustomizeLayoutSection()
|
2835
2838
|
.then(($element) => {
|
2836
2839
|
const win = $element[0].ownerDocument.defaultView
|
@@ -75,7 +75,7 @@ const selectors = {
|
|
75
75
|
correctAnswersOptions: () => cy.get('.match-list-drag-and-drop .question-text-wrapper'),
|
76
76
|
correctAnswersWrapper: () => cy.get('.match-list-drag-and-drop'),
|
77
77
|
correctAnswersOptionContainer: () => cy.get('.draggable-selected-option'),
|
78
|
-
gradingViewOption: () => cy.get('
|
78
|
+
gradingViewOption: () => cy.get('.item-content-wrapper'),
|
79
79
|
questionBorderPreviewTab: () => cy.get('[class*="ClozeWithDragAndDropstyles__WrapperDiv"]'),
|
80
80
|
correctAnswerResponseWrapperWithoutEnumeration: () => cy.get('.answer-status-response-preview-wrapper .item-wrapper'),
|
81
81
|
correctAnswerTextWithoutEnumeration: () => cy.get('.answer-status-response-preview-wrapper .item-wrapper'),
|
@@ -54,7 +54,11 @@ const selectors = {
|
|
54
54
|
},
|
55
55
|
minMaxWarningMessage: () => cy.get('.disabled-wrapper-cls'),
|
56
56
|
correctIncorrectAnswerText: () => cy.get('[class*="AnswerTextWrapper"]'),
|
57
|
-
correctIncorrectAnswerTextWrapper: () => cy.get('[class*="StatusContainer"]')
|
57
|
+
correctIncorrectAnswerTextWrapper: () => cy.get('[class*="StatusContainer"]'),
|
58
|
+
noneOptionNumeration: () => cy.get('.no-numeration-div'),
|
59
|
+
optionsWrapper: () => cy.get('.edit-set-correct-answer-mcq-control'),
|
60
|
+
optionsWrapperPreviewTab: () => cy.get('.mcq-checkbox-control'),
|
61
|
+
mcqCheckbox: () => cy.get('.mcq-without-checkbox')
|
58
62
|
}
|
59
63
|
|
60
64
|
const steps = {
|
@@ -616,6 +620,173 @@ const steps = {
|
|
616
620
|
}
|
617
621
|
});
|
618
622
|
},
|
623
|
+
|
624
|
+
//Additional settings
|
625
|
+
verifyBlockWithCheckboxOptionExistSpecifyCorrectAnswer: () => {
|
626
|
+
multipleSelectionPage.mcqCheckbox()
|
627
|
+
.should('not.exist');
|
628
|
+
},
|
629
|
+
|
630
|
+
verifyBlockWithoutCheckboxOptionSpecifyCorrectAnswer: () => {
|
631
|
+
multipleSelectionPage.mcqCheckbox()
|
632
|
+
.should('exist');
|
633
|
+
|
634
|
+
},
|
635
|
+
|
636
|
+
verifyNoneNumerationSpecifyCorrectAnswer: () => {
|
637
|
+
multipleSelectionPage.noneOptionNumeration()
|
638
|
+
.should('exist')
|
639
|
+
},
|
640
|
+
|
641
|
+
verifyBlockWithCheckboxOptionExistPreviewTab: () => {
|
642
|
+
multipleSelectionPage.previewTabQuestionWrapper()
|
643
|
+
.within(() => {
|
644
|
+
multipleSelectionPage.mcqCheckbox()
|
645
|
+
.should('not.exist');
|
646
|
+
});
|
647
|
+
},
|
648
|
+
|
649
|
+
verifyBlockWithCheckboxOptionNotExistPreviewTab: () => {
|
650
|
+
multipleSelectionPage.previewTabQuestionWrapper()
|
651
|
+
.within(() => {
|
652
|
+
multipleSelectionPage.mcqCheckbox()
|
653
|
+
.should('exist');
|
654
|
+
})
|
655
|
+
},
|
656
|
+
|
657
|
+
/**
|
658
|
+
* Verifies the number of columns in the specify correct answer section.
|
659
|
+
* @param {number} numberOfOptions - The number of options columns to verify.
|
660
|
+
*/
|
661
|
+
verifyNumberOfOptionsColumnSpecifyCorrectAnswerSection: (numberOfOptions) => {
|
662
|
+
multipleSelectionPage.optionsWrapper()
|
663
|
+
.should('have.attr', 'columns', numberOfOptions);
|
664
|
+
},
|
665
|
+
|
666
|
+
/**
|
667
|
+
* Verifies the number of columns in the preview tab.
|
668
|
+
* @param {number} numberOfOptions - The number of options columns to verify.
|
669
|
+
*/
|
670
|
+
verifyNumberOfOptionsColumnPreviewTab: (numberOfOptions) => {
|
671
|
+
multipleSelectionPage.optionsWrapperPreviewTab()
|
672
|
+
.should('have.attr', 'columns', numberOfOptions);
|
673
|
+
},
|
674
|
+
|
675
|
+
/**
|
676
|
+
* Verifies the option direction in the specify correct answer section.
|
677
|
+
* @param {('row'|'column')} optionDirection - The option direction to verify ('row' or 'column').
|
678
|
+
*/
|
679
|
+
verifyOptionDirectionSpecifyCorrectOption: (optionDirection) => {
|
680
|
+
switch (optionDirection) {
|
681
|
+
case 'row':
|
682
|
+
multipleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
683
|
+
.eq(0)
|
684
|
+
.should('have.css', 'grid-column-start', '1')
|
685
|
+
.and('have.css', 'grid-row-start', '1');
|
686
|
+
multipleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
687
|
+
.eq(1)
|
688
|
+
.should('have.css', 'grid-column-start', '2')
|
689
|
+
.and('have.css', 'grid-row-start', '1');
|
690
|
+
break;
|
691
|
+
case 'column':
|
692
|
+
multipleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
693
|
+
.eq(0)
|
694
|
+
.should('have.css', 'grid-column-start', '1')
|
695
|
+
.and('have.css', 'grid-row-start', '1');
|
696
|
+
multipleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
697
|
+
.eq(1)
|
698
|
+
.should('have.css', 'grid-column-start', '1')
|
699
|
+
.and('have.css', 'grid-row-start', '2');
|
700
|
+
break;
|
701
|
+
}
|
702
|
+
},
|
703
|
+
|
704
|
+
/**
|
705
|
+
* Verifies the option direction in the preview tab.
|
706
|
+
* @param {('row'|'column')} optionDirection - The option direction to verify ('row' or 'column').
|
707
|
+
*/
|
708
|
+
verifyOptionDirectionPreviewTab: (optionDirection) => {
|
709
|
+
switch (optionDirection) {
|
710
|
+
case 'row':
|
711
|
+
multipleSelectionPage.optionWrapperPreviewTab()
|
712
|
+
.eq(0)
|
713
|
+
.should('have.css', 'grid-column-start', '1')
|
714
|
+
.and('have.css', 'grid-row-start', '1');
|
715
|
+
multipleSelectionPage.optionWrapperPreviewTab()
|
716
|
+
.eq(1)
|
717
|
+
.should('have.css', 'grid-column-start', '2')
|
718
|
+
.and('have.css', 'grid-row-start', '1');
|
719
|
+
break;
|
720
|
+
case 'column':
|
721
|
+
multipleSelectionPage.optionWrapperPreviewTab()
|
722
|
+
.eq(0)
|
723
|
+
.should('have.css', 'grid-column-start', '1')
|
724
|
+
.and('have.css', 'grid-row-start', '1');
|
725
|
+
multipleSelectionPage.optionWrapperPreviewTab()
|
726
|
+
.eq(1)
|
727
|
+
.should('have.css', 'grid-column-start', '1')
|
728
|
+
.and('have.css', 'grid-row-start', '2');
|
729
|
+
break;
|
730
|
+
}
|
731
|
+
},
|
732
|
+
|
733
|
+
/**
|
734
|
+
* Verifies the option alignment in the specify correct answer section.
|
735
|
+
* @param {('Left'|'Center'|'Right')} optionDirection - The option alignment to verify ('Left', 'Center', or 'Right').
|
736
|
+
*/
|
737
|
+
verifyOptionAlignmentSpecifyCorrectAnswer: (optionDirection) => {
|
738
|
+
switch (optionDirection) {
|
739
|
+
case 'Left':
|
740
|
+
multipleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
741
|
+
.eq(3)
|
742
|
+
.should('have.css', 'grid-column-start', '1')
|
743
|
+
.and('have.css', 'grid-row-start', '2')
|
744
|
+
.and('have.css', 'width', '276px');
|
745
|
+
break;
|
746
|
+
case 'Center':
|
747
|
+
multipleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
748
|
+
.eq(3)
|
749
|
+
.should('have.css', 'grid-column-start', '1')
|
750
|
+
.and('have.css', 'grid-row-start', '2')
|
751
|
+
.and('have.css', 'width', '273.328125px');
|
752
|
+
break;
|
753
|
+
case 'Right':
|
754
|
+
multipleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
755
|
+
.eq(3)
|
756
|
+
.should('have.css', 'grid-column-start', '3')
|
757
|
+
.and('have.css', 'grid-row-start', '2');
|
758
|
+
break;
|
759
|
+
}
|
760
|
+
},
|
761
|
+
|
762
|
+
/**
|
763
|
+
* Verifies the option alignment in the preview tab.
|
764
|
+
* @param {('Left'|'Center'|'Right')} optionDirection - The option alignment to verify alignment.
|
765
|
+
*/
|
766
|
+
verifyOptionAlignmentPreviewTab: (optionDirection) => {
|
767
|
+
switch (optionDirection) {
|
768
|
+
case 'Left':
|
769
|
+
multipleSelectionPage.optionWrapperPreviewTab()
|
770
|
+
.eq(3)
|
771
|
+
.should('have.css', 'grid-column-start', '1')
|
772
|
+
.and('have.css', 'grid-row-start', '2')
|
773
|
+
.and('have.css', 'width', '287.328125px');
|
774
|
+
break;
|
775
|
+
case 'Center':
|
776
|
+
multipleSelectionPage.optionWrapperPreviewTab()
|
777
|
+
.eq(3)
|
778
|
+
.should('have.css', 'grid-column-start', '1')
|
779
|
+
.and('have.css', 'grid-row-start', '2')
|
780
|
+
.and('have.css', 'width', '284.65625px');
|
781
|
+
break;
|
782
|
+
case 'Right':
|
783
|
+
multipleSelectionPage.optionWrapperPreviewTab()
|
784
|
+
.eq(3)
|
785
|
+
.should('have.css', 'grid-column-start', '3')
|
786
|
+
.and('have.css', 'grid-row-start', '2');
|
787
|
+
break;
|
788
|
+
}
|
789
|
+
}
|
619
790
|
}
|
620
791
|
|
621
792
|
const tests = {
|
@@ -632,6 +803,7 @@ const tests = {
|
|
632
803
|
...commonComponents.tests,
|
633
804
|
...autoScoredStudentViewSettings.tests,
|
634
805
|
...additionalSettingsAccessibilitySectionComponent.tests,
|
806
|
+
...mcqAdditionalSettingsBase.tests,
|
635
807
|
/**
|
636
808
|
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
637
809
|
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
@@ -28,7 +28,10 @@ const selectors = {
|
|
28
28
|
optionTextPreviewTab: () => cy.get('.mcq_Label'),
|
29
29
|
optionsWrapperGradingView: () => cy.get('.mcq-answer-checked .radio-option-wrapper'),
|
30
30
|
optionsWrapperStudentView: () => cy.get('.mcq-radio-control .radio-option-wrapper'),
|
31
|
-
optionWrapperPreviewTab: () => cy.get('.radio-button-control .radio-option-wrapper')
|
31
|
+
optionWrapperPreviewTab: () => cy.get('.radio-button-control .radio-option-wrapper'),
|
32
|
+
optionsWrapper: () => cy.get('.mcq-radio-control'),
|
33
|
+
radioButtonHiddenWrapper: () => cy.get('.radio-btn-hidden'),
|
34
|
+
noneOptionNumeration: () => cy.get('.no-numeration-div')
|
32
35
|
};
|
33
36
|
|
34
37
|
const steps = {
|
@@ -452,6 +455,172 @@ const steps = {
|
|
452
455
|
singleSelectionPage.optionsRadioButton()
|
453
456
|
.eq(index)
|
454
457
|
.should('be.disabled');
|
458
|
+
},
|
459
|
+
|
460
|
+
verifyBlockWithCheckboxOptionExistSpecifyCorrectAnswer: () => {
|
461
|
+
singleSelectionPage.radioButtonHiddenWrapper()
|
462
|
+
.should('not.exist');
|
463
|
+
},
|
464
|
+
|
465
|
+
verifyBlockWithoutCheckboxOptionSpecifyCorrectAnswer: () => {
|
466
|
+
singleSelectionPage.radioButtonHiddenWrapper()
|
467
|
+
.should('exist');
|
468
|
+
|
469
|
+
},
|
470
|
+
|
471
|
+
verifyNoneNumerationSpecifyCorrectAnswer: () => {
|
472
|
+
singleSelectionPage.noneOptionNumeration()
|
473
|
+
.should('exist')
|
474
|
+
},
|
475
|
+
|
476
|
+
verifyBlockWithCheckboxOptionExistPreviewTab: () => {
|
477
|
+
singleSelectionPage.previewTabQuestionWrapper()
|
478
|
+
.within(() => {
|
479
|
+
singleSelectionPage.radioButtonHiddenWrapper()
|
480
|
+
.should('not.exist');
|
481
|
+
});
|
482
|
+
},
|
483
|
+
|
484
|
+
verifyBlockWithCheckboxOptionNotExistPreviewTab: () => {
|
485
|
+
singleSelectionPage.previewTabQuestionWrapper()
|
486
|
+
.within(() => {
|
487
|
+
singleSelectionPage.radioButtonHiddenWrapper()
|
488
|
+
.should('exist');
|
489
|
+
})
|
490
|
+
},
|
491
|
+
|
492
|
+
/**
|
493
|
+
* Verifies the number of columns in the specify correct answer section.
|
494
|
+
* @param {number} numberOfOptions - The number of options columns to verify.
|
495
|
+
*/
|
496
|
+
verifyNumberOfOptionsColumnSpecifyCorrectAnswerSection: (numberOfOptions) => {
|
497
|
+
singleSelectionPage.optionsWrapper()
|
498
|
+
.should('have.attr', 'columns', numberOfOptions);
|
499
|
+
},
|
500
|
+
|
501
|
+
/**
|
502
|
+
* Verifies the number of columns in the preview tab.
|
503
|
+
* @param {number} numberOfOptions - The number of options columns to verify.
|
504
|
+
*/
|
505
|
+
verifyNumberOfOptionsColumnPreviewTab: (numberOfOptions) => {
|
506
|
+
singleSelectionPage.optionsWrapper()
|
507
|
+
.should('have.attr', 'columns', numberOfOptions);
|
508
|
+
},
|
509
|
+
|
510
|
+
/**
|
511
|
+
* Verifies the option direction in the specify correct answer section.
|
512
|
+
* @param {('row'|'column')} optionDirection - The option direction to verify ('row' or 'column').
|
513
|
+
*/
|
514
|
+
verifyOptionDirectionSpecifyCorrectOption: (optionDirection) => {
|
515
|
+
switch (optionDirection) {
|
516
|
+
case 'row':
|
517
|
+
singleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
518
|
+
.eq(0)
|
519
|
+
.should('have.css', 'grid-column-start', '1')
|
520
|
+
.and('have.css', 'grid-row-start', '1');
|
521
|
+
singleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
522
|
+
.eq(1)
|
523
|
+
.should('have.css', 'grid-column-start', '2')
|
524
|
+
.and('have.css', 'grid-row-start', '1');
|
525
|
+
break;
|
526
|
+
case 'column':
|
527
|
+
singleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
528
|
+
.eq(0)
|
529
|
+
.should('have.css', 'grid-column-start', '1')
|
530
|
+
.and('have.css', 'grid-row-start', '1');
|
531
|
+
singleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
532
|
+
.eq(1)
|
533
|
+
.should('have.css', 'grid-column-start', '1')
|
534
|
+
.and('have.css', 'grid-row-start', '2');
|
535
|
+
break;
|
536
|
+
}
|
537
|
+
},
|
538
|
+
|
539
|
+
/**
|
540
|
+
* Verifies the option direction in the preview tab.
|
541
|
+
* @param {('row'|'column')} optionDirection - The option direction to verify ('row' or 'column').
|
542
|
+
*/
|
543
|
+
verifyOptionDirectionPreviewTab: (optionDirection) => {
|
544
|
+
switch (optionDirection) {
|
545
|
+
case 'row':
|
546
|
+
singleSelectionPage.optionWrapperPreviewTab()
|
547
|
+
.eq(0)
|
548
|
+
.should('have.css', 'grid-column-start', '1')
|
549
|
+
.and('have.css', 'grid-row-start', '1');
|
550
|
+
singleSelectionPage.optionWrapperPreviewTab()
|
551
|
+
.eq(1)
|
552
|
+
.should('have.css', 'grid-column-start', '2')
|
553
|
+
.and('have.css', 'grid-row-start', '1');
|
554
|
+
break;
|
555
|
+
case 'column':
|
556
|
+
singleSelectionPage.optionWrapperPreviewTab()
|
557
|
+
.eq(0)
|
558
|
+
.should('have.css', 'grid-column-start', '1')
|
559
|
+
.and('have.css', 'grid-row-start', '1');
|
560
|
+
singleSelectionPage.optionWrapperPreviewTab()
|
561
|
+
.eq(1)
|
562
|
+
.should('have.css', 'grid-column-start', '1')
|
563
|
+
.and('have.css', 'grid-row-start', '2');
|
564
|
+
break;
|
565
|
+
}
|
566
|
+
},
|
567
|
+
|
568
|
+
/**
|
569
|
+
* Verifies the option alignment in the specify correct answer section.
|
570
|
+
* @param {('Left'|'Center'|'Right')} optionDirection - The option alignment to verify ('Left', 'Center', or 'Right').
|
571
|
+
*/
|
572
|
+
verifyOptionAlignmentSpecifyCorrectAnswer: (optionDirection) => {
|
573
|
+
switch (optionDirection) {
|
574
|
+
case 'Left':
|
575
|
+
singleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
576
|
+
.eq(3)
|
577
|
+
.should('have.css', 'grid-column-start', '1')
|
578
|
+
.and('have.css', 'grid-row-start', '2')
|
579
|
+
.and('have.css', 'width', '276px');
|
580
|
+
break;
|
581
|
+
case 'Center':
|
582
|
+
singleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
583
|
+
.eq(3)
|
584
|
+
.should('have.css', 'grid-column-start', '1')
|
585
|
+
.and('have.css', 'grid-row-start', '2')
|
586
|
+
.and('have.css', 'width', '273.328125px');
|
587
|
+
break;
|
588
|
+
case 'Right':
|
589
|
+
singleSelectionPage.optionWrapperSpecifyCorrectAnswerSection()
|
590
|
+
.eq(3)
|
591
|
+
.should('have.css', 'grid-column-start', '3')
|
592
|
+
.and('have.css', 'grid-row-start', '2');
|
593
|
+
break;
|
594
|
+
}
|
595
|
+
},
|
596
|
+
|
597
|
+
/**
|
598
|
+
* Verifies the option alignment in the preview tab.
|
599
|
+
* @param {('Left'|'Center'|'Right')} optionDirection - The option alignment to verify ('Left', 'Center', or 'Right').
|
600
|
+
*/
|
601
|
+
verifyOptionAlignmentPreviewTab: (optionDirection) => {
|
602
|
+
switch (optionDirection) {
|
603
|
+
case 'Left':
|
604
|
+
singleSelectionPage.optionWrapperPreviewTab()
|
605
|
+
.eq(3)
|
606
|
+
.should('have.css', 'grid-column-start', '1')
|
607
|
+
.and('have.css', 'grid-row-start', '2')
|
608
|
+
.and('have.css', 'width', '287.328125px');
|
609
|
+
break;
|
610
|
+
case 'Center':
|
611
|
+
singleSelectionPage.optionWrapperPreviewTab()
|
612
|
+
.eq(3)
|
613
|
+
.should('have.css', 'grid-column-start', '1')
|
614
|
+
.and('have.css', 'grid-row-start', '2')
|
615
|
+
.and('have.css', 'width', '284.65625px');
|
616
|
+
break;
|
617
|
+
case 'Right':
|
618
|
+
singleSelectionPage.optionWrapperPreviewTab()
|
619
|
+
.eq(3)
|
620
|
+
.should('have.css', 'grid-column-start', '3')
|
621
|
+
.and('have.css', 'grid-row-start', '2');
|
622
|
+
break;
|
623
|
+
}
|
455
624
|
}
|
456
625
|
};
|
457
626
|
|
@@ -466,6 +635,7 @@ const tests = {
|
|
466
635
|
...commonComponents.tests,
|
467
636
|
...autoScoredStudentViewSettings.tests,
|
468
637
|
...additionalSettingsAccessibilitySectionComponent.tests,
|
638
|
+
...mcqAdditionalSettingsBase.tests,
|
469
639
|
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
470
640
|
it('In the \'Correct\' accordion, all options with checkboxes should be displayed', () => {
|
471
641
|
utilities.verifyElementCount(singleSelectionPage.optionWrapperSpecifyCorrectAnswerSection(), 4);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.204
|
3
|
+
"version": "1.0.204",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -35,4 +35,4 @@
|
|
35
35
|
"node-fetch": "^3.3.2",
|
36
36
|
"react-uuid": "^2.0.0"
|
37
37
|
}
|
38
|
-
}
|
38
|
+
}
|