itemengine-cypress-automation 1.0.514-dependabot-npm-and-yarn-multi-92087b3b2d-718e8c4.0 → 1.0.514

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.
@@ -2,6 +2,7 @@
2
2
  import { chartsDotPlotPage, dialogBoxBase } from "../../../pages";
3
3
  import utilities from "../../../support/helpers/utilities";
4
4
  import abortEarlySetup from "../../../support/helpers/abortEarly";
5
+ const css = Cypress.env('css');
5
6
 
6
7
  describe('Dot plot - Dot type and Label options', () => {
7
8
  before(() => {
@@ -232,4 +233,70 @@ describe('Dot plot - Dot type and Label options', () => {
232
233
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
233
234
  });
234
235
  });
236
+
237
+ describe('Display minor nodes checkbox - content and functionality', () => {
238
+ abortEarlySetup();
239
+ before(() => {
240
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
241
+ cy.barsPreLoaderWait();
242
+ chartsDotPlotPage.steps.selectDotPlot();
243
+ chartsDotPlotPage.steps.enterTextInMinInputField(2);
244
+ chartsDotPlotPage.steps.enterTextInMaxInputField(5);
245
+
246
+ });
247
+
248
+ it('Display minor nodes label and checkbox should be displayed and by default checkbox should be checked', () => {
249
+ utilities.verifyInnerText(chartsDotPlotPage.displayMinorNodeLabel(), 'Display minor nodes');
250
+ utilities.verifyElementVisibilityState(chartsDotPlotPage.displayMinorNodeLabel(), 'visible');
251
+ chartsDotPlotPage.steps.verifyDisplayMinorNodesCheckboxChecked();
252
+ });
253
+
254
+ it('When the Display minor nodes checkbox is checked then minor nodes should be displayed in the chart', () => {
255
+ chartsDotPlotPage.steps.verifyMinorNodesInSelectChartTypeSectionIsVisible();
256
+ chartsDotPlotPage.steps.verifyMinorNodesInSpecifyCorrectAnswerSectionIsVisible();
257
+ });
258
+
259
+ it('When user unchecks the Display minor nodes checkbox then minor nodes should not be displayed in the chart', () => {
260
+ chartsDotPlotPage.steps.clickOnDisplayMinorNodeCheckbox();
261
+ chartsDotPlotPage.steps.verifyDisplayMinorNodesCheckboxUnchecked();
262
+ chartsDotPlotPage.steps.verifyMinorNodesNotDisplayedInSelectChartTypeSection();
263
+ chartsDotPlotPage.steps.verifyMinorNodesNotDisplayedInSpecifyCorrectAnswerSection();
264
+ });
265
+
266
+ it('CSS of Display minor nodes checkbox', { tags: 'css' }, () => {
267
+ utilities.verifyCSS(chartsDotPlotPage.displayMinorNodeLabel(), {
268
+ 'color': css.color.labels,
269
+ 'font-size': css.fontSize.normal,
270
+ 'font-weight': css.fontWeight.regular
271
+ });
272
+ });
273
+
274
+ it('Accessibility of Display minor nodes checkbox', { tags: 'a11y' }, () => {
275
+ cy.checkAccessibility(chartsDotPlotPage.displayMinorNodeLabel().parents('[class*="Chartsstyles__ChartsQuestionWrapper"]'));
276
+ });
277
+ });
278
+
279
+ describe('Display minor nodes checkbox - preview tab functionality', () => {
280
+ abortEarlySetup();
281
+ before(() => {
282
+ chartsDotPlotPage.steps.navigateToCreateQuestion('charts');
283
+ cy.barsPreLoaderWait();
284
+ chartsDotPlotPage.steps.selectDotPlot();
285
+ chartsDotPlotPage.steps.enterTextInMinInputField(2);
286
+ chartsDotPlotPage.steps.enterTextInMaxInputField(5);
287
+ chartsDotPlotPage.steps.switchToPreviewTab();
288
+ });
289
+
290
+ it('When the Display minor nodes checkbox is checked in edit tab then minor nodes should be displayed in the graph in preview tab', () => {
291
+ chartsDotPlotPage.steps.verifyMinorNodesInPreviewTabSectionIsVisible();
292
+ });
293
+
294
+ it('When user unchecks the Display minor nodes checkbox in edit tab then minor nodes should not be displayed in the graph in preview tab', () => {
295
+ chartsDotPlotPage.steps.switchToEditTab();
296
+ chartsDotPlotPage.steps.clickOnDisplayMinorNodeCheckbox();
297
+ chartsDotPlotPage.steps.verifyDisplayMinorNodesCheckboxUnchecked();
298
+ chartsDotPlotPage.steps.switchToPreviewTab();
299
+ chartsDotPlotPage.steps.verifyMinorNodesNotDisplayedInPreviewTabSection();
300
+ });
301
+ });
235
302
  })
@@ -172,7 +172,8 @@
172
172
  "deletePageColor": "rgb(124, 0, 0)",
173
173
  "dropdownDefaultBG": "rgb(227, 240, 237)",
174
174
  "strategyTextDisabled": "rgb(107, 107, 142)",
175
- "secondaryBtnBorderDisabled": "rgba(186, 201, 255, 0.5)"
175
+ "secondaryBtnBorderDisabled": "rgba(186, 201, 255, 0.5)",
176
+ "minorNodeBorderColor": "rgb(132, 133, 205)"
176
177
  },
177
178
  "fontSize": {
178
179
  "extraSmall": "10px",
@@ -4,6 +4,7 @@ import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage
4
4
  import { dialogBoxBase } from "./dialogBoxBase";
5
5
  import { createItemPage } from "./createItemPage";
6
6
  const css = Cypress.env('css');
7
+ const minorNodesPosition = [1,2,4,5,6,8,9,10]
7
8
 
8
9
  const selectors = {
9
10
  ...questionInstructionsComponent,
@@ -47,6 +48,7 @@ const selectors = {
47
48
  allowStudentsToEditLabel: () => cy.get('[class*="LabelOptionsWrapper"] .additional-settings-label'),
48
49
  xAxisLabelSelectChartType: () => cy.get('[class*="LabelOptionsWrapper"] .MuiFormControlLabel-label'),
49
50
  xAxisCheckBox: () => cy.get('[class*="LabelOptionsWrapper"] input'),
51
+ minorNodesEditTab: () => cy.get('.ngie-dot-plot-chart .number-line'),
50
52
 
51
53
  //Specify correct answer
52
54
  dotColumnSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .ngie-chart-point'),
@@ -66,6 +68,7 @@ const selectors = {
66
68
  numberLineAxisSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail .number-line-wrapper'),
67
69
  dotColumnLockIconSpecifyCorrectAnswer: () => cy.get('[class*="LockIconWrapper"]'),
68
70
  dotPlotChartSpecifyCorrectAnswer: () => cy.get('.ngie-accordion-detail [class*="DotPlotChartstyles__ChartWrapper"]'),
71
+ minorNodesSpecifyCorrectAnswerSection: () => cy.get('.ngie-accordion-detail .number-line'),
69
72
 
70
73
  //scoring
71
74
  toleranceThresholdLabel: () => cy.get('[class*="AllocatedPointsstyles__PointsWrapper"] .points-label'),
@@ -89,6 +92,7 @@ const selectors = {
89
92
  dotPlotChartPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__ChartWrapper"]').eq(0),
90
93
  numberLineAxisPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .number-line-wrapper').eq(0),
91
94
  labelsNumberLineAxisPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__BottomWrapper"]').eq(0).find('.label-wrapper [class*="DotPlotChartstyles__Label"]'),
95
+ minorNodesPreviewTabSection: () => cy.get('[class*="question-preview-wrapper"] .number-line'),
92
96
  //Correct answer section
93
97
  correctAnswersLabel: () => cy.get('[class*="CorrectAnswerHeader"]:visible'),
94
98
  dotPlotChartCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__ChartWrapper"]').eq(1),
@@ -1674,6 +1678,69 @@ const steps = {
1674
1678
  .should('have.value', points);
1675
1679
  });
1676
1680
  },
1681
+
1682
+ clickOnDisplayMinorNodeCheckbox: () => {
1683
+ layoutSectionComponent.displayMinorNodeCheckbox()
1684
+ .click();
1685
+ },
1686
+
1687
+ verifyDisplayMinorNodesCheckboxChecked: () => {
1688
+ layoutSectionComponent.displayMinorNodeCheckbox()
1689
+ .should('be.checked');
1690
+ },
1691
+
1692
+ verifyDisplayMinorNodesCheckboxUnchecked: () => {
1693
+ layoutSectionComponent.displayMinorNodeCheckbox()
1694
+ .should('not.be.checked');
1695
+ },
1696
+
1697
+ verifyMinorNodesInSelectChartTypeSectionIsVisible: () => {
1698
+ minorNodesPosition.forEach((index) => {
1699
+ chartsDotPlotPage.minorNodesEditTab()
1700
+ .eq(index)
1701
+ .should('have.css', 'border-right', `1px solid ${css.color.minorNodeBorderColor}`);
1702
+ });
1703
+ },
1704
+
1705
+ verifyMinorNodesInSpecifyCorrectAnswerSectionIsVisible: () => {
1706
+ minorNodesPosition.forEach((index) => {
1707
+ chartsDotPlotPage.minorNodesSpecifyCorrectAnswerSection()
1708
+ .eq(index)
1709
+ .should('have.css', 'border-right', `1px solid ${css.color.minorNodeBorderColor}`);
1710
+ });
1711
+ },
1712
+
1713
+ verifyMinorNodesInPreviewTabSectionIsVisible: () => {
1714
+ minorNodesPosition.forEach((index) => {
1715
+ chartsDotPlotPage.minorNodesPreviewTabSection()
1716
+ .eq(index)
1717
+ .should('have.css', 'border-right', `1px solid ${css.color.minorNodeBorderColor}`);
1718
+ });
1719
+ },
1720
+
1721
+ verifyMinorNodesNotDisplayedInSelectChartTypeSection: () => {
1722
+ minorNodesPosition.forEach((index) => {
1723
+ chartsDotPlotPage.minorNodesEditTab()
1724
+ .eq(index)
1725
+ .should('have.css', 'border-right-style', 'none');
1726
+ });
1727
+ },
1728
+
1729
+ verifyMinorNodesNotDisplayedInSpecifyCorrectAnswerSection: () => {
1730
+ minorNodesPosition.forEach((index) => {
1731
+ chartsDotPlotPage.minorNodesSpecifyCorrectAnswerSection()
1732
+ .eq(index)
1733
+ .should('have.css', 'border-right-style', 'none');
1734
+ });
1735
+ },
1736
+
1737
+ verifyMinorNodesNotDisplayedInPreviewTabSection: () => {
1738
+ minorNodesPosition.forEach((index) => {
1739
+ chartsDotPlotPage.minorNodesPreviewTabSection()
1740
+ .eq(index)
1741
+ .should('have.css', 'border-right-style', 'none');
1742
+ });
1743
+ }
1677
1744
  }
1678
1745
 
1679
1746
  const tests = {
@@ -9,6 +9,7 @@ deployment:
9
9
  activeDeadlineSeconds: 28800
10
10
  architecture: amd64
11
11
  restartPolicy: Never
12
+ backoffLimit: 0
12
13
  image:
13
14
  cmd: /ie-e2e/deploy/test/run.sh
14
15
  buildContext: ../..
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.514-dependabot-npm-and-yarn-multi-92087b3b2d-718e8c4.0",
3
+ "version": "1.0.514",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -43,7 +43,7 @@
43
43
  "axe-core": "^4.7.1",
44
44
  "cy-verify-downloads": "^0.1.11",
45
45
  "cy2": "^4.0.9",
46
- "cypress": "^15.2.0",
46
+ "cypress": "^12.17.2",
47
47
  "cypress-axe": "^1.4.0",
48
48
  "cypress-file-upload": "^5.0.8",
49
49
  "cypress-real-events": "^1.7.6",