itemengine-cypress-automation 1.0.573-IEI-7065-Improve-test-coverage-for-essay-response-c25d1ee.0 → 1.0.573-IEI-7079-ed54ea2.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 +24 -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/EssayResponse/additionalSettings.js +2 -8
- package/cypress/e2e/ILC/EssayResponse/additionalSettingsBasic.js +0 -15
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +1 -14
- package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +5 -155
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +4 -116
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +0 -93
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions4.js +0 -114
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -11
- package/cypress/e2e/ILC/EssayResponse/previewAddTable.js +2 -29
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +1 -11
- package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +0 -75
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +0 -13
- package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +0 -71
- 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 +24 -14
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +26 -16
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +25 -15
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -10
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +24 -13
- package/cypress/pages/chartsBarPage.js +44 -1
- package/cypress/pages/chartsDotPlotPage.js +99 -1
- package/cypress/pages/chartsLinePage.js +48 -1
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +0 -21
- package/cypress/pages/components/essayResponseCommonComponents.js +1 -20
- package/cypress/pages/essayResponsePage.js +0 -2
- package/package.json +1 -1
|
@@ -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
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
|
2
2
|
import { equationEditorCategoriesAndSymbols } from "../../fixtures/equationEditorCategoriesAndSymbols ";
|
|
3
3
|
import { equationEditorFlyout, commonComponents, essayResponseCommonComponents, createQuestionBasePage, autoScoredScoringPreviewTab } from "../components";
|
|
4
|
-
//import { essayResponsePage } from "../essayResponsePage";
|
|
5
4
|
const css = Cypress.env('css');
|
|
6
5
|
const allCategories = Object.values(equationEditorCategoriesAndSymbols)
|
|
7
6
|
const defaultSelectedCategories = ['Numpad', 'Keypad', 'Intermediate', 'Primary', 'General', 'Common', 'Algebra', 'Geo', 'Compare', 'Matrices'];
|
|
@@ -334,26 +333,6 @@ const tests = {
|
|
|
334
333
|
equationEditorSectionCommonComponent.steps.verifyResponseFieldEquationTextNew(0, 'x+5×0');
|
|
335
334
|
}
|
|
336
335
|
});
|
|
337
|
-
|
|
338
|
-
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', () => {
|
|
339
|
-
if (questionType === 'essay response') {
|
|
340
|
-
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
341
|
-
essayResponsePage.steps.switchToPreviewTab();
|
|
342
|
-
equationEditorSectionCommonComponent.steps.openResponseFieldEquationContainerEquationEditor(0);
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
equationEditorSectionCommonComponent.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
|
346
|
-
}
|
|
347
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('{backspace}{backspace}');
|
|
348
|
-
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['multiply', 'zero'] }]);
|
|
349
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
350
|
-
if (questionType === 'essay response') {
|
|
351
|
-
equationEditorSectionCommonComponent.steps.verifyResponseFieldEquationText(0, 'x+5×0');
|
|
352
|
-
}
|
|
353
|
-
else {
|
|
354
|
-
equationEditorSectionCommonComponent.steps.verifyResponseFieldEquationTextNew(0, 'x+5×0');
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
336
|
},
|
|
358
337
|
|
|
359
338
|
/**
|
|
@@ -96,8 +96,7 @@ 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"]')
|
|
100
|
-
wordCharacterLimitWrapper: () => cy.get('.essay-character-view-wrapper')
|
|
99
|
+
limitReachedWarningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]')
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
const steps = {
|
|
@@ -203,24 +202,6 @@ const steps = {
|
|
|
203
202
|
.should('be.checked');
|
|
204
203
|
},
|
|
205
204
|
|
|
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
|
-
|
|
224
205
|
verifyListItemLengthInResponseField: (length) => {
|
|
225
206
|
essayResponseCommonComponents.responseField()
|
|
226
207
|
.find('li')
|
|
@@ -19,7 +19,6 @@ const selectors = {
|
|
|
19
19
|
...customizeSpecialCharacterComponent,
|
|
20
20
|
...dialogBoxBase,
|
|
21
21
|
...equationEditorSectionCommonComponent,
|
|
22
|
-
...autoScoredScoringPreviewTab,
|
|
23
22
|
//Basic section
|
|
24
23
|
displayWordLimitLabel: () => cy.get('#Display-word-limit-dropdown-label'),
|
|
25
24
|
displayWordLimitDropdown: () => cy.get('#Display-word-limit-select'),
|
|
@@ -143,7 +142,6 @@ const steps = {
|
|
|
143
142
|
...dialogBoxBase.steps,
|
|
144
143
|
...equationEditorSectionCommonComponent.steps,
|
|
145
144
|
...createItemPage.steps,
|
|
146
|
-
...autoScoredScoringPreviewTab.steps,
|
|
147
145
|
|
|
148
146
|
clickOnSpecialCharactersPopupCloseButton: () => {
|
|
149
147
|
essayResponsePage.specialCharactersPopupCloseButton()
|