itemengine-cypress-automation 1.0.167-repoUpdate10April-1465c8c.0 → 1.0.169-uploadResponseMigration-83ab996.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +11 -22
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +7 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +6 -11
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +36 -2
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +34 -22
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +24 -8
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +25 -5
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +114 -68
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +111 -67
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +123 -71
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +63 -41
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +25 -21
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +85 -50
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -68
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +98 -54
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +120 -72
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
- package/cypress/fixtures/theme/ilc.json +26 -14
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +0 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +2 -2
- package/cypress/pages/components/gridQuestionCommonComponent.js +2 -629
- package/cypress/pages/components/index.js +0 -3
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/measuringToolComponent.js +2 -2
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +4 -6
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +3 -60
- package/cypress/pages/components/toolSettingsComponent.js +12 -80
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +8 -0
- package/cypress/pages/feedbackScalePage.js +449 -591
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -3
- package/cypress/pages/graphingPage.js +145 -9
- package/cypress/pages/gridFillPage.js +120 -135
- package/cypress/pages/highlightPage.js +394 -0
- package/cypress/pages/index.js +2 -5
- package/cypress/pages/matchingPage.js +20 -78
- package/cypress/pages/multipleSelectionGridPage.js +1 -88
- package/cypress/pages/singleSelectionGridPage.js +0 -86
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +38 -1
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
- package/cypress/support/migrationHelpers/migrationScript.js +4 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +34 -2
- package/package.json +1 -1
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +0 -83
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +0 -200
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +0 -56
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -95
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +0 -71
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +0 -72
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +0 -71
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +0 -308
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +0 -216
- package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +0 -336
- package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +0 -570
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +0 -214
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -355
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +0 -309
- package/cypress/e2e/ILC/Matching/toolSettings.js +0 -72
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +0 -1033
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +0 -236
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -239
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -278
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +0 -178
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +0 -407
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +0 -273
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +0 -278
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +0 -228
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +0 -120
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +0 -659
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +0 -149
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +0 -151
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -171
- package/cypress/e2e/ILC/NumberLine/headerSection.js +0 -76
- package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -54
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +0 -200
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +0 -67
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +0 -135
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +0 -73
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +0 -372
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +0 -1014
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -457
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -155
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -314
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -275
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -314
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -290
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -142
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +0 -137
- package/cypress/pages/brainingCampManipulativePage.js +0 -122
- package/cypress/pages/components/defaultToolDropdown.js +0 -77
- package/cypress/pages/components/resetPopupComponent.js +0 -74
- package/cypress/pages/components/toolsAndControlsComponent.js +0 -69
- package/cypress/pages/feedbackScalePage copy.js +0 -716
- package/cypress/pages/numberLinePage.js +0 -723
- package/cypress/pages/textSelectionPage.js +0 -582
@@ -324,13 +324,11 @@ const steps = {
|
|
324
324
|
.and('match', /0px none/);
|
325
325
|
},
|
326
326
|
|
327
|
-
clickAndDropOptionInOptionsContainerInPreviewTab: (optionText
|
327
|
+
clickAndDropOptionInOptionsContainerInPreviewTab: (optionText) => {
|
328
328
|
fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
|
329
329
|
.contains(optionText)
|
330
330
|
.click();
|
331
331
|
draggableOptionContainer.optionsContainerPreviewTab()
|
332
|
-
.find('.item-list')
|
333
|
-
.eq(groupIndex)
|
334
332
|
.click({ force: true });
|
335
333
|
},
|
336
334
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import utilities from "../support/helpers/utilities";
|
2
|
-
import { questionInstructionsComponent, createQuestionBasePage, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, backgroundImageUploadComponent, imageCanvasComponent, opacityComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent
|
2
|
+
import { questionInstructionsComponent, createQuestionBasePage, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, backgroundImageUploadComponent, imageCanvasComponent, opacityComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
|
3
|
+
import { dialogBoxBase } from "./dialogBoxBase";
|
3
4
|
const css = Cypress.env('css');
|
4
5
|
|
5
6
|
const selectors = {
|
@@ -13,9 +14,6 @@ const selectors = {
|
|
13
14
|
...autoScoredScoringSectionMultiResponseType,
|
14
15
|
...autoScoredSpecifyCorrectAnswerSection,
|
15
16
|
...additionalSettingsPanel,
|
16
|
-
...toolsAndControlsComponent,
|
17
|
-
...resetPopupComponent,
|
18
|
-
...defaultToolDropdown,
|
19
17
|
|
20
18
|
//Edit tab
|
21
19
|
graphEditTab: () => cy.get('[class*="GraphingWrapper"] .ngie-jxgbox svg'),
|
@@ -48,8 +46,30 @@ const selectors = {
|
|
48
46
|
return cy.get('[class*="GraphingWrapper"] .ngie-jxgbox .JXGtext')
|
49
47
|
}
|
50
48
|
},
|
49
|
+
toolsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__ToolbarLabel"]').eq(0),
|
51
50
|
xAxisLabelGraphEditTab: () => cy.get('.graph-left-wrapper .title-casing'),
|
52
51
|
yAxisLabelGraphEditTab: () => cy.get('.graph-footer .title-casing'),
|
52
|
+
controlsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__ToolbarLabel"]').eq(1),
|
53
|
+
toolOptions: (toolOptionAriaLabel = null) => {
|
54
|
+
if (toolOptionAriaLabel) {
|
55
|
+
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.icon-button-custom-format[aria-label*="${toolOptionAriaLabel}"]`)
|
56
|
+
} else {
|
57
|
+
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.icon-button-custom-format`)
|
58
|
+
}
|
59
|
+
},
|
60
|
+
toolOptionsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`[class*="DragItemstyles__LabelWrapper"]`),
|
61
|
+
toolOptionsTickIcon: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(0).find(`.tick-icon-wrapper`),
|
62
|
+
controlsOptionsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`[class*="DragItemstyles__LabelWrapper"]`),
|
63
|
+
controlsTickIcon: () => cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`.tick-icon-wrapper`),
|
64
|
+
defaultToolDropdownLabel: () => cy.get('#Default-tool-dropdown-label'),
|
65
|
+
defaultToolDropdown: () => cy.get('#Default-tool-select'),
|
66
|
+
defaultToolDropdownOptions: (dropdownOption = null) => {
|
67
|
+
if (dropdownOption) {
|
68
|
+
return cy.get(`[aria-labelledby*="Default-tool-dropdown-label"] [role="option"][aria-label*="${dropdownOption}"]`)
|
69
|
+
} else {
|
70
|
+
return cy.get('[aria-labelledby*="Default-tool-dropdown-label"] [role="option"]')
|
71
|
+
}
|
72
|
+
},
|
53
73
|
graphToolOptionEditTab: (toolOptionAriaLabel = null) => {
|
54
74
|
if (toolOptionAriaLabel) {
|
55
75
|
return cy.get('.graph-tools-wrapper').eq(0).find(`.single-select-toggle-group-double button[aria-label*=${toolOptionAriaLabel}]`)
|
@@ -71,6 +91,13 @@ const selectors = {
|
|
71
91
|
return cy.get('[class*="GraphingQuestion"] .single-select-toggle-group-double button')
|
72
92
|
}
|
73
93
|
},
|
94
|
+
controlOptions: (toolOptionAriaLabel = null) => {
|
95
|
+
if (toolOptionAriaLabel) {
|
96
|
+
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find(`.icon-button-custom-format[aria-label*="${toolOptionAriaLabel}"]`)
|
97
|
+
} else {
|
98
|
+
return cy.get('[class*="CustomizedToolBarOptionsstyles__DragAndDropWrapper"]').eq(1).find('.icon-button-custom-format')
|
99
|
+
}
|
100
|
+
},
|
74
101
|
graphControlOptionEditTab: (controlOptionAriaLabel = null) => {
|
75
102
|
if (controlOptionAriaLabel) {
|
76
103
|
return cy.get('[class*="GraphingToolsstyles__ControlsWrapper"]').eq(0).find(`button[aria-label*="${controlOptionAriaLabel}"]`)
|
@@ -224,6 +251,10 @@ const selectors = {
|
|
224
251
|
whatIsThisLabel: () => cy.get('.what-is-wrapper [class*="StyledLink"]'),
|
225
252
|
makeResponsiveHelpText: () => cy.get('[class*="WhatIsThisDescriptionWrapper"]'),
|
226
253
|
|
254
|
+
//Reset popup
|
255
|
+
resetPopupConfirmResetButton: () => cy.get('.accept-button'),
|
256
|
+
resetPopupCancelButton: () => cy.get('.reject-button'),
|
257
|
+
|
227
258
|
//Grading view
|
228
259
|
gradingViewQuestionSineWave: () => cy.get('.ngie-jxgbox').eq(0).find('path[stroke-linecap="butt"][stroke-opacity="1"]'),
|
229
260
|
gradingViewQuestionCircle: () => cy.get('.ngie-jxgbox').eq(0).find('ellipse[stroke-linecap="butt"]'),
|
@@ -255,16 +286,58 @@ const steps = {
|
|
255
286
|
...autoScoredScoringSectionMultiResponseType.steps,
|
256
287
|
...commonComponents.steps,
|
257
288
|
...additionalSettingsPanel.steps,
|
258
|
-
...toolsAndControlsComponent.steps,
|
259
|
-
...resetPopupComponent.steps,
|
260
|
-
...defaultToolDropdown.steps,
|
261
289
|
|
262
290
|
//Edit tab
|
291
|
+
/**
|
292
|
+
* This function selects tool options
|
293
|
+
* @param {string[]} toolOptionAriaLabelArray array aria-label of tool options
|
294
|
+
*/
|
295
|
+
selectToolOptions: (toolOptionAriaLabelArray) => {
|
296
|
+
toolOptionAriaLabelArray.forEach((toolOptionAriaLabel) => {
|
297
|
+
graphingPage.toolOptions(toolOptionAriaLabel)
|
298
|
+
.click();
|
299
|
+
});
|
300
|
+
},
|
301
|
+
|
302
|
+
/**
|
303
|
+
* This function de-selects tool options
|
304
|
+
* @param {string[]} toolOptionAriaLabelArray array aria-label of tool options
|
305
|
+
*/
|
306
|
+
deselectToolOptions: (toolOptionAriaLabelArray) => {
|
307
|
+
toolOptionAriaLabelArray.forEach((toolOptionAriaLabel) => {
|
308
|
+
graphingPage.toolOptions(toolOptionAriaLabel)
|
309
|
+
.click();
|
310
|
+
});
|
311
|
+
},
|
312
|
+
|
313
|
+
/**
|
314
|
+
* This function selects tool options
|
315
|
+
* @param {string[]} controlOptionAriaLabel array aria-label of tool options
|
316
|
+
*/
|
317
|
+
selectControl: (controlOptionAriaLabel) => {
|
318
|
+
graphingPage.controlOptions(controlOptionAriaLabel)
|
319
|
+
.click();
|
320
|
+
},
|
321
|
+
|
322
|
+
/**
|
323
|
+
* This function de-selects tool options
|
324
|
+
* @param {string[]} controlOptionAriaLabel array aria-label of tool options
|
325
|
+
*/
|
326
|
+
deselectControl: (controlOptionAriaLabel) => {
|
327
|
+
graphingPage.controlOptions(controlOptionAriaLabel)
|
328
|
+
.click();
|
329
|
+
},
|
330
|
+
|
263
331
|
checkPatternBackground: () => {
|
264
332
|
graphingPage.patternRadioButton()
|
265
333
|
.click();
|
266
334
|
},
|
267
335
|
|
336
|
+
expandDefaultToolDropdown: () => {
|
337
|
+
graphingPage.defaultToolDropdown()
|
338
|
+
.click();
|
339
|
+
},
|
340
|
+
|
268
341
|
/**
|
269
342
|
* This function verifies checked state of radio buttons
|
270
343
|
* @param {('Blank canvas'|'Image'|'Pattern')} radioButton
|
@@ -334,6 +407,15 @@ const steps = {
|
|
334
407
|
})
|
335
408
|
},
|
336
409
|
|
410
|
+
/**
|
411
|
+
* This function selects dropdown option from default tool dropdown
|
412
|
+
* @param {string} dropdownOption aria-label of the dropdown option
|
413
|
+
*/
|
414
|
+
selectOptionFromDefaultToolDropdown: (dropdownOption) => {
|
415
|
+
graphingPage.defaultToolDropdownOptions(dropdownOption)
|
416
|
+
.click();
|
417
|
+
},
|
418
|
+
|
337
419
|
/**
|
338
420
|
* @param {string} fileFormat format of the uploaded file in the graph
|
339
421
|
* @description this function verifies the attribute of the image has the expected file format
|
@@ -1596,6 +1678,16 @@ const steps = {
|
|
1596
1678
|
.should('have.text', input);
|
1597
1679
|
},
|
1598
1680
|
|
1681
|
+
confirmReset: () => {
|
1682
|
+
graphingPage.resetPopupConfirmResetButton()
|
1683
|
+
.click();
|
1684
|
+
},
|
1685
|
+
|
1686
|
+
cancelReset: () => {
|
1687
|
+
graphingPage.resetPopupCancelButton()
|
1688
|
+
.click();
|
1689
|
+
},
|
1690
|
+
|
1599
1691
|
/**
|
1600
1692
|
* This function plots points on the graph in correct answer section
|
1601
1693
|
* @param {Object[]} coordinates - An array containing x and x coordinates along with their range
|
@@ -1679,8 +1771,6 @@ const tests = {
|
|
1679
1771
|
...additionalSettingsPanel.tests,
|
1680
1772
|
...autoScoredSpecifyCorrectAnswerSection.tests,
|
1681
1773
|
...additionalSettingsAccessibilitySectionComponent.tests,
|
1682
|
-
...resetPopupComponent.tests,
|
1683
|
-
...defaultToolDropdown.tests,
|
1684
1774
|
|
1685
1775
|
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
1686
1776
|
it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
|
@@ -1736,6 +1826,52 @@ const tests = {
|
|
1736
1826
|
it('Accessibility of \'Correct\' accordion contents', { tags: 'a11y' }, () => {
|
1737
1827
|
cy.checkAccessibility(graphingPage.graphSpecifyCorrectAnswerSection());
|
1738
1828
|
});
|
1829
|
+
},
|
1830
|
+
|
1831
|
+
verifyResetPopupContentWithCSSAndA11y: () => {
|
1832
|
+
it('When the user clicks on the \'Reset\' button then a dialog box should appear with title \'Reset\'', () => {
|
1833
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
1834
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Reset');
|
1835
|
+
});
|
1836
|
+
|
1837
|
+
it('The dialog box should have content \'Are you sure you want to reset the graph? This will clear all objects and revert all settings to their default values.\' with \'Cancel\' and \'Confirm reset\' buttons should be displayed', () => {
|
1838
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxContent(), 'Are you sure you want to reset the graph? This will clear all objects and revert all settings to their default values.');
|
1839
|
+
utilities.verifyInnerText(graphingPage.resetPopupConfirmResetButton(), 'Confirm reset');
|
1840
|
+
utilities.verifyInnerText(graphingPage.resetPopupCancelButton(), 'Cancel');
|
1841
|
+
});
|
1842
|
+
|
1843
|
+
it('CSS of Reset dialog box', { tags: 'css' }, () => {
|
1844
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
1845
|
+
'color': css.color.flyoutTitle,
|
1846
|
+
'font-size': css.fontSize.default,
|
1847
|
+
'font-weight': css.fontWeight.regular
|
1848
|
+
});
|
1849
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
|
1850
|
+
'color': css.color.labels,
|
1851
|
+
'font-size': css.fontSize.default,
|
1852
|
+
'font-weight': css.fontWeight.regular
|
1853
|
+
});
|
1854
|
+
utilities.verifyCSS(graphingPage.resetPopupCancelButton().find('p'), {
|
1855
|
+
'color': css.color.secondaryBtn,
|
1856
|
+
'font-size': css.fontSize.default,
|
1857
|
+
'font-weight': css.fontWeight.semibold
|
1858
|
+
});
|
1859
|
+
utilities.verifyCSS(graphingPage.resetPopupCancelButton(), {
|
1860
|
+
'background-color': css.color.transparent
|
1861
|
+
});
|
1862
|
+
utilities.verifyCSS(graphingPage.resetPopupConfirmResetButton().find('p'), {
|
1863
|
+
'color': css.color.whiteText,
|
1864
|
+
'font-size': css.fontSize.default,
|
1865
|
+
'font-weight': css.fontWeight.semibold
|
1866
|
+
});
|
1867
|
+
utilities.verifyCSS(graphingPage.resetPopupConfirmResetButton(), {
|
1868
|
+
'background-color': css.color.editTableDeleteButton
|
1869
|
+
});
|
1870
|
+
});
|
1871
|
+
|
1872
|
+
it('Accessibility of Reset dialog box', { tags: 'a11y' }, () => {
|
1873
|
+
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
1874
|
+
});
|
1739
1875
|
}
|
1740
1876
|
}
|
1741
1877
|
|
@@ -41,7 +41,7 @@ const selectors = {
|
|
41
41
|
rowsDecreaseButton: () => cy.get('[class*="GridFillstyles__RowsColWrapper"] [aria-label="Decrease count"]').eq(1),
|
42
42
|
|
43
43
|
cellInEditTab: () => cy.get('[class*="GridFillResponsestyles__CellContainer"]'),
|
44
|
-
matchExactPositionLabel: () => cy.get('[data-ngie-testid="exact-match-position-of-cells-checkbox"]
|
44
|
+
matchExactPositionLabel: () => cy.get('[data-ngie-testid="exact-match-position-of-cells-checkbox"] .MuiFormControlLabel-label'),
|
45
45
|
matchExactPositionCheckbox: () => cy.get('[data-ngie-testid="exact-match-position-of-cells-checkbox"] input'),
|
46
46
|
cellInSpecifyCorrectAnswerSection: () => cy.get('[class*="GridFillstyles__SetCorrectAnswerWrapper"] [class*="GridFillResponsestyles__CellContainer"]'),
|
47
47
|
rowsWrapperSpecifyCorrectAnswerSection: () => cy.get('[class*="GridFillstyles__SetCorrectAnswerWrapper"] [class*="GridFillResponsestyles__RowContainer"]'),
|
@@ -187,7 +187,6 @@ const selectors = {
|
|
187
187
|
previousPaginationButtonPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(2),
|
188
188
|
nextPaginationButtonPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(3),
|
189
189
|
canvasTitlePreviewTab: () => cy.get('[class*="GridFillResponsestyles__CanvasTitleWrapper"]'),
|
190
|
-
correctAnswerLabel: () => cy.get('[class*="GridFillResponsestyles__CorrectAnswerLabel"]'),
|
191
190
|
warningMessageContainer: () => cy.get('.disabled-wrapper-cls'),
|
192
191
|
warningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]'),
|
193
192
|
}
|
@@ -677,136 +676,18 @@ const steps = {
|
|
677
676
|
* @param {number} rowIndex - The index of the row containing the cell.
|
678
677
|
* @param {number} columnIndex - The index of the column containing the cell.
|
679
678
|
*/
|
680
|
-
|
681
|
-
gridFillPage.
|
682
|
-
.eq(0)
|
683
|
-
.within(() => {
|
684
|
-
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
685
|
-
.within(() => {
|
686
|
-
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
687
|
-
.find('.correct-option-icon')
|
688
|
-
.should('not.exist');
|
689
|
-
});
|
690
|
-
});
|
691
|
-
},
|
692
|
-
|
693
|
-
/**
|
694
|
-
* Verifies if the correct response icon is visible for a cell in the preview tab.
|
695
|
-
* @param {number} rowIndex - The index of the row containing the cell.
|
696
|
-
* @param {number} columnIndex - The index of the column containing the cell.
|
697
|
-
*/
|
698
|
-
verifyCorrectResponseIconPreviewTab: (rowIndex, columnIndex) => {
|
699
|
-
gridFillPage.gridWrapperPreviewTab()
|
700
|
-
.eq(0)
|
701
|
-
.within(() => {
|
702
|
-
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
703
|
-
.within(() => {
|
704
|
-
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
705
|
-
.find('.correct-option-icon')
|
706
|
-
.should('be.visible');
|
707
|
-
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
708
|
-
.should('have.css', 'border-color', css.color.correctAnswer);
|
709
|
-
});
|
710
|
-
});
|
711
|
-
steps.verifyCorrectResponseBackgroundColorPreviewTab(rowIndex, columnIndex);
|
712
|
-
},
|
713
|
-
|
714
|
-
/**
|
715
|
-
* Verifies if the correct response icon is visible for a cell in the preview tab.
|
716
|
-
* @param {number} rowIndex - The index of the row containing the cell.
|
717
|
-
* @param {number} columnIndex - The index of the column containing the cell.
|
718
|
-
*/
|
719
|
-
verifyIncorrectResponseIconPreviewTab: (rowIndex, columnIndex) => {
|
720
|
-
gridFillPage.gridWrapperPreviewTab()
|
721
|
-
.eq(0)
|
722
|
-
.within(() => {
|
723
|
-
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
724
|
-
.within(() => {
|
725
|
-
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
726
|
-
.find('.incorrect-option-icon')
|
727
|
-
.should('be.visible');
|
728
|
-
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
729
|
-
.should('have.css', 'border-color', css.color.incorrectAnswer);
|
730
|
-
});
|
731
|
-
});
|
732
|
-
steps.verifyIncorrectResponseBackgroundColorPreviewTab(rowIndex, columnIndex);
|
733
|
-
},
|
734
|
-
|
735
|
-
/**
|
736
|
-
* Verifies if the correct response background color is applied to a cell in the preview tab.
|
737
|
-
* @param {number} rowIndex - The index of the row containing the cell.
|
738
|
-
* @param {number} columnIndex - The index of the column containing the cell.
|
739
|
-
*/
|
740
|
-
verifyCorrectResponseBackgroundColorPreviewTab: (rowIndex, columnIndex) => {
|
741
|
-
gridFillPage.gridWrapperPreviewTab()
|
742
|
-
.eq(0)
|
743
|
-
.within(() => {
|
744
|
-
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
745
|
-
.within(() => {
|
746
|
-
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
747
|
-
.then(($element) => {
|
748
|
-
cy.window().then((win) => {
|
749
|
-
const element = $element[0];
|
750
|
-
const pseudoStyle = win.getComputedStyle(element, '::after');
|
751
|
-
const pseudoBackgroundColor = pseudoStyle.getPropertyValue('background-color');
|
752
|
-
expect(pseudoBackgroundColor).to.equal(css.color.gridCellCorrectAnswerBg);
|
753
|
-
});
|
754
|
-
});
|
755
|
-
});
|
756
|
-
});
|
757
|
-
},
|
758
|
-
|
759
|
-
/**
|
760
|
-
* Verifies if the incorrect response background color is applied to a cell in the preview tab.
|
761
|
-
* @param {number} rowIndex - The index of the row containing the cell.
|
762
|
-
* @param {number} columnIndex - The index of the column containing the cell.
|
763
|
-
*/
|
764
|
-
verifyIncorrectResponseBackgroundColorPreviewTab: (rowIndex, columnIndex) => {
|
765
|
-
gridFillPage.gridWrapperPreviewTab()
|
766
|
-
.eq(0)
|
679
|
+
verifyCorrectResponseIcon: (rowIndex, columnIndex) => {
|
680
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
767
681
|
.within(() => {
|
768
|
-
utilities.getNthElement(gridFillPage.
|
769
|
-
.
|
770
|
-
|
771
|
-
.then(($element) => {
|
772
|
-
cy.window().then((win) => {
|
773
|
-
const element = $element[0];
|
774
|
-
const pseudoStyle = win.getComputedStyle(element, '::after');
|
775
|
-
const pseudoBackgroundColor = pseudoStyle.getPropertyValue('background-color');
|
776
|
-
expect(pseudoBackgroundColor).to.equal(css.color.gridCellIncorrectAnswerBg);
|
777
|
-
});
|
778
|
-
});
|
779
|
-
});
|
682
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
683
|
+
.find('.correct-option-icon')
|
684
|
+
.should('be.visible');
|
780
685
|
});
|
781
686
|
},
|
782
687
|
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
* @param {number} columnIndex - The index of the column containing the cell.
|
787
|
-
*/
|
788
|
-
verifyCorrectResponseIconCorrectAnswerSection: (rowIndex, columnIndex) => {
|
789
|
-
gridFillPage.gridWrapperPreviewTab()
|
790
|
-
.eq(1)
|
791
|
-
.within(() => {
|
792
|
-
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
793
|
-
.within(() => {
|
794
|
-
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
795
|
-
.find('.correct-option-icon')
|
796
|
-
.should('be.visible');
|
797
|
-
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
798
|
-
.should('have.css', 'border-color', css.color.correctAnswer);
|
799
|
-
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
800
|
-
.then(($element) => {
|
801
|
-
cy.window().then((win) => {
|
802
|
-
const element = $element[0];
|
803
|
-
const pseudoStyle = win.getComputedStyle(element, '::after');
|
804
|
-
const pseudoBackgroundColor = pseudoStyle.getPropertyValue('background-color');
|
805
|
-
expect(pseudoBackgroundColor).to.equal(css.color.gridCellCorrectAnswerBg);
|
806
|
-
});
|
807
|
-
});
|
808
|
-
});
|
809
|
-
});
|
688
|
+
verifyIncorrectResponseBorder: (index) => {
|
689
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), index)
|
690
|
+
.should('have.css', 'border-color', `${css.color.incorrectAnswer}`);
|
810
691
|
},
|
811
692
|
|
812
693
|
verifyMatchExactPositionOfCellsCheckboxIsChecked: () => {
|
@@ -877,6 +758,115 @@ const steps = {
|
|
877
758
|
});
|
878
759
|
},
|
879
760
|
|
761
|
+
/**
|
762
|
+
* Verifies if the correct response icon is visible for a cell in the preview tab.
|
763
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
764
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
765
|
+
*/
|
766
|
+
verifyIncorrectResponseIcon: (rowIndex, columnIndex) => {
|
767
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
768
|
+
.within(() => {
|
769
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
770
|
+
.find('.incorrect-option-icon')
|
771
|
+
.should('be.visible');
|
772
|
+
});
|
773
|
+
},
|
774
|
+
|
775
|
+
/**
|
776
|
+
* Verifies if the correct response border is applied to a cell in the preview tab.
|
777
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
778
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
779
|
+
*/
|
780
|
+
verifyCorrectResponseBorder: (rowIndex, columnIndex) => {
|
781
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
782
|
+
.within(() => {
|
783
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
784
|
+
.should('have.css', 'border-color', css.color.correctAnswer);
|
785
|
+
});
|
786
|
+
},
|
787
|
+
|
788
|
+
/**
|
789
|
+
* Verifies if the incorrect response border is applied to a cell in the preview tab.
|
790
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
791
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
792
|
+
*/
|
793
|
+
verifyIncorrectResponseBorder: (rowIndex, columnIndex) => {
|
794
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
795
|
+
.within(() => {
|
796
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
797
|
+
.should('have.css', 'border-color', css.color.incorrectAnswer);
|
798
|
+
});
|
799
|
+
},
|
800
|
+
|
801
|
+
/**
|
802
|
+
* Verifies if the correct response background color is applied to a cell in the preview tab.
|
803
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
804
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
805
|
+
*/
|
806
|
+
verifyCorrectResponseBackgroundColor: (rowIndex, columnIndex) => {
|
807
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
808
|
+
.within(() => {
|
809
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
810
|
+
.should('have.css', 'background-color', css.color.gridCellCorrectAnswerBg);
|
811
|
+
});
|
812
|
+
},
|
813
|
+
|
814
|
+
/**
|
815
|
+
* Verifies if the incorrect response background color is applied to a cell in the preview tab.
|
816
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
817
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
818
|
+
*/
|
819
|
+
verifyIncorrectResponseBackgroundColor: (rowIndex, columnIndex) => {
|
820
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
821
|
+
.within(() => {
|
822
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
823
|
+
.should('have.css', 'background-color', css.color.gridCellIncorrectAnswerBg);
|
824
|
+
});
|
825
|
+
},
|
826
|
+
|
827
|
+
/**
|
828
|
+
* Verifies if the default background color is applied to a cell in the preview tab.
|
829
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
830
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
831
|
+
*/
|
832
|
+
verifyResponseCellHasDefaultBackgroundColor: (rowIndex, columnIndex) => {
|
833
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
834
|
+
.within(() => {
|
835
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
836
|
+
.should('have.css', 'background-color', css.color.gridCellDefaultStateBg);
|
837
|
+
});
|
838
|
+
},
|
839
|
+
|
840
|
+
/**
|
841
|
+
* Verifies if the correct response border and background color is applied to a cell in the preview tab.
|
842
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
843
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
844
|
+
*/
|
845
|
+
verifyCorrectResponseBorderAndBackgroundColor: (rowIndex, columnIndex) => {
|
846
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
847
|
+
.within(() => {
|
848
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
849
|
+
.should('have.css', 'border-color', css.color.correctAnswer);
|
850
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
851
|
+
.should('have.css', 'background-color', css.color.gridCellCorrectAnswerBg);
|
852
|
+
});
|
853
|
+
},
|
854
|
+
|
855
|
+
/**
|
856
|
+
* Verifies if the incorrect response border background color is applied to a cell in the preview tab.
|
857
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
858
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
859
|
+
*/
|
860
|
+
verifyIncorrectResponseBorderAndBackgroundColor: (rowIndex, columnIndex) => {
|
861
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
862
|
+
.within(() => {
|
863
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
864
|
+
.should('have.css', 'border-color', css.color.incorrectAnswer);
|
865
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
866
|
+
.should('have.css', 'background-color', css.color.gridCellIncorrectAnswerBg);
|
867
|
+
});
|
868
|
+
},
|
869
|
+
|
880
870
|
verifyCorrectAnswerAccordionIsExpanded: () => {
|
881
871
|
gridFillPage.correctAnswerAccordion()
|
882
872
|
.find('.ngie-accordion-summary')
|
@@ -973,7 +963,7 @@ const steps = {
|
|
973
963
|
* Verifies the selection state of a cell in the interactive grid.
|
974
964
|
* @param {number} rowIndex - The index of the row of the cell to verify.
|
975
965
|
* @param {number} columnIndex - The index of the column of the cell to verify.
|
976
|
-
*/
|
966
|
+
*/
|
977
967
|
verifySelectedRowsAndColumnsInInteractiveState: (rowIndex, columnIndex) => {
|
978
968
|
gridFillPage.cellInOpenTheGridSelectorAccordion()
|
979
969
|
.filter(`[aria-label*="Row${rowIndex} Column${columnIndex}"]`)
|
@@ -2828,12 +2818,7 @@ const steps = {
|
|
2828
2818
|
const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
|
2829
2819
|
expect(CSSStyleDeclarationValue).to.deep.eq(`${width} ${height}`);
|
2830
2820
|
});
|
2831
|
-
}
|
2832
|
-
|
2833
|
-
verifyCorrectAnswerSectionNotExists: () => {
|
2834
|
-
utilities.verifyElementVisibilityState(gridFillPage.correctAnswerLabel(), 'notExist');
|
2835
|
-
utilities.verifyElementVisibilityState(gridFillPage.gridWrapperPreviewTab().eq(1), 'notExist');
|
2836
|
-
},
|
2821
|
+
}
|
2837
2822
|
}
|
2838
2823
|
|
2839
2824
|
const tests = {
|