itemengine-cypress-automation 1.0.585-IEI-7054-f7c1dac.0 → 1.0.585-IEI-7055-cypress-f1d43b9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -136
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -121
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -121
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -273
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +1 -6
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +69 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +69 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +69 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +69 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +81 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +69 -0
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +240 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +235 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +87 -6
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +80 -2
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +81 -2
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +98 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +98 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +98 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +86 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +74 -0
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +86 -0
- package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +258 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/allOrNothingForAllViews.smoke.js +241 -0
- package/cypress/pages/graphingPage.js +1 -33
- package/cypress/pages/numberLineLabelPage.js +12 -8
- package/cypress/pages/numberLinePage.js +15 -10
- package/package.json +1 -1
|
@@ -40,7 +40,7 @@ const selectors = {
|
|
|
40
40
|
correctIncorrectStatusMessageText: () => cy.get('[class*="NumberLinestyles__CorrectIncorrectWrapper"]'),
|
|
41
41
|
|
|
42
42
|
//Correct answer section
|
|
43
|
-
numberLineCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox svg').eq(2),
|
|
43
|
+
numberLineCorrectAnswerSection: (isAlternativeAnswerSVG = false) => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox svg').eq(isAlternativeAnswerSVG ? 3 : 2),
|
|
44
44
|
numberLinePointCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').last().find('svg ellipse[display="inline"]')
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -440,7 +440,7 @@ const steps = {
|
|
|
440
440
|
clickAndDropLabelOnNumberLinePreviewTab: (label, orientation, range, coordinate) => {
|
|
441
441
|
numberLineLabelPage.draggableLabelsPreviewTab()
|
|
442
442
|
.contains(label)
|
|
443
|
-
.click();
|
|
443
|
+
.click({ force: true });
|
|
444
444
|
numberLineLabelPage.numberLinePreviewTab()
|
|
445
445
|
.then(($graphElement) => {
|
|
446
446
|
if (orientation === 'horizontal') {
|
|
@@ -451,6 +451,7 @@ const steps = {
|
|
|
451
451
|
const xPixel = originX + coordinate * (graphWidth / range);
|
|
452
452
|
numberLineLabelPage.numberLinePreviewTab()
|
|
453
453
|
.click(xPixel, originY, { force: true });
|
|
454
|
+
cy.wait(2000); // Wait for UI to update after clicking the label
|
|
454
455
|
} else {
|
|
455
456
|
numberLineLabelPage.labelContainerPreviewTab()
|
|
456
457
|
.then(($element) => {
|
|
@@ -463,6 +464,7 @@ const steps = {
|
|
|
463
464
|
const yPixel = originY - coordinate * (graphHeight / range);
|
|
464
465
|
numberLineLabelPage.numberLinePreviewTab()
|
|
465
466
|
.click(originX, yPixel, { force: true });
|
|
467
|
+
cy.wait(2000); // Wait for UI to update after clicking the label
|
|
466
468
|
});
|
|
467
469
|
}
|
|
468
470
|
});
|
|
@@ -612,16 +614,17 @@ const steps = {
|
|
|
612
614
|
* @param {Object[]} coordinates - An array containing x and y coordinates along with their ranges
|
|
613
615
|
* @param {number} range - range of x coordinate
|
|
614
616
|
*/
|
|
615
|
-
verifyCorrectResponseOnNumberLineCorrectAnswerSection: (label, range, coordinate) => {
|
|
617
|
+
verifyCorrectResponseOnNumberLineCorrectAnswerSection: (label, range, coordinate, isAlternativeAnswer, isGradingView) => {
|
|
618
|
+
let index = isAlternativeAnswer ? 2 : 1;
|
|
616
619
|
numberLineLabelPage.numberLineCorrectAnswerSection()
|
|
617
620
|
.then(($graphElement) => {
|
|
618
621
|
let graphWidth = $graphElement[0].clientWidth;
|
|
619
622
|
const originX = graphWidth / 2 + tolerance / 2;
|
|
620
623
|
const xPixel = originX + coordinate * ((graphWidth - tolerance) / range);
|
|
621
|
-
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(
|
|
624
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(index).find(`svg ellipse[cx*="${Math.floor(xPixel)}"][display="inline"]:visible`)
|
|
622
625
|
.should('have.css', 'fill', css.color.correctAnswer);
|
|
623
626
|
});
|
|
624
|
-
numberLineLabelPage.numberLineCorrectAnswerSection()
|
|
627
|
+
numberLineLabelPage.numberLineCorrectAnswerSection(isAlternativeAnswer)
|
|
625
628
|
.parents('.ngie-jxgbox')
|
|
626
629
|
.within(() => {
|
|
627
630
|
numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
|
|
@@ -965,16 +968,17 @@ const steps = {
|
|
|
965
968
|
* @param {Object[]} coordinates - An array containing x and y coordinates along with their ranges
|
|
966
969
|
* @param {number} range - range of x coordinate
|
|
967
970
|
*/
|
|
968
|
-
verifyVerticalCorrectResponseOnNumberLineCorrectAnswerSection: (label, range, coordinate) => {
|
|
971
|
+
verifyVerticalCorrectResponseOnNumberLineCorrectAnswerSection: (label, range, coordinate, isAlternativeAnswer) => {
|
|
972
|
+
let index = isAlternativeAnswer ? 2 : 1;
|
|
969
973
|
numberLineLabelPage.numberLineCorrectAnswerSection()
|
|
970
974
|
.then(($graphElement) => {
|
|
971
975
|
let graphHeight = $graphElement[0].clientHeight;
|
|
972
976
|
const originY = graphHeight / 2 - tolerance / 2;
|
|
973
977
|
const yPixel = originY - coordinate * ((graphHeight - tolerance) / range);
|
|
974
|
-
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(
|
|
978
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(index).find(`svg ellipse[cy*="${Math.floor(yPixel)}"][display="inline"]:visible`)
|
|
975
979
|
.should('have.css', 'fill', css.color.correctAnswer);
|
|
976
980
|
});
|
|
977
|
-
numberLineLabelPage.numberLineCorrectAnswerSection()
|
|
981
|
+
numberLineLabelPage.numberLineCorrectAnswerSection(isAlternativeAnswer)
|
|
978
982
|
.parents('.ngie-jxgbox')
|
|
979
983
|
.within(() => {
|
|
980
984
|
numberLineLabelPage.draggableLabelsSpecifyCorrectAnswer()
|
|
@@ -607,7 +607,8 @@ const steps = {
|
|
|
607
607
|
* @param {number} coordinates[].x - x coordinate to be plotted on the graph
|
|
608
608
|
* @param {number} coordinates[].xRange - range of x coordinate
|
|
609
609
|
*/
|
|
610
|
-
verifyCorrectPointsOnNumberLineCorrectAnswerSection: (range, coordinates) => {
|
|
610
|
+
verifyCorrectPointsOnNumberLineCorrectAnswerSection: (range, coordinates, isAlternativeAnswer = false) => {
|
|
611
|
+
let index = isAlternativeAnswer ? 2 : 1;
|
|
611
612
|
coordinates.forEach(x => {
|
|
612
613
|
numberLinePage.numberLineCorrectAnswerSection()
|
|
613
614
|
.then(($graphElement) => {
|
|
@@ -616,7 +617,7 @@ const steps = {
|
|
|
616
617
|
const originX = graphWidth / 2 + tolerance / 2;
|
|
617
618
|
const originY = graphHeight / 2;
|
|
618
619
|
const xPixel = originX + x * ((graphWidth - tolerance) / range);
|
|
619
|
-
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(
|
|
620
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(index).find(`svg ellipse[cx*="${Math.floor(xPixel)}"][cy*="${Math.floor(originY)}"][display="inline"]`)
|
|
620
621
|
.should('have.css', 'stroke', css.color.correctAnswer);
|
|
621
622
|
});
|
|
622
623
|
});
|
|
@@ -670,7 +671,8 @@ const steps = {
|
|
|
670
671
|
* @param {number} range - The uniform range of coordinates.
|
|
671
672
|
* @param {Object[]} coordinates - An array of objects, each with x1 and x2 properties representing the points of each line segment.
|
|
672
673
|
*/
|
|
673
|
-
verifyCorrectLineSegmentOnNumberLineCorrectAnswerSection: (range, coordinates) => {
|
|
674
|
+
verifyCorrectLineSegmentOnNumberLineCorrectAnswerSection: (range, coordinates, isAlternativeAnswer = false) => {
|
|
675
|
+
let index = isAlternativeAnswer ? 2 : 1;
|
|
674
676
|
coordinates.forEach(({ x1, x2 }) => {
|
|
675
677
|
numberLinePage.numberLineCorrectAnswerSection()
|
|
676
678
|
.then(($graphElement) => {
|
|
@@ -680,7 +682,7 @@ const steps = {
|
|
|
680
682
|
const originY = graphHeight / 2;
|
|
681
683
|
const x1Pixel = originX + x1 * ((graphWidth - tolerance) / range);
|
|
682
684
|
const x2Pixel = originX + x2 * ((graphWidth - tolerance) / range);
|
|
683
|
-
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(
|
|
685
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(index).find(`[stroke-linecap="butt"][x1*="${Math.floor(x1Pixel)}"][y1*="${Math.floor(originY)}"][x2*="${Math.floor(x2Pixel)}"][y2*="${Math.floor(originY)}"]`)
|
|
684
686
|
.should('have.css', 'stroke', css.color.correctAnswer);
|
|
685
687
|
});
|
|
686
688
|
});
|
|
@@ -692,7 +694,8 @@ const steps = {
|
|
|
692
694
|
* @param {number} range - The range of the number line.
|
|
693
695
|
* @param {number} startingPoint - It representing the starting point of the ray.
|
|
694
696
|
*/
|
|
695
|
-
verifyCorrectRayOnNumberLineCorrectAnswerSection: (direction, range, startingPoint) => {
|
|
697
|
+
verifyCorrectRayOnNumberLineCorrectAnswerSection: (direction, range, startingPoint, isAlternativeAnswer = false) => {
|
|
698
|
+
let index = isAlternativeAnswer ? 2 : 1;
|
|
696
699
|
numberLinePage.numberLineCorrectAnswerSection()
|
|
697
700
|
.then(($graphElement) => {
|
|
698
701
|
const graphWidth = $graphElement[0].clientWidth;
|
|
@@ -702,7 +705,7 @@ const steps = {
|
|
|
702
705
|
const x1Pixel = originX + startingPoint * ((graphWidth - tolerance) / range);
|
|
703
706
|
const rayArrowWidth = 18;
|
|
704
707
|
const x2Pixel = direction === "left" ? rayArrowWidth : graphWidth - rayArrowWidth;
|
|
705
|
-
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(
|
|
708
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(index).find(`[stroke-linecap="butt"][x1*="${Math.floor(x1Pixel)}"][y1*="${Math.floor(originY)}"][x2*="${Math.floor(x2Pixel)}"][y2*="${Math.floor(originY)}"]`)
|
|
706
709
|
.should('have.css', 'stroke', css.color.correctAnswer);
|
|
707
710
|
});
|
|
708
711
|
},
|
|
@@ -949,7 +952,8 @@ const steps = {
|
|
|
949
952
|
* @param {number} range - The range of the number line.
|
|
950
953
|
* @param {number[]} coordinates - The y-coordinates of the points.
|
|
951
954
|
*/
|
|
952
|
-
verifyCorrectPointsOnVerticalNumberLineCorrectAnswerSection: (range, coordinates) => {
|
|
955
|
+
verifyCorrectPointsOnVerticalNumberLineCorrectAnswerSection: (range, coordinates, isAlternativeAnswer = false) => {
|
|
956
|
+
let index = isAlternativeAnswer ? 2 : 1;
|
|
953
957
|
coordinates.forEach(y => {
|
|
954
958
|
numberLinePage.numberLineCorrectAnswerSection()
|
|
955
959
|
.then(($graphElement) => {
|
|
@@ -958,7 +962,7 @@ const steps = {
|
|
|
958
962
|
const originX = graphWidth / 2;
|
|
959
963
|
const originY = graphHeight / 2 - tolerance / 2;
|
|
960
964
|
const yPixel = originY - y * ((graphHeight - tolerance) / range);
|
|
961
|
-
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(
|
|
965
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(index).find(`svg ellipse[cx*="${Math.floor(originX)}"][cy*="${Math.floor(yPixel)}"][display="inline"]`)
|
|
962
966
|
.should('have.css', 'stroke', css.color.correctAnswer);
|
|
963
967
|
});
|
|
964
968
|
});
|
|
@@ -1109,7 +1113,8 @@ const steps = {
|
|
|
1109
1113
|
* @param {number} coordinates[].y1 - The y-coordinate of the starting point.
|
|
1110
1114
|
* @param {number} coordinates[].y2 - The y-coordinate of the ending point.
|
|
1111
1115
|
*/
|
|
1112
|
-
verifyCorrectLineSegmentOnVerticalNumberLineCorrectAnswerSection: (range, coordinates) => {
|
|
1116
|
+
verifyCorrectLineSegmentOnVerticalNumberLineCorrectAnswerSection: (range, coordinates, isAlternativeAnswer = false) => {
|
|
1117
|
+
let index = isAlternativeAnswer ? 2 : 1;
|
|
1113
1118
|
coordinates.forEach(({ y1, y2 }) => {
|
|
1114
1119
|
numberLinePage.numberLineCorrectAnswerSection()
|
|
1115
1120
|
.then(($graphElement) => {
|
|
@@ -1119,7 +1124,7 @@ const steps = {
|
|
|
1119
1124
|
const originY = graphHeight / 2 - tolerance / 2;
|
|
1120
1125
|
const y1Pixel = originY - y1 * ((graphHeight - tolerance) / range);
|
|
1121
1126
|
const y2Pixel = originY - y2 * ((graphHeight - tolerance) / range);
|
|
1122
|
-
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(
|
|
1127
|
+
cy.get('[class*="question-preview-wrapper"] .ngie-jxgbox').eq(index).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
|
|
1123
1128
|
.should('have.css', 'stroke', css.color.correctAnswer);
|
|
1124
1129
|
});
|
|
1125
1130
|
});
|