itemengine-cypress-automation 1.0.577-IEI-7065-Improve-test-coverage-for-essay-response-1a0a73e.0 → 1.0.578-IEI-7079-de6e553.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/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +248 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +247 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +175 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +223 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +191 -0
- package/cypress/e2e/ILC/ChartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePointsLocked.js +184 -24
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +177 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +205 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +228 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +229 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +229 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +206 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +184 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +164 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +165 -11
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +165 -11
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +164 -14
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +121 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +167 -16
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +178 -15
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +121 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +165 -13
- package/cypress/pages/chartsBarPage.js +44 -1
- package/cypress/pages/chartsDotPlotPage.js +99 -1
- package/cypress/pages/chartsLinePage.js +48 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import utilities from "../support/helpers/utilities"
|
|
2
|
-
import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, studentViewSettingsLabelComponent, layoutSectionComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
|
|
2
|
+
import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, studentViewSettingsLabelComponent, layoutSectionComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, showAlternativeAnswersComponent } from "./components";
|
|
3
3
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
|
4
4
|
import { createItemPage } from "./createItemPage";
|
|
5
5
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
@@ -20,6 +20,7 @@ const selectors = {
|
|
|
20
20
|
...selectQuestionResourceToolPage,
|
|
21
21
|
...autoScoredScoringSectionMultiResponseType,
|
|
22
22
|
...chartsCommonComponent,
|
|
23
|
+
...showAlternativeAnswersComponent,
|
|
23
24
|
|
|
24
25
|
barDragHandle: () => cy.get('.bar-drag-handle'),
|
|
25
26
|
bar: () => cy.get('.ngie-chart-point'),
|
|
@@ -93,6 +94,7 @@ const steps = {
|
|
|
93
94
|
...selectQuestionResourceToolPage.steps,
|
|
94
95
|
...commonComponents.steps,
|
|
95
96
|
...createItemPage.steps,
|
|
97
|
+
...showAlternativeAnswersComponent.steps,
|
|
96
98
|
|
|
97
99
|
/**
|
|
98
100
|
* @description set the bar height/value in the select chart type section chart
|
|
@@ -726,6 +728,47 @@ const steps = {
|
|
|
726
728
|
});
|
|
727
729
|
},
|
|
728
730
|
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Verify that a bar has the expected value and also has a tick icon in a specific answer section
|
|
734
|
+
* @param {Object} barProperties - The properties of the bar to verify
|
|
735
|
+
* @param {number} barProperties.barIndex - Index of the bar
|
|
736
|
+
* @param {number} barProperties.barValue - Expected value/height of the bar
|
|
737
|
+
* @param {number} barProperties.range - Maximum value of the axis
|
|
738
|
+
* @param {number} barProperties.sectionIndex - Index of the chart section (1 for correct, 2 for alternative)
|
|
739
|
+
* @example verifyBarValueAndTickIconInSpecificSection({ barIndex: 0, barValue: 4, range: 10, sectionIndex: 2 })
|
|
740
|
+
*/
|
|
741
|
+
verifyBarValueAndTickIconInSpecificSection: ({ barIndex, barValue, range, sectionIndex }) => {
|
|
742
|
+
const expectedHeight = barValue / range;
|
|
743
|
+
|
|
744
|
+
chartsBarPage.previewTabChartWrapper()
|
|
745
|
+
.eq(sectionIndex)
|
|
746
|
+
.within(() => {
|
|
747
|
+
utilities.getNthElement(chartsBarPage.bar(), barIndex)
|
|
748
|
+
.should('have.attr', 'height', expectedHeight)
|
|
749
|
+
.within(() => {
|
|
750
|
+
chartsBarPage.tickIconWrapper()
|
|
751
|
+
.should('be.visible')
|
|
752
|
+
.and('have.class', 'correct-option-icon');
|
|
753
|
+
});
|
|
754
|
+
});
|
|
755
|
+
},
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Verify that all bars have the expected values and tick icons in a specific answer section
|
|
759
|
+
* @param {Object[]} barsData - Array of bar properties objects
|
|
760
|
+
* @param {number} barsData[].barIndex - Index of the bar
|
|
761
|
+
* @param {number} barsData[].barValue - Expected value/height of the bar
|
|
762
|
+
* @param {number} barsData[].range - Maximum value of the axis
|
|
763
|
+
* @param {number} sectionIndex - Index of the chart section (1 for correct, 2 for alternative)
|
|
764
|
+
* @example verifyAllBarsValueAndTickIconInSpecificSection(barsData, 2)
|
|
765
|
+
*/
|
|
766
|
+
verifyAllBarsValueAndTickIconInSpecificSection: (barsData, sectionIndex) => {
|
|
767
|
+
barsData.forEach(({ barIndex, barValue, range }) => {
|
|
768
|
+
chartsBarPage.steps.verifyBarValueAndTickIconInSpecificSection({ barIndex, barValue, range, sectionIndex });
|
|
769
|
+
});
|
|
770
|
+
},
|
|
771
|
+
|
|
729
772
|
/**
|
|
730
773
|
* Verify the correct/incorrect icon not exists for bar in preview tab
|
|
731
774
|
* @param {number} barIndex index of the bar
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import utilities from "../support/helpers/utilities"
|
|
2
|
-
import { createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, chartsCommonComponent, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, layoutSectionComponent, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, studentViewSettingsLabelComponent } from "./components";
|
|
2
|
+
import { createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, chartsCommonComponent, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, layoutSectionComponent, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, studentViewSettingsLabelComponent, showAlternativeAnswersComponent } from "./components";
|
|
3
3
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
|
4
4
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
5
5
|
import { createItemPage } from "./createItemPage";
|
|
@@ -96,6 +96,8 @@ const selectors = {
|
|
|
96
96
|
//Correct answer section
|
|
97
97
|
correctAnswersLabel: () => cy.get('[class*="CorrectAnswerHeader"]:visible'),
|
|
98
98
|
dotPlotChartCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__ChartWrapper"]').eq(1),
|
|
99
|
+
//alternate answer section
|
|
100
|
+
dotPlotChartAlternateAnswerSection: () => cy.get('[class*="question-preview-wrapper"] [class*="DotPlotChartstyles__ChartWrapper"]').eq(2),
|
|
99
101
|
dotColumnCorrectAnswerSection: () => cy.get('.ngie-chart-point'),
|
|
100
102
|
dotIconCorrectAnswerSection: () => cy.get('.dot-icon'),
|
|
101
103
|
numberLineAxisCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .number-line-wrapper').eq(0),
|
|
@@ -119,6 +121,7 @@ const steps = {
|
|
|
119
121
|
...dialogBoxBase.steps,
|
|
120
122
|
...commonComponents.steps,
|
|
121
123
|
...createItemPage.steps,
|
|
124
|
+
...showAlternativeAnswersComponent.steps,
|
|
122
125
|
|
|
123
126
|
//select chart type
|
|
124
127
|
selectDotPlot: () => {
|
|
@@ -1425,6 +1428,22 @@ const steps = {
|
|
|
1425
1428
|
}
|
|
1426
1429
|
},
|
|
1427
1430
|
|
|
1431
|
+
verifyCorrectDotColumnAlternateAnswerSection: ({ point, min, interval, defaultDots = null }) => {
|
|
1432
|
+
const index = Math.round((point - min) / interval);
|
|
1433
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1434
|
+
.within(() => {
|
|
1435
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1436
|
+
.eq(index)
|
|
1437
|
+
.should('have.class', 'correct-bar-indicator')
|
|
1438
|
+
.should('have.css', 'background-color', css.color.correctAnswerLabelBg)
|
|
1439
|
+
.find('.icon-correct')
|
|
1440
|
+
.should('exist');
|
|
1441
|
+
});
|
|
1442
|
+
if (defaultDots === null) {
|
|
1443
|
+
steps.verifyCorrectDotAlternateAnswerSection({ point, min, interval });
|
|
1444
|
+
}
|
|
1445
|
+
},
|
|
1446
|
+
|
|
1428
1447
|
/**
|
|
1429
1448
|
* Verifies that the empty dot column
|
|
1430
1449
|
* @param {object} options - The options object containing point, min, and interval.
|
|
@@ -1454,6 +1473,28 @@ const steps = {
|
|
|
1454
1473
|
});
|
|
1455
1474
|
},
|
|
1456
1475
|
|
|
1476
|
+
verifyEmptyDotColumnAlternateAnswerSection: ({ point, min, interval }) => {
|
|
1477
|
+
const index = Math.round((point - min) / interval);
|
|
1478
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1479
|
+
.within(() => {
|
|
1480
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1481
|
+
.eq(index)
|
|
1482
|
+
.should('have.not.class', 'correct-bar-indicator')
|
|
1483
|
+
.should('have.css', 'background-color', css.color.transparent)
|
|
1484
|
+
.find('.icon-correct')
|
|
1485
|
+
.should('not.exist');
|
|
1486
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1487
|
+
.eq(index)
|
|
1488
|
+
.should('not.have.class', 'inCorrect-bar-indicator')
|
|
1489
|
+
.find('.icon-incorrect')
|
|
1490
|
+
.should('not.exist');
|
|
1491
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1492
|
+
.eq(index)
|
|
1493
|
+
.find('.dot-icon')
|
|
1494
|
+
.should('not.exist');
|
|
1495
|
+
});
|
|
1496
|
+
},
|
|
1497
|
+
|
|
1457
1498
|
/**
|
|
1458
1499
|
* Verifies that the correct dot exists in the specified column
|
|
1459
1500
|
* @param {object} options - The options object containing point, min, and interval.
|
|
@@ -1477,6 +1518,22 @@ const steps = {
|
|
|
1477
1518
|
});
|
|
1478
1519
|
},
|
|
1479
1520
|
|
|
1521
|
+
verifyCorrectDotAlternateAnswerSection: ({ point, min, interval }) => {
|
|
1522
|
+
const index = Math.round((point - min) / interval);
|
|
1523
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1524
|
+
.within(() => {
|
|
1525
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1526
|
+
.eq(index)
|
|
1527
|
+
.within(() => {
|
|
1528
|
+
chartsDotPlotPage.dotIconCorrectAnswerSection()
|
|
1529
|
+
.each((el) => {
|
|
1530
|
+
cy.wrap(el)
|
|
1531
|
+
.should('have.css', 'background-color', css.color.correctAnswer)
|
|
1532
|
+
});
|
|
1533
|
+
});
|
|
1534
|
+
});
|
|
1535
|
+
},
|
|
1536
|
+
|
|
1480
1537
|
/**
|
|
1481
1538
|
* Verifies that the default dot exists in the specified column
|
|
1482
1539
|
* @param {object} options - The options object containing point, min, and interval.
|
|
@@ -1500,6 +1557,22 @@ const steps = {
|
|
|
1500
1557
|
});
|
|
1501
1558
|
},
|
|
1502
1559
|
|
|
1560
|
+
verifyDefaultDotAlternateAnswerSection: ({ point, min, interval }) => {
|
|
1561
|
+
const index = Math.round((point - min) / interval);
|
|
1562
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1563
|
+
.within(() => {
|
|
1564
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1565
|
+
.eq(index)
|
|
1566
|
+
.within(() => {
|
|
1567
|
+
chartsDotPlotPage.dotIconCorrectAnswerSection()
|
|
1568
|
+
.each((el) => {
|
|
1569
|
+
cy.wrap(el)
|
|
1570
|
+
.should('have.css', 'background-color', css.color.activeButtons)
|
|
1571
|
+
});
|
|
1572
|
+
});
|
|
1573
|
+
});
|
|
1574
|
+
},
|
|
1575
|
+
|
|
1503
1576
|
/**
|
|
1504
1577
|
* Verify the dot column is locked in preview tab
|
|
1505
1578
|
* @param {number} index index of the dot column
|
|
@@ -1514,6 +1587,16 @@ const steps = {
|
|
|
1514
1587
|
});
|
|
1515
1588
|
},
|
|
1516
1589
|
|
|
1590
|
+
verifyDotColumnIsLockedInAlternateAnswerSection: ({ point, min, interval }) => {
|
|
1591
|
+
const index = Math.round((point - min) / interval);
|
|
1592
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1593
|
+
.within(() => {
|
|
1594
|
+
utilities.getNthElement(chartsDotPlotPage.dotColumnCorrectAnswerSection(), index)
|
|
1595
|
+
.find('[class*="LockIconWrapper"]')
|
|
1596
|
+
.should('exist');
|
|
1597
|
+
});
|
|
1598
|
+
},
|
|
1599
|
+
|
|
1517
1600
|
/**
|
|
1518
1601
|
* Verifies the expected number of dots
|
|
1519
1602
|
* @param {number} expectedDotCount - The expected number of dots.
|
|
@@ -1594,6 +1677,21 @@ const steps = {
|
|
|
1594
1677
|
steps.verifyDefaultDotCorrectAnswerSection({ point, min, interval });
|
|
1595
1678
|
},
|
|
1596
1679
|
|
|
1680
|
+
verifyLockedDotColumnAlternateAnswerSection: ({ point, min, interval }) => {
|
|
1681
|
+
const index = Math.round((point - min) / interval);
|
|
1682
|
+
chartsDotPlotPage.dotPlotChartAlternateAnswerSection()
|
|
1683
|
+
.within(() => {
|
|
1684
|
+
chartsDotPlotPage.dotColumnCorrectAnswerSection()
|
|
1685
|
+
.eq(index)
|
|
1686
|
+
.should('not.have.class', 'correct-bar-indicator')
|
|
1687
|
+
.and('not.have.class', 'inCorrect-bar-indicator')
|
|
1688
|
+
.and('not.have.css', 'background-color', css.color.correctAnswerLabelBg)
|
|
1689
|
+
.and('not.have.css', 'background-color', css.color.correctAnswerLabelBg)
|
|
1690
|
+
});
|
|
1691
|
+
steps.verifyDotColumnIsLockedInAlternateAnswerSection({ point, min, interval });
|
|
1692
|
+
steps.verifyDefaultDotAlternateAnswerSection({ point, min, interval });
|
|
1693
|
+
},
|
|
1694
|
+
|
|
1597
1695
|
/**
|
|
1598
1696
|
* @param {number} points - The points to be allotted.
|
|
1599
1697
|
* @description - Allots points in the scoring section.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import utilities from "../support/helpers/utilities";
|
|
2
|
-
import { additionalSettingsAccessibilitySectionComponent, additionalSettingsPanel, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, barAndLineChartComponent, chartsCommonComponent, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, layoutSectionComponent } from "./components";
|
|
2
|
+
import { additionalSettingsAccessibilitySectionComponent, additionalSettingsPanel, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, barAndLineChartComponent, chartsCommonComponent, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, layoutSectionComponent, showAlternativeAnswersComponent } from "./components";
|
|
3
3
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
4
4
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
|
5
5
|
import { createItemPage } from "./createItemPage";
|
|
@@ -17,6 +17,7 @@ const selectors = {
|
|
|
17
17
|
...chartsCommonComponent,
|
|
18
18
|
...layoutSectionComponent,
|
|
19
19
|
...autoScoredSpecifyCorrectAnswerSection,
|
|
20
|
+
...showAlternativeAnswersComponent,
|
|
20
21
|
point: () => cy.get('.ngie-chart-point'),
|
|
21
22
|
selectChartTypePoint: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] .ngie-chart-point'),
|
|
22
23
|
pointLockIcon: () => cy.get('[class*="ChartGridstyle__LineLockIconWrapper"]'),
|
|
@@ -54,6 +55,7 @@ const steps = {
|
|
|
54
55
|
...commonComponents.steps,
|
|
55
56
|
...createItemPage.steps,
|
|
56
57
|
...layoutSectionComponent.steps,
|
|
58
|
+
...showAlternativeAnswersComponent.steps,
|
|
57
59
|
|
|
58
60
|
/**
|
|
59
61
|
* @description set the point height/value in the select chart type section chart
|
|
@@ -345,6 +347,23 @@ const steps = {
|
|
|
345
347
|
});
|
|
346
348
|
},
|
|
347
349
|
|
|
350
|
+
/**
|
|
351
|
+
* Verify the point value in correct answer section tab
|
|
352
|
+
* @param {Object} pointProperties - The properties of the point
|
|
353
|
+
* @param {number} pointProperties.pointIndex index of the point
|
|
354
|
+
* @param {number} pointProperties.value Height of the point as per the axis
|
|
355
|
+
* @param {number} pointProperties.range Maximum value of the axis on which point value is determined
|
|
356
|
+
*/
|
|
357
|
+
verifyPointValueInAlternativeAnswerSection: ({ pointIndex, value, range }) => {
|
|
358
|
+
let pointValue = value / range
|
|
359
|
+
chartsLinePage.previewTabChartWrapper()
|
|
360
|
+
.eq(2)
|
|
361
|
+
.within(() => {
|
|
362
|
+
utilities.getNthElement(chartsLinePage.point(), pointIndex)
|
|
363
|
+
.should('have.attr', 'height', pointValue);
|
|
364
|
+
});
|
|
365
|
+
},
|
|
366
|
+
|
|
348
367
|
/**
|
|
349
368
|
* Verify the correct/incorrect icon of point in correct answer section
|
|
350
369
|
* @param {number} pointIndex index of the point
|
|
@@ -379,6 +398,17 @@ const steps = {
|
|
|
379
398
|
});
|
|
380
399
|
},
|
|
381
400
|
|
|
401
|
+
verifyPointCorrectIncorrectIconNotExistsInAlternativeAnswerSection: (pointIndex) => {
|
|
402
|
+
chartsLinePage.previewTabChartWrapper()
|
|
403
|
+
.eq(2)
|
|
404
|
+
.within(() => {
|
|
405
|
+
utilities.getNthElement(chartsLinePage.point(), pointIndex)
|
|
406
|
+
.within(() => {
|
|
407
|
+
utilities.verifyElementVisibilityState(chartsLinePage.tickIconWrapper(), 'notExist');
|
|
408
|
+
});
|
|
409
|
+
});
|
|
410
|
+
},
|
|
411
|
+
|
|
382
412
|
/**
|
|
383
413
|
* Verify the correct/incorrect icon of point in preview tab
|
|
384
414
|
* @param {number} pointIndex index of the point
|
|
@@ -431,6 +461,12 @@ const steps = {
|
|
|
431
461
|
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInCorrectAnswerSection(pointIndex);
|
|
432
462
|
},
|
|
433
463
|
|
|
464
|
+
verifyLockedPointInAlternativeAnswerSection: ({ pointIndex, value, range }) => {
|
|
465
|
+
chartsLinePage.steps.verifyPointValueInAlternativeAnswerSection({ pointIndex: pointIndex, value: value, range: range });
|
|
466
|
+
chartsLinePage.steps.verifyPointIsLockedInAlternativeAnswerSection(pointIndex);
|
|
467
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInAlternativeAnswerSection(pointIndex);
|
|
468
|
+
},
|
|
469
|
+
|
|
434
470
|
/**
|
|
435
471
|
* Verify the point is locked in correct answer section
|
|
436
472
|
* @param {number} pointIndex index of the point
|
|
@@ -446,6 +482,17 @@ const steps = {
|
|
|
446
482
|
});
|
|
447
483
|
},
|
|
448
484
|
|
|
485
|
+
verifyPointIsLockedInAlternativeAnswerSection: (pointIndex) => {
|
|
486
|
+
chartsLinePage.previewTabChartWrapper()
|
|
487
|
+
.eq(2)
|
|
488
|
+
.within(() => {
|
|
489
|
+
utilities.getNthElement(chartsLinePage.point(), pointIndex)
|
|
490
|
+
.within(() => {
|
|
491
|
+
utilities.verifyElementVisibilityState(chartsLinePage.pointLockIcon(), 'visible');
|
|
492
|
+
});
|
|
493
|
+
});
|
|
494
|
+
},
|
|
495
|
+
|
|
449
496
|
|
|
450
497
|
/**
|
|
451
498
|
* verify the displayed penalty points for each incorrect point
|