itemengine-cypress-automation 1.0.211 → 1.0.212
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/ChartsBar/allOrNothingScoringForAllViews.smoke.js +5 -5
- package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +6 -6
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +146 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomization.js +700 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomizationDraggableOptionsPanel.js +127 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCutomizationDraggableOptionProperties.js +253 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +3 -6
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +261 -0
- package/cypress/e2e/ILC/MatchingDropdown/previewContentsForAllViews.smoke.js +124 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +3 -2
- package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +2 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +7 -7
- package/cypress/pages/chartsDotPlotPage.js +22 -0
- package/cypress/pages/chartsLinePage.js +1 -0
- package/cypress/pages/essayResponsePage.js +73 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +550 -3
- package/cypress/pages/graphingPage.js +4 -0
- package/cypress/pages/matchingPage.js +189 -1
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import constants from "../fixtures/constants";
|
2
2
|
import utilities from "../support/helpers/utilities";
|
3
|
-
import { createQuestionBasePage, questionInstructionsComponent, uploadImageSectionComponent, scoringSectionBaseEditTab, optionsWrapperComponent, equationEditorFlyout, ckEditorToolbar, commonComponents, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, maximumCapacityPerDropzoneComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, imageCanvasComponent, backgroundImageUploadComponent, correctIncorrectAnswerLabelComponent, draggableOptionsSectionComponent, draggableOptionContainer, studentViewSettingsLabelComponent, randomizeOptionsComponent, enableOuterBorderComponent, allowMultipleInstancesOfSameDraggableOptionComponent, additionalSettingsPanel, opacityComponent, imageActionsComponent, colorPopupComponent, fillInTheGapsDragAndDropCommonComponents, additionalSettingsAccessibilitySectionComponent } from "./components";
|
3
|
+
import { createQuestionBasePage, questionInstructionsComponent, uploadImageSectionComponent, scoringSectionBaseEditTab, optionsWrapperComponent, equationEditorFlyout, ckEditorToolbar, commonComponents, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, maximumCapacityPerDropzoneComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, imageCanvasComponent, backgroundImageUploadComponent, correctIncorrectAnswerLabelComponent, draggableOptionsSectionComponent, draggableOptionContainer, studentViewSettingsLabelComponent, randomizeOptionsComponent, enableOuterBorderComponent, allowMultipleInstancesOfSameDraggableOptionComponent, additionalSettingsPanel, opacityComponent, imageActionsComponent, colorPopupComponent, fillInTheGapsDragAndDropCommonComponents, additionalSettingsAccessibilitySectionComponent, styleAndLayoutCustomizationAccordionComponent, figCommonStyleAndLayoutComponent, connectorStyleStyleAndLayoutCustomizationComponent } from "./components";
|
4
4
|
import { dialogBoxBase } from "./dialogBoxBase";
|
5
5
|
const css = Cypress.env('css');
|
6
6
|
|
@@ -31,12 +31,18 @@ const selectors = {
|
|
31
31
|
...colorPopupComponent,
|
32
32
|
...fillInTheGapsDragAndDropCommonComponents,
|
33
33
|
...additionalSettingsPanel,
|
34
|
+
...styleAndLayoutCustomizationAccordionComponent,
|
35
|
+
...figCommonStyleAndLayoutComponent,
|
36
|
+
...connectorStyleStyleAndLayoutCustomizationComponent,
|
37
|
+
|
34
38
|
dropzonePreviewTab: () => cy.get('.drag-and-drop-canvas [class*="__DraggableWrapper"]'),
|
35
39
|
dropzoneContainerPreviewTab: () => cy.get('[class*="Canvasstyle__DropzoneWrapper"]'),
|
40
|
+
dropzoneBorderWrapperPreviewTab: () => cy.get('.drag-and-drop-canvas [class*="ResponseDropZonestyles__CellContainer"]'),
|
36
41
|
optionContainerOptionsPreviewTab: () => cy.get('.item-list .draggable-options-item:visible'),
|
37
|
-
dropzoneWrapperPreviewTab: () => cy.get('.label-image-with-dnd-canvas-wrapper .cell'),
|
38
42
|
optionContainerOptionsSpecifyCorrectAnswerSection: () => cy.get('.option-drag-and-drop .item-list .draggable-options-item:visible'),
|
39
43
|
dropzoneSpecifyCorrectAnswerSection: () => cy.get('.dropzone-and-label-wrapper [class*="__DraggableWrapper"]:visible'),
|
44
|
+
dropzoneOptionSpecifyCorrectAnswerSection: () => cy.get('[class*="__DraggableWrapper"] [data-testid="question-instruction-element"]:visible'),
|
45
|
+
dropzoneBorderWrapperSpecifyCorrectAnswerSection: () => cy.get('[class*="ResponseDropZonestyles__CellContainer"]'),
|
40
46
|
optionPreviewTab: () => cy.get('.draggable-options-item'),
|
41
47
|
dropzoneWrapperSpecifyCorrectAnswerSection: () => cy.get('.cell'),
|
42
48
|
correctIncorrectAnswerBlock: () => cy.get('[class*="-answer-block"]'),
|
@@ -50,7 +56,39 @@ const selectors = {
|
|
50
56
|
dropzoneWrapperPreviewTab: () => cy.get('.preview-content-wrapper [class*="Canvasstyle__ResponseDiv"]'),
|
51
57
|
dropzonePointerInPreviewTab: () => cy.get('[class*="PointerWrapper"]'),
|
52
58
|
canvasInPreviewTab: () => cy.get('[class*="PreviewTabstyles__ContentWrapper"] [class*="Canvasstyle__DragAndDropCanvas"]'),
|
53
|
-
tickIconWrapper: () => cy.get('.tick-icon-wrapper g[id*="Rectangle"]')
|
59
|
+
tickIconWrapper: () => cy.get('.tick-icon-wrapper g[id*="Rectangle"]'),
|
60
|
+
dropzoneConnectorStyleLabel: () => cy.get('.dropzone-connector-style-label'),
|
61
|
+
connectorEndPointShapeLabel: () => cy.get('[class*="__SubSectionLabel"]').eq(3),
|
62
|
+
optionPlacementInDropzoneLabel: () => cy.get('.option-placement-label'),
|
63
|
+
wordWrapLabel: () => cy.get('[data-ngie-testid="word-wrap-checkbox"] .MuiFormControlLabel-label'),
|
64
|
+
wordWrapCheckbox: () => cy.get('[data-ngie-testid="word-wrap-checkbox"] input'),
|
65
|
+
inlineLabel: () => cy.get('[data-value="inline"] .ngie-radio-label'),
|
66
|
+
blockLabel: () => cy.get('[data-value="block"] .ngie-radio-label'),
|
67
|
+
inlineRadioButton: () => cy.get('[type="radio"][value="inline"]'),
|
68
|
+
blockRadioButton: () => cy.get('[type="radio"][value="block"]'),
|
69
|
+
expandIconButton: () => cy.get('.expand-dropzone-icon-button:visible'),
|
70
|
+
expandPopupDraggableOption: () => cy.get('.expand-dropzone-popup-overlay .draggable-item-wrapper'),
|
71
|
+
expandPopupCloseButton: () => cy.get('[class*="CancelButtonWrapper"] button'),
|
72
|
+
optionAlignmentInDropzoneLabel: () => cy.get('.option-alignment .options-label'),
|
73
|
+
optionAlignmentInDropzoneOptions: (alignmentOption) => cy.get(`.option-alignment button[aria-label*="option alignment in dropzone ${alignmentOption}"]`),
|
74
|
+
setHeightAndWidthForAllDropzoneCheckboxLabel: () => cy.get('[data-ngie-testid="set-height-and-width-for-all-dropzones-checkbox"] .MuiFormControlLabel-label'),
|
75
|
+
setHeightAndWidthForAllDropzoneCheckbox: () => cy.get('[data-ngie-testid="set-height-and-width-for-all-dropzones-checkbox"] input'),
|
76
|
+
dropzoneHeightInputFieldLabel: () => cy.get('.dropzone-text-container-dimension [aria-labelledby="Height (px)"]'),
|
77
|
+
dropzoneHeightInputField: () => cy.get('.dropzone-text-container-dimension [id="Height (px)"]'),
|
78
|
+
dropzoneWidthInputFieldLabel: () => cy.get('.dropzone-text-container-dimension [aria-labelledby="Width (px)"]'),
|
79
|
+
dropzoneWidthInputField: () => cy.get('.dropzone-text-container-dimension [id="Width (px)"]'),
|
80
|
+
draggableOptionPanelPlacementLabel: () => cy.get('.draggable-option-panel-label'),
|
81
|
+
panelPlacementLabel: () => cy.get('.panel-placement-style .options-label'),
|
82
|
+
optionAlignmentInPanelLabel: () => cy.get('.option-alignment .options-label').eq(1),
|
83
|
+
panelPlacementOptions: (placementOption) => cy.get(`.panel-placement-style button[aria-label*="panel placement ${placementOption}"]`),
|
84
|
+
optionAlignmentInPanelOptions: (alignmentOption) => cy.get(`.option-alignment button[aria-label*="option alignment in panel ${alignmentOption}"]`),
|
85
|
+
optionsWrapper: () => cy.get('[class*="StandardDropZonestyles__DraggableItemsGrid"]'),
|
86
|
+
optionsWrapperPreviewTab: () => cy.get('.edit-question-preview-wrapper [class*="StandardDropZonestyles__DraggableItemsGrid"]'),
|
87
|
+
optionPanelWrapper: () => cy.get('.option-drag-and-drop'),
|
88
|
+
dragHandleIconLabel: () => cy.get('[class*="__SubSectionLabel"]').eq(4),
|
89
|
+
dragHandle: () => cy.get('.draggable-item-wrapper svg'),
|
90
|
+
dragHandleOptions: () => cy.get('.drag-handle-icon-block'),
|
91
|
+
draggableOptionsFillColorLabel: () => cy.get('.sub-section-label').eq(2),
|
54
92
|
}
|
55
93
|
|
56
94
|
const steps = {
|
@@ -82,6 +120,9 @@ const steps = {
|
|
82
120
|
...imageActionsComponent.steps,
|
83
121
|
...colorPopupComponent.steps,
|
84
122
|
...fillInTheGapsDragAndDropCommonComponents.steps,
|
123
|
+
...styleAndLayoutCustomizationAccordionComponent.steps,
|
124
|
+
...figCommonStyleAndLayoutComponent.steps,
|
125
|
+
...connectorStyleStyleAndLayoutCustomizationComponent.steps,
|
85
126
|
|
86
127
|
/**
|
87
128
|
* @description Verifies the text content of a specific preview tab dropzone element.
|
@@ -559,6 +600,509 @@ const steps = {
|
|
559
600
|
imageCanvasComponent.canvasImageInPreviewTab()
|
560
601
|
.should('have.attr', 'alt', 'highlightImage.jpg');
|
561
602
|
},
|
603
|
+
|
604
|
+
/**
|
605
|
+
* Verifies the border color of the answer input field at the specified index.
|
606
|
+
* @param {number} responseAreaIndex - The index of the response area to verify.
|
607
|
+
* @param {string} borderValue - The expected border color value in CSS format.
|
608
|
+
*/
|
609
|
+
verifyDropzoneBorderColor: (responseAreaIndex, borderValue) => {
|
610
|
+
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzoneBorderWrapperPreviewTab(), responseAreaIndex), {
|
611
|
+
'border': borderValue
|
612
|
+
});
|
613
|
+
},
|
614
|
+
|
615
|
+
verifyWordWrapCheckboxIsUnchecked: () => {
|
616
|
+
fillInTheGapsOverImageDragAndDropPage.wordWrapCheckbox()
|
617
|
+
.should('not.be.checked');
|
618
|
+
},
|
619
|
+
|
620
|
+
checkWordWrapCheckbox: () => {
|
621
|
+
fillInTheGapsOverImageDragAndDropPage.wordWrapCheckbox()
|
622
|
+
.click()
|
623
|
+
.should('be.checked');
|
624
|
+
},
|
625
|
+
|
626
|
+
verifyOptionInDropzoneNotWrapped: () => {
|
627
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneOptionSpecifyCorrectAnswerSection()
|
628
|
+
.eq(0)
|
629
|
+
.should('have.css', 'height', '24px');
|
630
|
+
},
|
631
|
+
|
632
|
+
verifyOptionInDropzoneWrapped: () => {
|
633
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneOptionSpecifyCorrectAnswerSection()
|
634
|
+
.eq(0)
|
635
|
+
.should('have.css', 'height', '72px');
|
636
|
+
},
|
637
|
+
|
638
|
+
expandOptionInDropzone: () => {
|
639
|
+
fillInTheGapsOverImageDragAndDropPage.expandIconButton()
|
640
|
+
.click();
|
641
|
+
},
|
642
|
+
|
643
|
+
closeExpandOptionPopup: () => {
|
644
|
+
fillInTheGapsOverImageDragAndDropPage.expandPopupCloseButton()
|
645
|
+
.click();
|
646
|
+
},
|
647
|
+
|
648
|
+
verifyInlineRadioButtonChecked: () => {
|
649
|
+
fillInTheGapsOverImageDragAndDropPage.inlineRadioButton()
|
650
|
+
.should('be.checked');
|
651
|
+
},
|
652
|
+
|
653
|
+
checkBlockRadioButton: () => {
|
654
|
+
fillInTheGapsOverImageDragAndDropPage.blockRadioButton()
|
655
|
+
.click()
|
656
|
+
.should('be.checked');
|
657
|
+
},
|
658
|
+
|
659
|
+
verifyInlineOptionPlacementSpecifyCorrectAnswer: () => {
|
660
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
|
661
|
+
.find('.draggable-items-grid')
|
662
|
+
.should('have.css', 'flex-direction', 'row')
|
663
|
+
.and('have.css', 'flex-wrap', 'wrap');
|
664
|
+
},
|
665
|
+
|
666
|
+
verifyBlockOptionPlacementSpecifyCorrectAnswer: () => {
|
667
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
|
668
|
+
.find('.draggable-items-grid')
|
669
|
+
.should('have.css', 'flex-direction', 'column')
|
670
|
+
.and('have.css', 'flex-wrap', 'nowrap');
|
671
|
+
},
|
672
|
+
|
673
|
+
verifyInlineOptionPlacementPreviewTab: () => {
|
674
|
+
fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
|
675
|
+
.find('.draggable-items-grid')
|
676
|
+
.should('have.css', 'flex-direction', 'row')
|
677
|
+
.and('have.css', 'flex-wrap', 'wrap');
|
678
|
+
},
|
679
|
+
|
680
|
+
verifyBlockOptionPlacementPreviewTab: () => {
|
681
|
+
fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
|
682
|
+
.find('.draggable-items-grid')
|
683
|
+
.should('have.css', 'flex-direction', 'column')
|
684
|
+
.and('have.css', 'flex-wrap', 'nowrap');
|
685
|
+
},
|
686
|
+
|
687
|
+
/**
|
688
|
+
* Verifies if the specified option alignment in panel is selected.
|
689
|
+
* @param {string} alignmentOption - The alignment option to verify.
|
690
|
+
*/
|
691
|
+
verifyOptionAlignmentInDropzoneOptionSelected: (alignmentOption) => {
|
692
|
+
fillInTheGapsOverImageDragAndDropPage.optionAlignmentInDropzoneOptions(alignmentOption)
|
693
|
+
.should('have.attr', 'aria-pressed', 'true');
|
694
|
+
},
|
695
|
+
|
696
|
+
/**
|
697
|
+
* Selects the specified option alignment in panel.
|
698
|
+
* @param {string} alignmentOption - The alignment option to select.
|
699
|
+
*/
|
700
|
+
selectOptionAlignmentInDropzoneOption: (alignmentOption) => {
|
701
|
+
fillInTheGapsOverImageDragAndDropPage.optionAlignmentInDropzoneOptions(alignmentOption.toLowerCase())
|
702
|
+
.click();
|
703
|
+
},
|
704
|
+
|
705
|
+
/**
|
706
|
+
* Verifies the option alignment in panel in the specify correct answer section.
|
707
|
+
* @param {string} optionAlignment - The option alignment to verify ('Left', 'Center', 'Right').
|
708
|
+
*/
|
709
|
+
verifyOptionAlignmentInDropzoneInSpecifyCorrectAnswer: (optionAlignment) => {
|
710
|
+
switch (optionAlignment) {
|
711
|
+
case 'Left':
|
712
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
|
713
|
+
.find('.draggable-items-grid')
|
714
|
+
.should('have.css', 'justify-content', 'flex-start');
|
715
|
+
break;
|
716
|
+
case 'Center':
|
717
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
|
718
|
+
.find('.draggable-items-grid')
|
719
|
+
.should('have.css', 'justify-content', 'center');
|
720
|
+
break;
|
721
|
+
case 'Right':
|
722
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
|
723
|
+
.find('.draggable-items-grid')
|
724
|
+
.should('have.css', 'justify-content', 'flex-end');
|
725
|
+
break;
|
726
|
+
default:
|
727
|
+
throw new Error('Invalid option alignment');
|
728
|
+
}
|
729
|
+
},
|
730
|
+
|
731
|
+
/**
|
732
|
+
* Verifies the option alignment in panel in the specify correct answer section.
|
733
|
+
* @param {string} optionAlignment - The option alignment to verify ('Left', 'Center', 'Right').
|
734
|
+
*/
|
735
|
+
verifyOptionAlignmentInDropzoneInPreviewTab: (optionAlignment) => {
|
736
|
+
switch (optionAlignment) {
|
737
|
+
case 'Left':
|
738
|
+
fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
|
739
|
+
.find('.draggable-items-grid')
|
740
|
+
.should('have.css', 'justify-content', 'flex-start');
|
741
|
+
break;
|
742
|
+
case 'Center':
|
743
|
+
fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
|
744
|
+
.find('.draggable-items-grid')
|
745
|
+
.should('have.css', 'justify-content', 'center');
|
746
|
+
break;
|
747
|
+
case 'Right':
|
748
|
+
fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
|
749
|
+
.find('.draggable-items-grid')
|
750
|
+
.should('have.css', 'justify-content', 'flex-end');
|
751
|
+
break;
|
752
|
+
default:
|
753
|
+
throw new Error('Invalid option alignment');
|
754
|
+
}
|
755
|
+
},
|
756
|
+
|
757
|
+
/**
|
758
|
+
* Sets the height of the text container.
|
759
|
+
* @param {string} height - The height to set for the text container.
|
760
|
+
*/
|
761
|
+
setDropzoneHeight: (height) => {
|
762
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneHeightInputField()
|
763
|
+
.type(height)
|
764
|
+
.blur();
|
765
|
+
},
|
766
|
+
|
767
|
+
/**
|
768
|
+
* Sets the width of the text container.
|
769
|
+
* @param {string} width - The width to set for the text container.
|
770
|
+
*/
|
771
|
+
setDropzoneWidth: (width) => {
|
772
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneWidthInputField()
|
773
|
+
.type(width)
|
774
|
+
.blur();
|
775
|
+
},
|
776
|
+
|
777
|
+
verifySetHeightAndWidthForAllDropzoneCheckboxUncheckedState: () => {
|
778
|
+
fillInTheGapsOverImageDragAndDropPage.setHeightAndWidthForAllDropzoneCheckbox()
|
779
|
+
.should('not.be.checked');
|
780
|
+
},
|
781
|
+
|
782
|
+
checkSetHeightAndWidthForAllDropzoneCheckbox: () => {
|
783
|
+
fillInTheGapsOverImageDragAndDropPage.setHeightAndWidthForAllDropzoneCheckbox()
|
784
|
+
.click()
|
785
|
+
.should('be.checked');
|
786
|
+
},
|
787
|
+
|
788
|
+
/**
|
789
|
+
* Verifies the value of the text container height input field.
|
790
|
+
* @param {string} value - The expected value of the height input field.
|
791
|
+
*/
|
792
|
+
verifyDropzoneHeightInputFieldValue: (value) => {
|
793
|
+
utilities.verifyInputFieldValue(fillInTheGapsOverImageDragAndDropPage.dropzoneHeightInputField(), value);
|
794
|
+
},
|
795
|
+
|
796
|
+
/**
|
797
|
+
* Verifies the value of the text container width input field.
|
798
|
+
* @param {string} value - The expected value of the width input field.
|
799
|
+
*/
|
800
|
+
verifyDropzoneWidthInputFieldValue: (value) => {
|
801
|
+
utilities.verifyInputFieldValue(fillInTheGapsOverImageDragAndDropPage.dropzoneWidthInputField(), value);
|
802
|
+
},
|
803
|
+
|
804
|
+
/**
|
805
|
+
* This function verified height and width of dropzone
|
806
|
+
* @param {number} height of dropzone
|
807
|
+
* @param {number} width of zropzone
|
808
|
+
*/
|
809
|
+
verifyDropzoneDimensionsSpecifyCorrectAnswer: (height, width) => {
|
810
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneBorderWrapperSpecifyCorrectAnswerSection()
|
811
|
+
.should('have.attr', 'height', height)
|
812
|
+
.and('have.attr', 'width', width)
|
813
|
+
},
|
814
|
+
|
815
|
+
/**
|
816
|
+
* This function verified height and width of dropzone
|
817
|
+
* @param {number} height of dropzone
|
818
|
+
* @param {number} width of zropzone
|
819
|
+
*/
|
820
|
+
verifyDropzoneDimensionsPreviewTab: (height, width) => {
|
821
|
+
fillInTheGapsOverImageDragAndDropPage.dropzoneBorderWrapperPreviewTab()
|
822
|
+
.should('have.attr', 'height', height)
|
823
|
+
.and('have.attr', 'width', width)
|
824
|
+
},
|
825
|
+
|
826
|
+
/**
|
827
|
+
* Verifies if the specified panel placement option is selected.
|
828
|
+
* @param {string} placementOption - The panel placement option to verify.
|
829
|
+
*/
|
830
|
+
verifyPanelPlacementOptionSelected: (placementOption) => {
|
831
|
+
fillInTheGapsOverImageDragAndDropPage.panelPlacementOptions(placementOption)
|
832
|
+
.should('have.attr', 'aria-pressed', 'true');
|
833
|
+
},
|
834
|
+
|
835
|
+
/**
|
836
|
+
* Selects the specified panel placement option.
|
837
|
+
* @param {string} placementOption - The panel placement option to select.
|
838
|
+
*/
|
839
|
+
selectPanelPlacementOption: (placementOption) => {
|
840
|
+
fillInTheGapsOverImageDragAndDropPage.panelPlacementOptions(placementOption)
|
841
|
+
.click();
|
842
|
+
},
|
843
|
+
|
844
|
+
/**
|
845
|
+
* Verifies if the specified option alignment in panel is selected.
|
846
|
+
* @param {string} alignmentOption - The alignment option to verify.
|
847
|
+
*/
|
848
|
+
verifyOptionAlignmentInPanelOptionSelected: (alignmentOption) => {
|
849
|
+
fillInTheGapsOverImageDragAndDropPage.optionAlignmentInPanelOptions(alignmentOption)
|
850
|
+
.should('have.attr', 'aria-pressed', 'true');
|
851
|
+
},
|
852
|
+
|
853
|
+
/**
|
854
|
+
* Selects the specified option alignment in panel.
|
855
|
+
* @param {string} alignmentOption - The alignment option to select.
|
856
|
+
*/
|
857
|
+
selectOptionAlignmentInPanelOption: (alignmentOption) => {
|
858
|
+
fillInTheGapsOverImageDragAndDropPage.optionAlignmentInPanelOptions(alignmentOption)
|
859
|
+
.click();
|
860
|
+
},
|
861
|
+
|
862
|
+
/**
|
863
|
+
* Verifies the panel placement in the specify correct answer section.
|
864
|
+
* @param {string} placementOption - The panel placement option to verify.
|
865
|
+
*/
|
866
|
+
verifyPanelPlacementSpecifyCorrectAnswerSection: (placementOption) => {
|
867
|
+
switch (placementOption) {
|
868
|
+
case 'Bottom':
|
869
|
+
fillInTheGapsOverImageDragAndDropPage.optionPanelWrapper()
|
870
|
+
.should('have.css', 'width', '844px')
|
871
|
+
.and('have.css', 'padding-top', '32px')
|
872
|
+
.and('have.css', 'padding-bottom', '16px')
|
873
|
+
break;
|
874
|
+
case 'Top':
|
875
|
+
fillInTheGapsOverImageDragAndDropPage.optionPanelWrapper()
|
876
|
+
.should('have.css', 'width', '844px')
|
877
|
+
.and('have.css', 'padding-top', '16px')
|
878
|
+
.and('have.css', 'padding-bottom', '32px')
|
879
|
+
break;
|
880
|
+
case 'Left':
|
881
|
+
fillInTheGapsOverImageDragAndDropPage.optionPanelWrapper()
|
882
|
+
.should('have.css', 'width', '200px')
|
883
|
+
.and('have.css', 'padding-right', '24px')
|
884
|
+
.and('have.css', 'padding-left', '8px')
|
885
|
+
break;
|
886
|
+
case 'Right':
|
887
|
+
fillInTheGapsOverImageDragAndDropPage.optionPanelWrapper()
|
888
|
+
.should('have.css', 'width', '200px')
|
889
|
+
.and('have.css', 'padding-right', '8px')
|
890
|
+
.and('have.css', 'padding-left', '24px')
|
891
|
+
break;
|
892
|
+
default:
|
893
|
+
throw new Error('Invalid placement option');
|
894
|
+
}
|
895
|
+
},
|
896
|
+
|
897
|
+
/**
|
898
|
+
* Verifies the panel placement in the preview tab.
|
899
|
+
* @param {string} placementOption - The panel placement option to verify.
|
900
|
+
*/
|
901
|
+
verifyPanelPlacementPreviewTab: (placementOption) => {
|
902
|
+
fillInTheGapsOverImageDragAndDropPage.previewTabQuestionWrapper()
|
903
|
+
.within(() => {
|
904
|
+
switch (placementOption) {
|
905
|
+
case 'Bottom':
|
906
|
+
fillInTheGapsOverImageDragAndDropPage.optionPanelWrapper()
|
907
|
+
.should('have.css', 'width', '768px')
|
908
|
+
.and('have.css', 'padding-top', '32px')
|
909
|
+
.and('have.css', 'padding-bottom', '16px')
|
910
|
+
break;
|
911
|
+
case 'Top':
|
912
|
+
fillInTheGapsOverImageDragAndDropPage.optionPanelWrapper()
|
913
|
+
.should('have.css', 'width', '768px')
|
914
|
+
.and('have.css', 'padding-top', '16px')
|
915
|
+
.and('have.css', 'padding-bottom', '32px')
|
916
|
+
break;
|
917
|
+
case 'Left':
|
918
|
+
fillInTheGapsOverImageDragAndDropPage.optionPanelWrapper()
|
919
|
+
.should('have.css', 'width', '142.84375px')
|
920
|
+
.and('have.css', 'padding-right', '24px')
|
921
|
+
.and('have.css', 'padding-left', '8px')
|
922
|
+
break;
|
923
|
+
case 'Right':
|
924
|
+
fillInTheGapsOverImageDragAndDropPage.optionPanelWrapper()
|
925
|
+
.should('have.css', 'width', '142.84375px')
|
926
|
+
.and('have.css', 'padding-right', '8px')
|
927
|
+
.and('have.css', 'padding-left', '24px')
|
928
|
+
break;
|
929
|
+
default:
|
930
|
+
throw new Error('Invalid panel placement option');
|
931
|
+
}
|
932
|
+
});
|
933
|
+
},
|
934
|
+
|
935
|
+
/**
|
936
|
+
* Verifies the option alignment in panel in the specify correct answer section.
|
937
|
+
* @param {string} optionAlignment - The option alignment to verify ('Left', 'Center', 'Right').
|
938
|
+
*/
|
939
|
+
verifyOptionAlignmentInPanelInSpecifyCorrectAnswer: (optionAlignment) => {
|
940
|
+
switch (optionAlignment) {
|
941
|
+
case 'Left':
|
942
|
+
fillInTheGapsOverImageDragAndDropPage.optionsWrapper()
|
943
|
+
.should('have.css', 'justify-content', 'flex-start');
|
944
|
+
break;
|
945
|
+
case 'Center':
|
946
|
+
fillInTheGapsOverImageDragAndDropPage.optionsWrapper()
|
947
|
+
.should('have.css', 'justify-content', 'center');
|
948
|
+
break;
|
949
|
+
case 'Right':
|
950
|
+
fillInTheGapsOverImageDragAndDropPage.optionsWrapper()
|
951
|
+
.should('have.css', 'justify-content', 'flex-end');
|
952
|
+
break;
|
953
|
+
default:
|
954
|
+
throw new Error('Invalid option alignment');
|
955
|
+
}
|
956
|
+
},
|
957
|
+
|
958
|
+
/**
|
959
|
+
* Verifies the option alignment in panel in the preview tab.
|
960
|
+
* @param {string} optionAlignment - The option alignment to verify ('Left', 'Center', 'Right').
|
961
|
+
*/
|
962
|
+
verifyOptionAlignmentInPanelInPreviewTab: (optionAlignment) => {
|
963
|
+
switch (optionAlignment) {
|
964
|
+
case 'Left':
|
965
|
+
fillInTheGapsOverImageDragAndDropPage.optionsWrapperPreviewTab()
|
966
|
+
.should('have.css', 'justify-content', 'flex-start');
|
967
|
+
break;
|
968
|
+
case 'Center':
|
969
|
+
fillInTheGapsOverImageDragAndDropPage.optionsWrapperPreviewTab()
|
970
|
+
.should('have.css', 'justify-content', 'center');
|
971
|
+
break;
|
972
|
+
case 'Right':
|
973
|
+
fillInTheGapsOverImageDragAndDropPage.optionsWrapperPreviewTab()
|
974
|
+
.should('have.css', 'justify-content', 'flex-end');
|
975
|
+
break;
|
976
|
+
default:
|
977
|
+
throw new Error('Invalid placement option');
|
978
|
+
}
|
979
|
+
},
|
980
|
+
|
981
|
+
/**
|
982
|
+
* Verifies that the specified drag handle option is selected.
|
983
|
+
* @param {number} index - The index of the drag handle option to verify.
|
984
|
+
*/
|
985
|
+
verifyDragHandleOptionSelected: (index) => {
|
986
|
+
fillInTheGapsOverImageDragAndDropPage.dragHandleOptions()
|
987
|
+
.eq(index)
|
988
|
+
.should('have.attr', 'aria-pressed', 'true')
|
989
|
+
.within(() => {
|
990
|
+
fillInTheGapsOverImageDragAndDropPage.colorBlockSelectedIcon()
|
991
|
+
.should('exist');
|
992
|
+
});
|
993
|
+
},
|
994
|
+
|
995
|
+
/**
|
996
|
+
* Selects a drag handle option.
|
997
|
+
* @param {number} index - The index of the drag handle option to select.
|
998
|
+
*/
|
999
|
+
selectDragHandleOption: (index) => {
|
1000
|
+
fillInTheGapsOverImageDragAndDropPage.dragHandleOptions()
|
1001
|
+
.eq(index)
|
1002
|
+
.click();
|
1003
|
+
},
|
1004
|
+
|
1005
|
+
|
1006
|
+
/**
|
1007
|
+
* Verifies the drag handle icon in the "Specify Correct Answer" section.
|
1008
|
+
* @param {string} dragHandleOption - The drag handle option to verify.
|
1009
|
+
*/
|
1010
|
+
verifyDragHandleIconSpecifyCorrectAnswer: (dragHandleOption) => {
|
1011
|
+
switch (dragHandleOption) {
|
1012
|
+
case 'drag icon':
|
1013
|
+
fillInTheGapsOverImageDragAndDropPage.dragHandle()
|
1014
|
+
.should('have.class', 'drag-icon-button');
|
1015
|
+
break;
|
1016
|
+
case 'arrow icon':
|
1017
|
+
fillInTheGapsOverImageDragAndDropPage.dragHandle()
|
1018
|
+
.should('have.class', 'drag-arrows-icon');
|
1019
|
+
break;
|
1020
|
+
case 'none':
|
1021
|
+
fillInTheGapsOverImageDragAndDropPage.dragHandle()
|
1022
|
+
.should('not.exist');
|
1023
|
+
break;
|
1024
|
+
default:
|
1025
|
+
throw new Error('Invalid drag option');
|
1026
|
+
}
|
1027
|
+
},
|
1028
|
+
|
1029
|
+
/**
|
1030
|
+
* Verifies the drag handle icon in the preview tab.
|
1031
|
+
* @param {string} dragHandleOption - The drag handle option to verify.
|
1032
|
+
*/
|
1033
|
+
verifyDragHandleIconPreviewTab: (dragHandleOption) => {
|
1034
|
+
switch (dragHandleOption) {
|
1035
|
+
case 'drag icon':
|
1036
|
+
fillInTheGapsOverImageDragAndDropPage.previewTabQuestionWrapper()
|
1037
|
+
.within(() => {
|
1038
|
+
fillInTheGapsOverImageDragAndDropPage.dragHandle()
|
1039
|
+
.should('have.class', 'drag-icon-button');
|
1040
|
+
});
|
1041
|
+
break;
|
1042
|
+
case 'arrow icon':
|
1043
|
+
fillInTheGapsOverImageDragAndDropPage.previewTabQuestionWrapper()
|
1044
|
+
.within(() => {
|
1045
|
+
fillInTheGapsOverImageDragAndDropPage.dragHandle()
|
1046
|
+
.should('have.class', 'drag-arrows-icon');
|
1047
|
+
});
|
1048
|
+
break;
|
1049
|
+
case 'none':
|
1050
|
+
fillInTheGapsOverImageDragAndDropPage.previewTabQuestionWrapper()
|
1051
|
+
.within(() => {
|
1052
|
+
fillInTheGapsOverImageDragAndDropPage.dragHandle()
|
1053
|
+
.should('not.exist');
|
1054
|
+
});
|
1055
|
+
break;
|
1056
|
+
default:
|
1057
|
+
throw new Error('Invalid drag option');
|
1058
|
+
}
|
1059
|
+
},
|
1060
|
+
|
1061
|
+
/**
|
1062
|
+
* Verifies the background color of grid
|
1063
|
+
* @param {string} colorValue - The expected background color value.
|
1064
|
+
*/
|
1065
|
+
verifyDraggableOptionsFillColorSpecifyCorrectAnswerSection: (colorValue) => {
|
1066
|
+
utilities.verifyCSS(draggableOptionContainer.draggableOption(), {
|
1067
|
+
'background-color': colorValue
|
1068
|
+
});
|
1069
|
+
},
|
1070
|
+
|
1071
|
+
/**
|
1072
|
+
* Verifies the background color of grid
|
1073
|
+
* @param {string} colorValue - The expected background color value.
|
1074
|
+
*/
|
1075
|
+
verifyDraggableOptionsFillColorPreviewTab: (colorValue) => {
|
1076
|
+
fillInTheGapsOverImageDragAndDropPage.previewTabQuestionWrapper()
|
1077
|
+
.within(() => {
|
1078
|
+
utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.draggableOption(), {
|
1079
|
+
'background-color': colorValue
|
1080
|
+
});
|
1081
|
+
});
|
1082
|
+
},
|
1083
|
+
|
1084
|
+
/**
|
1085
|
+
* Verifies the border color of grid
|
1086
|
+
* @param {string} colorValue - The expected border color value.
|
1087
|
+
*/
|
1088
|
+
verifyDraggableOptionsBorderColorSpecifyCorrectAnswer: (colorValue) => {
|
1089
|
+
utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.draggableOption(), {
|
1090
|
+
'border': `1px solid ${colorValue}`
|
1091
|
+
});
|
1092
|
+
},
|
1093
|
+
|
1094
|
+
/**
|
1095
|
+
* Verifies the border color of grid
|
1096
|
+
* @param {string} colorValue - The expected border color value.
|
1097
|
+
*/
|
1098
|
+
verifyDraggableOptionsBorderColorPreviewTab: (colorValue) => {
|
1099
|
+
fillInTheGapsOverImageDragAndDropPage.previewTabQuestionWrapper()
|
1100
|
+
.within(() => {
|
1101
|
+
utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.draggableOption(), {
|
1102
|
+
'border': `1px solid ${colorValue}`
|
1103
|
+
});
|
1104
|
+
});
|
1105
|
+
},
|
562
1106
|
}
|
563
1107
|
|
564
1108
|
const tests = {
|
@@ -583,6 +1127,9 @@ const tests = {
|
|
583
1127
|
...backgroundImageUploadComponent.tests,
|
584
1128
|
...imageCanvasComponent.tests,
|
585
1129
|
...additionalSettingsAccessibilitySectionComponent.tests,
|
1130
|
+
...styleAndLayoutCustomizationAccordionComponent.tests,
|
1131
|
+
...figCommonStyleAndLayoutComponent.tests,
|
1132
|
+
...connectorStyleStyleAndLayoutCustomizationComponent.tests,
|
586
1133
|
|
587
1134
|
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
588
1135
|
it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
|
@@ -1665,6 +1665,10 @@ const steps = {
|
|
1665
1665
|
});
|
1666
1666
|
},
|
1667
1667
|
|
1668
|
+
verifyCorrectIncorrectStatusMessageNotExists: () => {
|
1669
|
+
utilities.verifyElementVisibilityState(graphingPage.correctIncorrectStatusMessageText(), 'notExist');
|
1670
|
+
},
|
1671
|
+
|
1668
1672
|
verifyCorrectAnswerSectionNotExist: () => {
|
1669
1673
|
utilities.verifyElementVisibilityState(utilities.getNthElement(graphingPage.graphCorrectAnswerSection(), 1), 'notExist');
|
1670
1674
|
},
|