itemengine-cypress-automation 1.0.576-IEI-7079-92d877f.0 → 1.0.576
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 +0 -205
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -205
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +0 -205
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -248
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -247
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -223
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -223
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -175
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -223
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +0 -191
- package/cypress/e2e/ILC/ChartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePointsLocked.js +24 -184
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +0 -177
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -206
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +0 -205
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -228
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +1 -229
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -229
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -206
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -183
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -206
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePointsLocked.js +0 -184
- package/cypress/e2e/ILC/EssayResponse/additionalSettings.js +8 -2
- package/cypress/e2e/ILC/EssayResponse/additionalSettingsBasic.js +15 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +13 -0
- package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +155 -5
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +117 -4
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +101 -4
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions4.js +114 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +12 -2
- package/cypress/e2e/ILC/EssayResponse/previewAddTable.js +38 -3
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +41 -23
- package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +78 -3
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +15 -0
- package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +71 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +10 -164
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +11 -165
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +11 -165
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +14 -164
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +10 -121
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -167
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +15 -178
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +10 -121
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +13 -165
- package/cypress/pages/chartsBarPage.js +1 -44
- package/cypress/pages/chartsDotPlotPage.js +1 -99
- package/cypress/pages/chartsLinePage.js +1 -48
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +20 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +29 -1
- package/cypress/pages/essayResponsePage.js +3 -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
|
|
2
|
+
import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, studentViewSettingsLabelComponent, layoutSectionComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
|
|
3
3
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
|
4
4
|
import { createItemPage } from "./createItemPage";
|
|
5
5
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
@@ -20,7 +20,6 @@ const selectors = {
|
|
|
20
20
|
...selectQuestionResourceToolPage,
|
|
21
21
|
...autoScoredScoringSectionMultiResponseType,
|
|
22
22
|
...chartsCommonComponent,
|
|
23
|
-
...showAlternativeAnswersComponent,
|
|
24
23
|
|
|
25
24
|
barDragHandle: () => cy.get('.bar-drag-handle'),
|
|
26
25
|
bar: () => cy.get('.ngie-chart-point'),
|
|
@@ -94,7 +93,6 @@ const steps = {
|
|
|
94
93
|
...selectQuestionResourceToolPage.steps,
|
|
95
94
|
...commonComponents.steps,
|
|
96
95
|
...createItemPage.steps,
|
|
97
|
-
...showAlternativeAnswersComponent.steps,
|
|
98
96
|
|
|
99
97
|
/**
|
|
100
98
|
* @description set the bar height/value in the select chart type section chart
|
|
@@ -728,47 +726,6 @@ const steps = {
|
|
|
728
726
|
});
|
|
729
727
|
},
|
|
730
728
|
|
|
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
|
-
|
|
772
729
|
/**
|
|
773
730
|
* Verify the correct/incorrect icon not exists for bar in preview tab
|
|
774
731
|
* @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
|
|
2
|
+
import { createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, chartsCommonComponent, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, layoutSectionComponent, autoScoredSpecifyCorrectAnswerSection, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, studentViewSettingsLabelComponent } from "./components";
|
|
3
3
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
|
4
4
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
5
5
|
import { createItemPage } from "./createItemPage";
|
|
@@ -96,8 +96,6 @@ 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),
|
|
101
99
|
dotColumnCorrectAnswerSection: () => cy.get('.ngie-chart-point'),
|
|
102
100
|
dotIconCorrectAnswerSection: () => cy.get('.dot-icon'),
|
|
103
101
|
numberLineAxisCorrectAnswerSection: () => cy.get('[class*="question-preview-wrapper"] .number-line-wrapper').eq(0),
|
|
@@ -121,7 +119,6 @@ const steps = {
|
|
|
121
119
|
...dialogBoxBase.steps,
|
|
122
120
|
...commonComponents.steps,
|
|
123
121
|
...createItemPage.steps,
|
|
124
|
-
...showAlternativeAnswersComponent.steps,
|
|
125
122
|
|
|
126
123
|
//select chart type
|
|
127
124
|
selectDotPlot: () => {
|
|
@@ -1428,22 +1425,6 @@ const steps = {
|
|
|
1428
1425
|
}
|
|
1429
1426
|
},
|
|
1430
1427
|
|
|
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
|
-
|
|
1447
1428
|
/**
|
|
1448
1429
|
* Verifies that the empty dot column
|
|
1449
1430
|
* @param {object} options - The options object containing point, min, and interval.
|
|
@@ -1473,28 +1454,6 @@ const steps = {
|
|
|
1473
1454
|
});
|
|
1474
1455
|
},
|
|
1475
1456
|
|
|
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
|
-
|
|
1498
1457
|
/**
|
|
1499
1458
|
* Verifies that the correct dot exists in the specified column
|
|
1500
1459
|
* @param {object} options - The options object containing point, min, and interval.
|
|
@@ -1518,22 +1477,6 @@ const steps = {
|
|
|
1518
1477
|
});
|
|
1519
1478
|
},
|
|
1520
1479
|
|
|
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
|
-
|
|
1537
1480
|
/**
|
|
1538
1481
|
* Verifies that the default dot exists in the specified column
|
|
1539
1482
|
* @param {object} options - The options object containing point, min, and interval.
|
|
@@ -1557,22 +1500,6 @@ const steps = {
|
|
|
1557
1500
|
});
|
|
1558
1501
|
},
|
|
1559
1502
|
|
|
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
|
-
|
|
1576
1503
|
/**
|
|
1577
1504
|
* Verify the dot column is locked in preview tab
|
|
1578
1505
|
* @param {number} index index of the dot column
|
|
@@ -1587,16 +1514,6 @@ const steps = {
|
|
|
1587
1514
|
});
|
|
1588
1515
|
},
|
|
1589
1516
|
|
|
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
|
-
|
|
1600
1517
|
/**
|
|
1601
1518
|
* Verifies the expected number of dots
|
|
1602
1519
|
* @param {number} expectedDotCount - The expected number of dots.
|
|
@@ -1677,21 +1594,6 @@ const steps = {
|
|
|
1677
1594
|
steps.verifyDefaultDotCorrectAnswerSection({ point, min, interval });
|
|
1678
1595
|
},
|
|
1679
1596
|
|
|
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
|
-
|
|
1695
1597
|
/**
|
|
1696
1598
|
* @param {number} points - The points to be allotted.
|
|
1697
1599
|
* @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
|
|
2
|
+
import { additionalSettingsAccessibilitySectionComponent, additionalSettingsPanel, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, barAndLineChartComponent, chartsCommonComponent, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, layoutSectionComponent } from "./components";
|
|
3
3
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
4
4
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
|
5
5
|
import { createItemPage } from "./createItemPage";
|
|
@@ -17,7 +17,6 @@ const selectors = {
|
|
|
17
17
|
...chartsCommonComponent,
|
|
18
18
|
...layoutSectionComponent,
|
|
19
19
|
...autoScoredSpecifyCorrectAnswerSection,
|
|
20
|
-
...showAlternativeAnswersComponent,
|
|
21
20
|
point: () => cy.get('.ngie-chart-point'),
|
|
22
21
|
selectChartTypePoint: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] .ngie-chart-point'),
|
|
23
22
|
pointLockIcon: () => cy.get('[class*="ChartGridstyle__LineLockIconWrapper"]'),
|
|
@@ -55,7 +54,6 @@ const steps = {
|
|
|
55
54
|
...commonComponents.steps,
|
|
56
55
|
...createItemPage.steps,
|
|
57
56
|
...layoutSectionComponent.steps,
|
|
58
|
-
...showAlternativeAnswersComponent.steps,
|
|
59
57
|
|
|
60
58
|
/**
|
|
61
59
|
* @description set the point height/value in the select chart type section chart
|
|
@@ -347,23 +345,6 @@ const steps = {
|
|
|
347
345
|
});
|
|
348
346
|
},
|
|
349
347
|
|
|
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
|
-
|
|
367
348
|
/**
|
|
368
349
|
* Verify the correct/incorrect icon of point in correct answer section
|
|
369
350
|
* @param {number} pointIndex index of the point
|
|
@@ -398,17 +379,6 @@ const steps = {
|
|
|
398
379
|
});
|
|
399
380
|
},
|
|
400
381
|
|
|
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
|
-
|
|
412
382
|
/**
|
|
413
383
|
* Verify the correct/incorrect icon of point in preview tab
|
|
414
384
|
* @param {number} pointIndex index of the point
|
|
@@ -461,12 +431,6 @@ const steps = {
|
|
|
461
431
|
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInCorrectAnswerSection(pointIndex);
|
|
462
432
|
},
|
|
463
433
|
|
|
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
|
-
|
|
470
434
|
/**
|
|
471
435
|
* Verify the point is locked in correct answer section
|
|
472
436
|
* @param {number} pointIndex index of the point
|
|
@@ -482,17 +446,6 @@ const steps = {
|
|
|
482
446
|
});
|
|
483
447
|
},
|
|
484
448
|
|
|
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
|
-
|
|
496
449
|
|
|
497
450
|
/**
|
|
498
451
|
* verify the displayed penalty points for each incorrect point
|
|
@@ -333,6 +333,26 @@ const tests = {
|
|
|
333
333
|
equationEditorSectionCommonComponent.steps.verifyResponseFieldEquationTextNew(0, 'x+5×0');
|
|
334
334
|
}
|
|
335
335
|
});
|
|
336
|
+
|
|
337
|
+
it('When user edits the added equation and clicks on Ok button, the edited equation should be displayed in the preview input field in item preview', () => {
|
|
338
|
+
if (questionType === 'essay response') {
|
|
339
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
340
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
341
|
+
equationEditorSectionCommonComponent.steps.openResponseFieldEquationContainerEquationEditor(0);
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
equationEditorSectionCommonComponent.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
|
345
|
+
}
|
|
346
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('{backspace}{backspace}');
|
|
347
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['multiply', 'zero'] }]);
|
|
348
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
|
349
|
+
if (questionType === 'essay response') {
|
|
350
|
+
equationEditorSectionCommonComponent.steps.verifyResponseFieldEquationText(0, 'x+5×0');
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
equationEditorSectionCommonComponent.steps.verifyResponseFieldEquationTextNew(0, 'x+5×0');
|
|
354
|
+
}
|
|
355
|
+
});
|
|
336
356
|
},
|
|
337
357
|
|
|
338
358
|
/**
|
|
@@ -96,7 +96,8 @@ const selectors = {
|
|
|
96
96
|
customSpecialCharacterLabel: () => cy.get('[class*="InlineTextFieldWithDebouncestyles__PropertyLabel"]').eq(1),
|
|
97
97
|
customSpecialCharacterInputField: () => cy.get('input[aria-label="Custom Special Characters"]'),
|
|
98
98
|
limitReachedWarningMessageContainer: () => cy.get('.disabled-wrapper-cls'),
|
|
99
|
-
limitReachedWarningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]')
|
|
99
|
+
limitReachedWarningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]'),
|
|
100
|
+
wordCharacterLimitWrapper: () => cy.get('.essay-character-view-wrapper')
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
const steps = {
|
|
@@ -202,6 +203,24 @@ const steps = {
|
|
|
202
203
|
.should('be.checked');
|
|
203
204
|
},
|
|
204
205
|
|
|
206
|
+
unCheckAlwaysShowMinimumLimitCheckbox: () => {
|
|
207
|
+
essayResponseCommonComponents.alwaysShowMinLimitCheckBox()
|
|
208
|
+
.click()
|
|
209
|
+
.should('not.be.checked');
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
checkAlwaysShowMaximumLimitCheckbox: () => {
|
|
213
|
+
essayResponseCommonComponents.alwaysShowMaxLimitCheckbox()
|
|
214
|
+
.click()
|
|
215
|
+
.should('be.checked');
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
uncheckAlwaysShowMaximumLimitCheckbox: () => {
|
|
219
|
+
essayResponseCommonComponents.alwaysShowMaxLimitCheckbox()
|
|
220
|
+
.click()
|
|
221
|
+
.should('not.be.checked');
|
|
222
|
+
},
|
|
223
|
+
|
|
205
224
|
verifyListItemLengthInResponseField: (length) => {
|
|
206
225
|
essayResponseCommonComponents.responseField()
|
|
207
226
|
.find('li')
|
|
@@ -458,6 +477,15 @@ const steps = {
|
|
|
458
477
|
.should('have.attr', 'aria-pressed', 'false');
|
|
459
478
|
},
|
|
460
479
|
|
|
480
|
+
/**
|
|
481
|
+
* This function verifies the formatting option is in collapsed state
|
|
482
|
+
* @param {string} formattingOption name of the formatting option
|
|
483
|
+
*/
|
|
484
|
+
verifyPreviewTabToolbarOptionNotExpanded: (formattingOption) => {
|
|
485
|
+
essayResponseCommonComponents.previewTabToolbarOption(formattingOption)
|
|
486
|
+
.should('have.attr', 'aria-expanded', 'false');
|
|
487
|
+
},
|
|
488
|
+
|
|
461
489
|
/**
|
|
462
490
|
* This function verifies the formatting option is in selected state
|
|
463
491
|
* @param {string} formattingOption name of the formatting option
|
|
@@ -19,6 +19,7 @@ const selectors = {
|
|
|
19
19
|
...customizeSpecialCharacterComponent,
|
|
20
20
|
...dialogBoxBase,
|
|
21
21
|
...equationEditorSectionCommonComponent,
|
|
22
|
+
...autoScoredScoringPreviewTab,
|
|
22
23
|
//Basic section
|
|
23
24
|
displayWordLimitLabel: () => cy.get('#Display-word-limit-dropdown-label'),
|
|
24
25
|
displayWordLimitDropdown: () => cy.get('#Display-word-limit-select'),
|
|
@@ -37,7 +38,7 @@ const selectors = {
|
|
|
37
38
|
|
|
38
39
|
//Special characters
|
|
39
40
|
specialCharactersPopupTitle: () => cy.get('#alert-dialog-title'),
|
|
40
|
-
specialCharactersPopupCloseButton: () => cy.get('[class*="close-button"]'),
|
|
41
|
+
specialCharactersPopupCloseButton: () => cy.get('[class*="dialog-close-button"]'),
|
|
41
42
|
specialCharactersPopupCharactersCategoryWrapper: () => cy.get('.special-character-accordion'),
|
|
42
43
|
specialCharactersPopupCharacterSymbol: (ariaLabel = null) => {
|
|
43
44
|
if (ariaLabel) {
|
|
@@ -142,6 +143,7 @@ const steps = {
|
|
|
142
143
|
...dialogBoxBase.steps,
|
|
143
144
|
...equationEditorSectionCommonComponent.steps,
|
|
144
145
|
...createItemPage.steps,
|
|
146
|
+
...autoScoredScoringPreviewTab.steps,
|
|
145
147
|
|
|
146
148
|
clickOnSpecialCharactersPopupCloseButton: () => {
|
|
147
149
|
essayResponsePage.specialCharactersPopupCloseButton()
|