itemengine-cypress-automation 1.0.144 → 1.0.145
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingPenaltyScoring.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/Graphing/Scoring/manuallyAndNonScoredScoring.js +0 -2
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -12
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +0 -2
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +1 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/specifyCorrectAnswerSection.js +0 -1
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +0 -1
- package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +8 -8
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +256 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +252 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +335 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingPenaltyScoring.js +60 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +157 -0
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +497 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +200 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +280 -0
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +281 -0
- package/cypress/e2e/ILC/Matching/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
- package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +146 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingPenaltyScoring.js +55 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsBasic.js +116 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +307 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +163 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -3
- package/cypress/e2e/ILC/MultipleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -5
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +11 -10
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +6 -9
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +12 -5
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +1 -2
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -0
- package/cypress/pages/components/desmosToolComponent.js +1 -1
- package/cypress/pages/components/gridQuestionCommonComponent.js +28 -4
- package/cypress/pages/components/index.js +1 -0
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +132 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +3 -113
- package/cypress/pages/geoGebraToolsPage.js +1 -1
- package/cypress/pages/graphingPage.js +6 -0
- package/cypress/pages/gridFillPage.js +67 -12
- package/cypress/pages/index.js +2 -1
- package/cypress/pages/matchingPage.js +433 -0
- package/cypress/pages/multipleSelectionGridPage.js +11 -3
- package/cypress/pages/singleSelectionGridPage.js +2 -1
- package/cypress/pages/textEntryMathPage.js +5 -0
- package/cypress/pages/textEntryMathWithImagePage.js +6 -1
- package/package.json +1 -1
@@ -0,0 +1,132 @@
|
|
1
|
+
import utilities from "../../support/helpers/utilities";
|
2
|
+
|
3
|
+
const selectors = {
|
4
|
+
//Specify columns and rows
|
5
|
+
specifyColumnsAndRowsLabel: () => cy.get('[class*="SpecifyColumnRowsLabel"]'),
|
6
|
+
columnsInputStepperLabel: () => cy.get('.input-stepper-label').eq(0),
|
7
|
+
rowsInputStepperLabel: () => cy.get('.input-stepper-label').eq(1),
|
8
|
+
columnsInputStepperWrapper: () => cy.get('.input-stepper-wrapper[aria-label="Columns"]'),
|
9
|
+
rowsInputStepperWrapper: () => cy.get('.input-stepper-wrapper[aria-label="Rows"]'),
|
10
|
+
inputStepperDecreaseButton: () => cy.get('.input-stepper-button[aria-label="Decrease count"]'),
|
11
|
+
inputStepperIncreaseButton: () => cy.get('.input-stepper-button[aria-label="Increase count"]'),
|
12
|
+
inputStepperCountInputField: () => cy.get('.input-stepper-textfield'),
|
13
|
+
}
|
14
|
+
|
15
|
+
const steps = {
|
16
|
+
verifyColumnInputStepperIncreaseDecreaseButton: () => {
|
17
|
+
specifyRowsAndColumnsComponent.columnsInputStepperWrapper()
|
18
|
+
.within(() => {
|
19
|
+
utilities.verifyElementVisibilityState(specifyRowsAndColumnsComponent.inputStepperIncreaseButton(), 'visible');
|
20
|
+
utilities.verifyElementVisibilityState(specifyRowsAndColumnsComponent.inputStepperDecreaseButton(), 'visible');
|
21
|
+
});
|
22
|
+
},
|
23
|
+
|
24
|
+
verifyRowInputStepperIncreaseDecreaseButton: () => {
|
25
|
+
specifyRowsAndColumnsComponent.rowsInputStepperWrapper()
|
26
|
+
.within(() => {
|
27
|
+
utilities.verifyElementVisibilityState(specifyRowsAndColumnsComponent.inputStepperIncreaseButton(), 'visible');
|
28
|
+
utilities.verifyElementVisibilityState(specifyRowsAndColumnsComponent.inputStepperDecreaseButton(), 'visible');
|
29
|
+
});
|
30
|
+
},
|
31
|
+
|
32
|
+
/**
|
33
|
+
* @description Decrease column input stepper count
|
34
|
+
* @param {number} increaseValue The value by which the column input stepper count is to be decreased
|
35
|
+
*/
|
36
|
+
decreaseColumnInputStepperCount: (increaseValue) => {
|
37
|
+
for (let index = 0; index < increaseValue; index++) {
|
38
|
+
specifyRowsAndColumnsComponent.inputStepperDecreaseButton()
|
39
|
+
.eq(0)
|
40
|
+
.click();
|
41
|
+
};
|
42
|
+
},
|
43
|
+
|
44
|
+
/**
|
45
|
+
* @description Increase column input stepper count
|
46
|
+
* @param {number} increaseValue The value by which the column input stepper count is to be increased
|
47
|
+
*/
|
48
|
+
increaseColumnInputStepperCount: (increaseValue) => {
|
49
|
+
for (let index = 0; index < increaseValue; index++) {
|
50
|
+
specifyRowsAndColumnsComponent.inputStepperIncreaseButton()
|
51
|
+
.eq(0)
|
52
|
+
.click();
|
53
|
+
};
|
54
|
+
},
|
55
|
+
|
56
|
+
/**
|
57
|
+
* @description Increase row input stepper count
|
58
|
+
* @param {number} increaseValue The value by which the row input stepper count is to be increased
|
59
|
+
*/
|
60
|
+
increaseRowInputStepperCount: (increaseValue) => {
|
61
|
+
for (let index = 0; index < increaseValue; index++) {
|
62
|
+
specifyRowsAndColumnsComponent.inputStepperIncreaseButton()
|
63
|
+
.eq(1)
|
64
|
+
.click();
|
65
|
+
};
|
66
|
+
},
|
67
|
+
|
68
|
+
/**
|
69
|
+
* @description Decrease row input stepper count
|
70
|
+
* @param {number} decreaseValue The value by which the row input stepper count is to be decreased
|
71
|
+
*/
|
72
|
+
decreaseRowInputStepperCount: (decreaseValue) => {
|
73
|
+
for (let index = 0; index < decreaseValue; index++) {
|
74
|
+
specifyRowsAndColumnsComponent.inputStepperDecreaseButton()
|
75
|
+
.eq(1)
|
76
|
+
.click();
|
77
|
+
};
|
78
|
+
},
|
79
|
+
|
80
|
+
verifyRowInputStepperIncreaseButtonIsDisabled: () => {
|
81
|
+
utilities.verifyElementDisabled(specifyRowsAndColumnsComponent.inputStepperIncreaseButton().eq(1));
|
82
|
+
},
|
83
|
+
|
84
|
+
verifyColumnInputStepperDecreaseButtonIsDisabled: () => {
|
85
|
+
utilities.verifyElementDisabled(specifyRowsAndColumnsComponent.inputStepperDecreaseButton().eq(0));
|
86
|
+
},
|
87
|
+
|
88
|
+
/**
|
89
|
+
* @description Verify the count of columns in column input stepper
|
90
|
+
* @param {number} value Count of columns in input stepper
|
91
|
+
*/
|
92
|
+
verifyColumnInputStepperCountInputFieldValue: (value) => {
|
93
|
+
specifyRowsAndColumnsComponent.inputStepperCountInputField()
|
94
|
+
.eq(0)
|
95
|
+
.should('have.value', value);
|
96
|
+
},
|
97
|
+
|
98
|
+
/**
|
99
|
+
* @description Verify the count of rows in rows input stepper
|
100
|
+
* @param {number} value Count of rows in input stepper
|
101
|
+
*/
|
102
|
+
verifyRowsInputStepperCountInputFieldValue: (value) => {
|
103
|
+
specifyRowsAndColumnsComponent.inputStepperCountInputField()
|
104
|
+
.eq(1)
|
105
|
+
.should('have.value', value);
|
106
|
+
},
|
107
|
+
|
108
|
+
/**
|
109
|
+
* @description Add input to column input stepper input field
|
110
|
+
* @param {number} numberOfColumns Number of columns for the specify columns and rows section table
|
111
|
+
*/
|
112
|
+
addInputToColumnInputStepper: (numberOfColumns) => {
|
113
|
+
specifyRowsAndColumnsComponent.inputStepperCountInputField()
|
114
|
+
.eq(0)
|
115
|
+
.type(`{selectAll}${numberOfColumns}`);
|
116
|
+
},
|
117
|
+
|
118
|
+
/**
|
119
|
+
* @description Add input to column input stepper input field
|
120
|
+
* @param {number} numberOfRows Number of rows for the specify columns and rows section table
|
121
|
+
*/
|
122
|
+
addInputToRowInputStepper: (numberOfRows) => {
|
123
|
+
specifyRowsAndColumnsComponent.inputStepperCountInputField()
|
124
|
+
.eq(1)
|
125
|
+
.type(`{selectAll}${numberOfRows}`);
|
126
|
+
},
|
127
|
+
}
|
128
|
+
|
129
|
+
export const specifyRowsAndColumnsComponent = {
|
130
|
+
...selectors,
|
131
|
+
steps
|
132
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { optionsWrapperComponent, createQuestionBasePage, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, questionInstructionsComponent, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, commonComponents, ckEditorToolbar, equationEditorFlyout, randomizeOptionsComponent, allowMultipleInstancesOfSameDraggableOptionComponent, studentViewSettingsLabelComponent, additionalSettingsPanel, draggableOptionContainer, draggableOptionsSectionComponent, maximumCapacityPerDropzoneComponent, enableOuterBorderComponent, additionalSettingsAccessibilitySectionComponent } from "./components";
|
1
|
+
import { optionsWrapperComponent, createQuestionBasePage, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, questionInstructionsComponent, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, commonComponents, ckEditorToolbar, equationEditorFlyout, randomizeOptionsComponent, allowMultipleInstancesOfSameDraggableOptionComponent, studentViewSettingsLabelComponent, additionalSettingsPanel, draggableOptionContainer, draggableOptionsSectionComponent, maximumCapacityPerDropzoneComponent, enableOuterBorderComponent, specifyRowsAndColumnsComponent, additionalSettingsAccessibilitySectionComponent } from "./components";
|
2
2
|
import utilities from "../support/helpers/utilities";
|
3
3
|
import constants from "../fixtures/constants";
|
4
4
|
const css = Cypress.env('css');
|
@@ -19,6 +19,7 @@ const selectors = {
|
|
19
19
|
...optionsWrapperComponent,
|
20
20
|
...draggableOptionsSectionComponent,
|
21
21
|
...enableOuterBorderComponent,
|
22
|
+
...specifyRowsAndColumnsComponent,
|
22
23
|
...additionalSettingsPanel,
|
23
24
|
editCellPropertyButton: () => cy.get('button[aria-label="More Action"]'),
|
24
25
|
editCellPropertyList: () => cy.get('.ngie-action-cell-container [role="menu"]'),
|
@@ -122,6 +123,7 @@ const steps = {
|
|
122
123
|
...draggableOptionsSectionComponent.steps,
|
123
124
|
...commonComponents.steps,
|
124
125
|
...enableOuterBorderComponent.steps,
|
126
|
+
...specifyRowsAndColumnsComponent.steps,
|
125
127
|
/**
|
126
128
|
* @description Modifies the dropzone property based on the specified list option.
|
127
129
|
* @param {("Heading" | "Subheading" | "Text" | "Dropzone" | "None")} listOption - The list option to set to the dropzone.
|
@@ -562,74 +564,6 @@ const steps = {
|
|
562
564
|
});
|
563
565
|
},
|
564
566
|
|
565
|
-
/**
|
566
|
-
* @description Verify the count of columns in column input stepper
|
567
|
-
* @param {number} value Count of columns in input stepper
|
568
|
-
*/
|
569
|
-
verifyColumnInputStepperCountInputFieldValue: (value) => {
|
570
|
-
dragAndDropIntoCategoriesPage.inputStepperCountInputField()
|
571
|
-
.eq(0)
|
572
|
-
.should('have.value', value);
|
573
|
-
},
|
574
|
-
|
575
|
-
/**
|
576
|
-
* @description Verify the count of rows in rows input stepper
|
577
|
-
* @param {number} value Count of rows in input stepper
|
578
|
-
*/
|
579
|
-
verifyRowsInputStepperCountInputFieldValue: (value) => {
|
580
|
-
dragAndDropIntoCategoriesPage.inputStepperCountInputField()
|
581
|
-
.eq(1)
|
582
|
-
.should('have.value', value);
|
583
|
-
},
|
584
|
-
|
585
|
-
/**
|
586
|
-
* @description Increase column input stepper count
|
587
|
-
* @param {number} increaseValue The value by which the column input stepper count is to be increased
|
588
|
-
*/
|
589
|
-
increaseColumnInputStepperCount: (increaseValue) => {
|
590
|
-
for (let index = 0; index < increaseValue; index++) {
|
591
|
-
dragAndDropIntoCategoriesPage.inputStepperIncreaseButton()
|
592
|
-
.eq(0)
|
593
|
-
.click();
|
594
|
-
};
|
595
|
-
},
|
596
|
-
|
597
|
-
/**
|
598
|
-
* @description Decrease column input stepper count
|
599
|
-
* @param {number} increaseValue The value by which the column input stepper count is to be decreased
|
600
|
-
*/
|
601
|
-
decreaseColumnInputStepperCount: (increaseValue) => {
|
602
|
-
for (let index = 0; index < increaseValue; index++) {
|
603
|
-
dragAndDropIntoCategoriesPage.inputStepperDecreaseButton()
|
604
|
-
.eq(0)
|
605
|
-
.click();
|
606
|
-
};
|
607
|
-
},
|
608
|
-
|
609
|
-
/**
|
610
|
-
* @description Increase row input stepper count
|
611
|
-
* @param {number} decreaseValue The value by which the row input stepper count is to be increased
|
612
|
-
*/
|
613
|
-
increaseRowInputStepperCount: (decreaseValue) => {
|
614
|
-
for (let index = 0; index < decreaseValue; index++) {
|
615
|
-
dragAndDropIntoCategoriesPage.inputStepperIncreaseButton()
|
616
|
-
.eq(1)
|
617
|
-
.click();
|
618
|
-
};
|
619
|
-
},
|
620
|
-
|
621
|
-
/**
|
622
|
-
* @description Decrease row input stepper count
|
623
|
-
* @param {number} decreaseValue The value by which the row input stepper count is to be decreased
|
624
|
-
*/
|
625
|
-
decreaseRowInputStepperCount: (decreaseValue) => {
|
626
|
-
for (let index = 0; index < decreaseValue; index++) {
|
627
|
-
dragAndDropIntoCategoriesPage.inputStepperDecreaseButton()
|
628
|
-
.eq(1)
|
629
|
-
.click();
|
630
|
-
};
|
631
|
-
},
|
632
|
-
|
633
567
|
/**
|
634
568
|
* @description Verify the number of columns in the specify columns and rows section table
|
635
569
|
* @param {number} numberOfColumns Number of columns in the specify columns and rows section table
|
@@ -741,34 +675,6 @@ const steps = {
|
|
741
675
|
utilities.verifyElementCount(dragAndDropIntoCategoriesPage.tableRowContainerPreviewTab(), numberOfRows);
|
742
676
|
},
|
743
677
|
|
744
|
-
/**
|
745
|
-
* @description Add input to column input stepper input field
|
746
|
-
* @param {number} numberOfColumns Number of columns for the specify columns and rows section table
|
747
|
-
*/
|
748
|
-
addInputToColumnInputStepper: (numberOfColumns) => {
|
749
|
-
dragAndDropIntoCategoriesPage.inputStepperCountInputField()
|
750
|
-
.eq(0)
|
751
|
-
.type(`{selectAll}${numberOfColumns}`);
|
752
|
-
},
|
753
|
-
|
754
|
-
/**
|
755
|
-
* @description Add input to column input stepper input field
|
756
|
-
* @param {number} numberOfRows Number of rows for the specify columns and rows section table
|
757
|
-
*/
|
758
|
-
addInputToRowInputStepper: (numberOfRows) => {
|
759
|
-
dragAndDropIntoCategoriesPage.inputStepperCountInputField()
|
760
|
-
.eq(1)
|
761
|
-
.type(`{selectAll}${numberOfRows}`);
|
762
|
-
},
|
763
|
-
|
764
|
-
verifyRowInputStepperIncreaseButtonIsDisabled: () => {
|
765
|
-
utilities.verifyElementDisabled(dragAndDropIntoCategoriesPage.inputStepperIncreaseButton().eq(1));
|
766
|
-
},
|
767
|
-
|
768
|
-
verifyColumnInputStepperDecreaseButtonIsDisabled: () => {
|
769
|
-
utilities.verifyElementDisabled(dragAndDropIntoCategoriesPage.inputStepperDecreaseButton().eq(0));
|
770
|
-
},
|
771
|
-
|
772
678
|
checkSetFirstColumnCellsAsHeadingCheckbox: () => {
|
773
679
|
dragAndDropIntoCategoriesPage.setFirstColumnCellsAsHeadingCheckbox()
|
774
680
|
.click();
|
@@ -1073,22 +979,6 @@ const steps = {
|
|
1073
979
|
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.tableCellContainerSpecifyCorrectAnswerSection().eq(columnIndex), 'hidden');
|
1074
980
|
},
|
1075
981
|
|
1076
|
-
verifyColumnInputStepperIncreaseDecreaseButton: () => {
|
1077
|
-
dragAndDropIntoCategoriesPage.columnsInputStepperWrapper()
|
1078
|
-
.within(() => {
|
1079
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.inputStepperIncreaseButton(), 'visible');
|
1080
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.inputStepperDecreaseButton(), 'visible');
|
1081
|
-
});
|
1082
|
-
},
|
1083
|
-
|
1084
|
-
verifyRowInputStepperIncreaseDecreaseButton: () => {
|
1085
|
-
dragAndDropIntoCategoriesPage.rowsInputStepperWrapper()
|
1086
|
-
.within(() => {
|
1087
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.inputStepperIncreaseButton(), 'visible');
|
1088
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.inputStepperDecreaseButton(), 'visible');
|
1089
|
-
});
|
1090
|
-
},
|
1091
|
-
|
1092
982
|
/**
|
1093
983
|
* @param {("All or nothing" | "Per dropzone" | "Per correct option")} scoringSubtype option from the scoring subtype radio buttons
|
1094
984
|
* @description this function selects scoring subtype from the scoring section
|
@@ -774,6 +774,12 @@ const steps = {
|
|
774
774
|
.should('be.checked');
|
775
775
|
},
|
776
776
|
|
777
|
+
uncheckSnapToGridCheckbox: () => {
|
778
|
+
graphingPage.snapToGridCheckbox()
|
779
|
+
.click()
|
780
|
+
.should('not.be.checked');
|
781
|
+
},
|
782
|
+
|
777
783
|
verifySnapToCheckboxIsUnchecked: () => {
|
778
784
|
graphingPage.snapToGridCheckbox()
|
779
785
|
.should('not.be.checked');
|
@@ -9,6 +9,9 @@ const selectors = {
|
|
9
9
|
...commonComponents,
|
10
10
|
...autoScoredScoringSectionMultiResponseType,
|
11
11
|
...autoScoredSpecifyCorrectAnswerSection,
|
12
|
+
...correctIncorrectAnswerLabelComponent,
|
13
|
+
...commonComponents,
|
14
|
+
...autoScoredScoringPreviewTab,
|
12
15
|
|
13
16
|
columnsInputField: () => cy.get('[class*="GridFillstyles__RowsColWrapper"] .input-stepper-textfield').eq(0),
|
14
17
|
columnsLabel: () => cy.get('[class*="GridFillstyles__RowsColWrapper"] [class*="GridFillstyles__CanvasInputLabelWrapper"]').eq(0),
|
@@ -25,7 +28,7 @@ const selectors = {
|
|
25
28
|
rowsWrapperSpecifyCorrectAnswerSection: () => cy.get('[class*="GridFillstyles__SetCorrectAnswerWrapper"] [class*="GridFillResponsestyles__RowContainer"]'),
|
26
29
|
correctAnswerAccordion: () => cy.get('.correct-answer-accordion'),
|
27
30
|
correctAnswerLabel: () => cy.get('.answer-accordion-label div'),
|
28
|
-
|
31
|
+
gridWrapper: () => cy.get('.correct-answer-accordion .grid-fill-response-wrapper'),
|
29
32
|
pointsPerResponseLabel: () => cy.get('.alternate-points-points-per-text-span'),
|
30
33
|
pointsPerResponseScore: () => cy.get('.alternate-points-points-per-value-span'),
|
31
34
|
pointsPerResponseWrapper: () => cy.get('.alternate-points-points-per-text-wrapper'),
|
@@ -75,6 +78,7 @@ const steps = {
|
|
75
78
|
},
|
76
79
|
|
77
80
|
/**
|
81
|
+
* Verifies the value of the columns input field.
|
78
82
|
* @param {number} value value of columns input field
|
79
83
|
*/
|
80
84
|
verifyColumnsInputField: (value) => {
|
@@ -107,6 +111,7 @@ const steps = {
|
|
107
111
|
},
|
108
112
|
|
109
113
|
/**
|
114
|
+
* Verifies the value of the rows input field.
|
110
115
|
* @param {number} value value of rows input field
|
111
116
|
*/
|
112
117
|
verifyRowsInputField: (value) => {
|
@@ -124,7 +129,7 @@ const steps = {
|
|
124
129
|
.click();
|
125
130
|
},
|
126
131
|
|
127
|
-
|
132
|
+
clickOnCustomizeLayoutAccordionButton: () => {
|
128
133
|
gridFillPage.customizeLayoutAccordionButton()
|
129
134
|
.click();
|
130
135
|
},
|
@@ -142,10 +147,10 @@ const steps = {
|
|
142
147
|
},
|
143
148
|
|
144
149
|
/**
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
150
|
+
* Shades a cell in the customize layout.
|
151
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
152
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
153
|
+
*/
|
149
154
|
shadeCell: (rowIndex, columnIndex) => {
|
150
155
|
utilities.getNthElement(gridFillPage.rowsWrapperCustomizeLayout(), rowIndex)
|
151
156
|
.within(() => {
|
@@ -161,7 +166,7 @@ const steps = {
|
|
161
166
|
* @param {number} rowIndex - The index of the row containing the cell.
|
162
167
|
* @param {number} columnIndex - The index of the column containing the cell.
|
163
168
|
*/
|
164
|
-
|
169
|
+
unShadeCell: (rowIndex, columnIndex) => {
|
165
170
|
utilities.getNthElement(gridFillPage.rowsWrapperCustomizeLayout(), rowIndex)
|
166
171
|
.within(() => {
|
167
172
|
utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), columnIndex)
|
@@ -227,7 +232,7 @@ const steps = {
|
|
227
232
|
* @param {number} rowIndex - The index of the row containing the cell.
|
228
233
|
* @param {number} columnIndex - The index of the column containing the cell.
|
229
234
|
*/
|
230
|
-
|
235
|
+
selectCellSpecifyCorrectAnswerSection: (rowIndex, columnIndex) => {
|
231
236
|
utilities.getNthElement(gridFillPage.rowsWrapperSpecifyCorrectAnswerSection(), rowIndex)
|
232
237
|
.within(() => {
|
233
238
|
utilities.getNthElement(gridFillPage.cellInEditTab(), columnIndex)
|
@@ -242,7 +247,7 @@ const steps = {
|
|
242
247
|
* @param {number} rowIndex - The index of the row containing the cell.
|
243
248
|
* @param {number} columnIndex - The index of the column containing the cell.
|
244
249
|
*/
|
245
|
-
|
250
|
+
unselectCellSpecifyCorrectAnswerSection: (rowIndex, columnIndex) => {
|
246
251
|
utilities.getNthElement(gridFillPage.rowsWrapperSpecifyCorrectAnswerSection(), rowIndex)
|
247
252
|
.within(() => {
|
248
253
|
utilities.getNthElement(gridFillPage.cellInEditTab(), columnIndex)
|
@@ -490,14 +495,64 @@ const steps = {
|
|
490
495
|
},
|
491
496
|
|
492
497
|
/**
|
493
|
-
* Verifies if the
|
498
|
+
* Verifies if the default background color is applied to a cell in the preview tab.
|
499
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
500
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
494
501
|
*/
|
502
|
+
verifyResponseCellHasDefaultBackgroundColor: (rowIndex, columnIndex) => {
|
503
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
504
|
+
.within(() => {
|
505
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
506
|
+
.should('have.css', 'background-color', css.color.gridCellDefaultStateBg);
|
507
|
+
});
|
508
|
+
},
|
509
|
+
|
510
|
+
/**
|
511
|
+
* Verifies if the correct response border and background color is applied to a cell in the preview tab.
|
512
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
513
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
514
|
+
*/
|
515
|
+
verifyCorrectResponseBorderAndBackgroundColor: (rowIndex, columnIndex) => {
|
516
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
517
|
+
.within(() => {
|
518
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
519
|
+
.should('have.css', 'border-color', css.color.correctAnswer);
|
520
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
521
|
+
.should('have.css', 'background-color', css.color.gridCellCorrectAnswerBg);
|
522
|
+
});
|
523
|
+
},
|
524
|
+
|
525
|
+
/**
|
526
|
+
* Verifies if the incorrect response border background color is applied to a cell in the preview tab.
|
527
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
528
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
529
|
+
*/
|
530
|
+
verifyIncorrectResponseBorderAndBackgroundColor: (rowIndex, columnIndex) => {
|
531
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
532
|
+
.within(() => {
|
533
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
534
|
+
.should('have.css', 'border-color', css.color.incorrectAnswer);
|
535
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
536
|
+
.should('have.css', 'background-color', css.color.gridCellIncorrectAnswerBg);
|
537
|
+
});
|
538
|
+
},
|
539
|
+
|
495
540
|
verifyCorrectAnswerAccordionIsExpanded: () => {
|
496
541
|
gridFillPage.correctAnswerAccordion()
|
497
542
|
.find('.ngie-accordion-summary')
|
498
543
|
.should('have.attr', 'aria-expanded', 'true');
|
499
544
|
},
|
500
545
|
|
546
|
+
/**
|
547
|
+
* Verifies if the background color of a response cell in the preview tab
|
548
|
+
* @param {number} index - The index of the cell to verify.
|
549
|
+
*/
|
550
|
+
verifyResponseCellHasDefaultBackgroundColor: (index) => {
|
551
|
+
utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInPreviewTab(), index), {
|
552
|
+
'background-color': css.color.gridCellDefaultStateBg
|
553
|
+
});
|
554
|
+
},
|
555
|
+
|
501
556
|
/**
|
502
557
|
* Verify the points score displayed on response
|
503
558
|
* @param {number} pointsPerResponse Points to be displayed on response
|
@@ -525,7 +580,7 @@ const steps = {
|
|
525
580
|
.within(() => {
|
526
581
|
utilities.verifyElementCount(gridFillPage.cellInPreviewTab(), lengthColumns);
|
527
582
|
});
|
528
|
-
}
|
583
|
+
}
|
529
584
|
}
|
530
585
|
|
531
586
|
const tests = {
|
@@ -540,7 +595,7 @@ const tests = {
|
|
540
595
|
utilities.verifyElementCount(gridFillPage.correctAnswerAccordion(), 1);
|
541
596
|
gridFillPage.steps.verifyCorrectAnswerAccordionIsExpanded();
|
542
597
|
utilities.verifyInnerText(gridFillPage.correctAnswerLabel(), 'Correct');
|
543
|
-
utilities.verifyElementVisibilityState(gridFillPage.
|
598
|
+
utilities.verifyElementVisibilityState(gridFillPage.gridWrapper(), 'visible');
|
544
599
|
});
|
545
600
|
},
|
546
601
|
|
package/cypress/pages/index.js
CHANGED
@@ -44,6 +44,7 @@ export * from './textEntryMathWithImagePage';
|
|
44
44
|
export * from './graphingPage';
|
45
45
|
export * from './simpleCalculatorPage'
|
46
46
|
export * from './contentBlocksPage';
|
47
|
-
export * from './gridFillPage';
|
48
47
|
export * from './geoGebraActivityPage';
|
48
|
+
export * from './gridFillPage';
|
49
49
|
export * from './geoGebraToolsPage';
|
50
|
+
export * from './matchingPage';
|