itemengine-cypress-automation 1.0.383-FixesPR3-c328a98.0 → 1.0.383-task-IEI-4672-db775e7.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.
@@ -68,4 +68,32 @@ describe('Create Item page - Graphing: Specify correct answer, Alternative corre
68
68
  graphingPage.steps.verifyAlternateAnswerAccordionIsCollapsed(0);
69
69
  });
70
70
  });
71
+
72
+ describe('Graphing: Modify X/Y Axis Range Inputs and Validate Answer Visibility', () => {
73
+ abortEarlySetup();
74
+ before(() => {
75
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
76
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
77
+ graphingPage.steps.selectToolOptions(['Polygon']);
78
+ cy.barsPreLoaderWait();
79
+ });
80
+
81
+ it('When the user set a correct answer then answer should be visible in correct answer section', () => {
82
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Polygon');
83
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
84
+ graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
85
+ });
86
+
87
+ it('When the user removes the x min value from the input field and sets a new value, the correct answer should be visible if the response falls within the new range', () => {
88
+ graphingPage.steps.enterTextInXMinInputField('-10');
89
+ graphingPage.steps.verifyXMinInputFieldValue('-10');
90
+ graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: -3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: 4, yRange: 20 }, { x: 3, xRange: 20, y: -4, yRange: 20 }, { x: -3, xRange: 20, y: 4, yRange: 20 }]);
91
+ });
92
+
93
+ it('When the user removes the y max value from the input field and sets a new value, the correct answer should not be visible if the response does not fall within the new range', () => {
94
+ graphingPage.steps.enterTextInYMaxInputField('2');
95
+ graphingPage.steps.verifyYMaxInputFieldValue('2');
96
+ graphingPage.steps.verifyPointsPlottedNotExistOnSpecifyCorrectAnswerSection([{ x: -3, xRange: 20, y: 2, yRange: 12 }, { x: 3, xRange: 20, y: 2, yRange: 12 }]);
97
+ });
98
+ });
71
99
  });
@@ -549,7 +549,8 @@ const steps = {
549
549
  enterTextInXMinInputField: (xMinValue) => {
550
550
  graphingPage.xMinInputField()
551
551
  .clear()
552
- .type(xMinValue);
552
+ .type(xMinValue)
553
+ .blur();
553
554
  cy.wait(2000);
554
555
  graphingPage.xMinInputField()
555
556
  .should('have.value', xMinValue)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.383-FixesPR3-c328a98.0",
3
+ "version": "1.0.383-task-IEI-4672-db775e7.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {