itemengine-cypress-automation 1.0.591-cypressFixes-7190662.0 → 1.0.591

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.
Files changed (22) hide show
  1. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +69 -0
  2. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +69 -0
  3. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +69 -0
  4. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +68 -0
  5. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +81 -0
  6. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +69 -0
  7. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +239 -0
  8. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +234 -0
  9. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +87 -6
  10. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +80 -2
  11. package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +81 -2
  12. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +98 -0
  13. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +98 -0
  14. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +98 -0
  15. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +86 -0
  16. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +74 -0
  17. package/cypress/e2e/ILC/NumberLineLabel/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +86 -0
  18. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +258 -0
  19. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/allOrNothingForAllViews.smoke.js +240 -0
  20. package/cypress/pages/numberLineLabelPage.js +12 -8
  21. package/cypress/pages/numberLinePage.js +15 -10
  22. package/package.json +1 -1
@@ -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(1).find(`svg ellipse[cx*="${Math.floor(xPixel)}"][cy*="${Math.floor(originY)}"][display="inline"]`)
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(1).find(`[stroke-linecap="butt"][x1*="${Math.floor(x1Pixel)}"][y1*="${Math.floor(originY)}"][x2*="${Math.floor(x2Pixel)}"][y2*="${Math.floor(originY)}"]`)
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(1).find(`[stroke-linecap="butt"][x1*="${Math.floor(x1Pixel)}"][y1*="${Math.floor(originY)}"][x2*="${Math.floor(x2Pixel)}"][y2*="${Math.floor(originY)}"]`)
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(1).find(`svg ellipse[cx*="${Math.floor(originX)}"][cy*="${Math.floor(yPixel)}"][display="inline"]`)
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(1).find(`[stroke-linecap="butt"][x1*="${Math.floor(originX)}"][y1*="${Math.floor(y1Pixel)}"][x2*="${Math.floor(originX)}"][y2*="${Math.floor(y2Pixel)}"]`)
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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.591-cypressFixes-7190662.0",
3
+ "version": "1.0.591",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {