itemengine-cypress-automation 1.0.166-migrationScripts-b8c79a0.0 → 1.0.166
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +83 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +200 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +56 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +95 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +71 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +72 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +71 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +22 -11
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +161 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +308 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +216 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +336 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +570 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +356 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +299 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +18 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +11 -6
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +355 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +2 -36
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +22 -34
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +8 -24
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +5 -25
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +68 -114
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +67 -111
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +71 -123
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +41 -63
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +21 -25
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +50 -85
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +68 -115
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +54 -98
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +72 -120
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +309 -0
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/Matching/toolSettings.js +72 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1033 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +28 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +236 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +239 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +178 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +407 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +273 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +228 -0
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +120 -0
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +659 -0
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +149 -0
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +151 -0
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +171 -0
- package/cypress/e2e/ILC/NumberLine/headerSection.js +76 -0
- package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +54 -0
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +200 -0
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +67 -0
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +135 -0
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +73 -0
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +372 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1014 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +457 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +155 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +275 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +290 -0
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +137 -0
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
- package/cypress/fixtures/theme/ilc.json +14 -26
- package/cypress/pages/brainingCampManipulativePage.js +122 -0
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +2 -2
- package/cypress/pages/components/defaultToolDropdown.js +77 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +629 -2
- package/cypress/pages/components/index.js +3 -0
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/measuringToolComponent.js +2 -2
- package/cypress/pages/components/resetPopupComponent.js +74 -0
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -4
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +60 -3
- package/cypress/pages/components/toolSettingsComponent.js +80 -12
- package/cypress/pages/components/toolsAndControlsComponent.js +69 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -8
- package/cypress/pages/feedbackScalePage copy.js +716 -0
- package/cypress/pages/feedbackScalePage.js +591 -449
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
- package/cypress/pages/graphingPage.js +9 -145
- package/cypress/pages/gridFillPage.js +135 -120
- package/cypress/pages/highlightPage.js +0 -394
- package/cypress/pages/index.js +5 -2
- package/cypress/pages/matchingPage.js +78 -20
- package/cypress/pages/multipleSelectionGridPage.js +88 -1
- package/cypress/pages/numberLinePage.js +723 -0
- package/cypress/pages/singleSelectionGridPage.js +86 -0
- package/cypress/pages/textSelectionPage.js +582 -0
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +3 -12
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +0 -1
- package/cypress/support/migrationHelpers/migrationScript.js +0 -10
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +0 -8
- package/package.json +2 -2
@@ -324,11 +324,13 @@ const steps = {
|
|
324
324
|
.and('match', /0px none/);
|
325
325
|
},
|
326
326
|
|
327
|
-
clickAndDropOptionInOptionsContainerInPreviewTab: (optionText) => {
|
327
|
+
clickAndDropOptionInOptionsContainerInPreviewTab: (optionText, groupIndex=0) => {
|
328
328
|
fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
|
329
329
|
.contains(optionText)
|
330
330
|
.click();
|
331
331
|
draggableOptionContainer.optionsContainerPreviewTab()
|
332
|
+
.find('.item-list')
|
333
|
+
.eq(groupIndex)
|
332
334
|
.click({ force: true });
|
333
335
|
},
|
334
336
|
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import utilities from "../support/helpers/utilities";
|
2
|
-
import { questionInstructionsComponent, createQuestionBasePage, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, backgroundImageUploadComponent, imageCanvasComponent, opacityComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
|
3
|
-
import { dialogBoxBase } from "./dialogBoxBase";
|
2
|
+
import { questionInstructionsComponent, createQuestionBasePage, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, backgroundImageUploadComponent, imageCanvasComponent, opacityComponent, autoScoredScoringSectionMultiResponseType, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, toolsAndControlsComponent, resetPopupComponent, defaultToolDropdown } from "./components";
|
4
3
|
const css = Cypress.env('css');
|
5
4
|
|
6
5
|
const selectors = {
|
@@ -14,6 +13,9 @@ const selectors = {
|
|
14
13
|
...autoScoredScoringSectionMultiResponseType,
|
15
14
|
...autoScoredSpecifyCorrectAnswerSection,
|
16
15
|
...additionalSettingsPanel,
|
16
|
+
...toolsAndControlsComponent,
|
17
|
+
...resetPopupComponent,
|
18
|
+
...defaultToolDropdown,
|
17
19
|
|
18
20
|
//Edit tab
|
19
21
|
graphEditTab: () => cy.get('[class*="GraphingWrapper"] .ngie-jxgbox svg'),
|
@@ -46,30 +48,8 @@ const selectors = {
|
|
46
48
|
return cy.get('[class*="GraphingWrapper"] .ngie-jxgbox .JXGtext')
|
47
49
|
}
|
48
50
|
},
|
49
|
-
toolsLabel: () => cy.get('[class*="CustomizedToolBarOptionsstyles__ToolbarLabel"]').eq(0),
|
50
51
|
xAxisLabelGraphEditTab: () => cy.get('.graph-left-wrapper .title-casing'),
|
51
52
|
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
|
-
},
|
73
53
|
graphToolOptionEditTab: (toolOptionAriaLabel = null) => {
|
74
54
|
if (toolOptionAriaLabel) {
|
75
55
|
return cy.get('.graph-tools-wrapper').eq(0).find(`.single-select-toggle-group-double button[aria-label*=${toolOptionAriaLabel}]`)
|
@@ -91,13 +71,6 @@ const selectors = {
|
|
91
71
|
return cy.get('[class*="GraphingQuestion"] .single-select-toggle-group-double button')
|
92
72
|
}
|
93
73
|
},
|
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
|
-
},
|
101
74
|
graphControlOptionEditTab: (controlOptionAriaLabel = null) => {
|
102
75
|
if (controlOptionAriaLabel) {
|
103
76
|
return cy.get('[class*="GraphingToolsstyles__ControlsWrapper"]').eq(0).find(`button[aria-label*="${controlOptionAriaLabel}"]`)
|
@@ -251,10 +224,6 @@ const selectors = {
|
|
251
224
|
whatIsThisLabel: () => cy.get('.what-is-wrapper [class*="StyledLink"]'),
|
252
225
|
makeResponsiveHelpText: () => cy.get('[class*="WhatIsThisDescriptionWrapper"]'),
|
253
226
|
|
254
|
-
//Reset popup
|
255
|
-
resetPopupConfirmResetButton: () => cy.get('.accept-button'),
|
256
|
-
resetPopupCancelButton: () => cy.get('.reject-button'),
|
257
|
-
|
258
227
|
//Grading view
|
259
228
|
gradingViewQuestionSineWave: () => cy.get('.ngie-jxgbox').eq(0).find('path[stroke-linecap="butt"][stroke-opacity="1"]'),
|
260
229
|
gradingViewQuestionCircle: () => cy.get('.ngie-jxgbox').eq(0).find('ellipse[stroke-linecap="butt"]'),
|
@@ -286,58 +255,16 @@ const steps = {
|
|
286
255
|
...autoScoredScoringSectionMultiResponseType.steps,
|
287
256
|
...commonComponents.steps,
|
288
257
|
...additionalSettingsPanel.steps,
|
258
|
+
...toolsAndControlsComponent.steps,
|
259
|
+
...resetPopupComponent.steps,
|
260
|
+
...defaultToolDropdown.steps,
|
289
261
|
|
290
262
|
//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
|
-
|
331
263
|
checkPatternBackground: () => {
|
332
264
|
graphingPage.patternRadioButton()
|
333
265
|
.click();
|
334
266
|
},
|
335
267
|
|
336
|
-
expandDefaultToolDropdown: () => {
|
337
|
-
graphingPage.defaultToolDropdown()
|
338
|
-
.click();
|
339
|
-
},
|
340
|
-
|
341
268
|
/**
|
342
269
|
* This function verifies checked state of radio buttons
|
343
270
|
* @param {('Blank canvas'|'Image'|'Pattern')} radioButton
|
@@ -407,15 +334,6 @@ const steps = {
|
|
407
334
|
})
|
408
335
|
},
|
409
336
|
|
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
|
-
|
419
337
|
/**
|
420
338
|
* @param {string} fileFormat format of the uploaded file in the graph
|
421
339
|
* @description this function verifies the attribute of the image has the expected file format
|
@@ -1678,16 +1596,6 @@ const steps = {
|
|
1678
1596
|
.should('have.text', input);
|
1679
1597
|
},
|
1680
1598
|
|
1681
|
-
confirmReset: () => {
|
1682
|
-
graphingPage.resetPopupConfirmResetButton()
|
1683
|
-
.click();
|
1684
|
-
},
|
1685
|
-
|
1686
|
-
cancelReset: () => {
|
1687
|
-
graphingPage.resetPopupCancelButton()
|
1688
|
-
.click();
|
1689
|
-
},
|
1690
|
-
|
1691
1599
|
/**
|
1692
1600
|
* This function plots points on the graph in correct answer section
|
1693
1601
|
* @param {Object[]} coordinates - An array containing x and x coordinates along with their range
|
@@ -1771,6 +1679,8 @@ const tests = {
|
|
1771
1679
|
...additionalSettingsPanel.tests,
|
1772
1680
|
...autoScoredSpecifyCorrectAnswerSection.tests,
|
1773
1681
|
...additionalSettingsAccessibilitySectionComponent.tests,
|
1682
|
+
...resetPopupComponent.tests,
|
1683
|
+
...defaultToolDropdown.tests,
|
1774
1684
|
|
1775
1685
|
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
1776
1686
|
it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
|
@@ -1826,52 +1736,6 @@ const tests = {
|
|
1826
1736
|
it('Accessibility of \'Correct\' accordion contents', { tags: 'a11y' }, () => {
|
1827
1737
|
cy.checkAccessibility(graphingPage.graphSpecifyCorrectAnswerSection());
|
1828
1738
|
});
|
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
|
-
});
|
1875
1739
|
}
|
1876
1740
|
}
|
1877
1741
|
|
@@ -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"] [class*="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,6 +187,7 @@ 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"]'),
|
190
191
|
warningMessageContainer: () => cy.get('.disabled-wrapper-cls'),
|
191
192
|
warningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]'),
|
192
193
|
}
|
@@ -676,18 +677,136 @@ const steps = {
|
|
676
677
|
* @param {number} rowIndex - The index of the row containing the cell.
|
677
678
|
* @param {number} columnIndex - The index of the column containing the cell.
|
678
679
|
*/
|
679
|
-
|
680
|
-
|
680
|
+
verifyCorrectIncorrectResponseIconNotExistPreviewTab: (rowIndex, columnIndex) => {
|
681
|
+
gridFillPage.gridWrapperPreviewTab()
|
682
|
+
.eq(0)
|
681
683
|
.within(() => {
|
682
|
-
utilities.getNthElement(gridFillPage.
|
683
|
-
.
|
684
|
-
|
684
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
685
|
+
.within(() => {
|
686
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
687
|
+
.find('.correct-option-icon')
|
688
|
+
.should('not.exist');
|
689
|
+
});
|
685
690
|
});
|
686
691
|
},
|
687
692
|
|
688
|
-
|
689
|
-
|
690
|
-
|
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)
|
767
|
+
.within(() => {
|
768
|
+
utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
|
769
|
+
.within(() => {
|
770
|
+
utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
|
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
|
+
});
|
780
|
+
});
|
781
|
+
},
|
782
|
+
|
783
|
+
/**
|
784
|
+
* Verifies if the correct response icon is visible for a cell in the preview tab.
|
785
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
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
|
+
});
|
691
810
|
},
|
692
811
|
|
693
812
|
verifyMatchExactPositionOfCellsCheckboxIsChecked: () => {
|
@@ -758,115 +877,6 @@ const steps = {
|
|
758
877
|
});
|
759
878
|
},
|
760
879
|
|
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
|
-
|
870
880
|
verifyCorrectAnswerAccordionIsExpanded: () => {
|
871
881
|
gridFillPage.correctAnswerAccordion()
|
872
882
|
.find('.ngie-accordion-summary')
|
@@ -963,7 +973,7 @@ const steps = {
|
|
963
973
|
* Verifies the selection state of a cell in the interactive grid.
|
964
974
|
* @param {number} rowIndex - The index of the row of the cell to verify.
|
965
975
|
* @param {number} columnIndex - The index of the column of the cell to verify.
|
966
|
-
*/
|
976
|
+
*/
|
967
977
|
verifySelectedRowsAndColumnsInInteractiveState: (rowIndex, columnIndex) => {
|
968
978
|
gridFillPage.cellInOpenTheGridSelectorAccordion()
|
969
979
|
.filter(`[aria-label*="Row${rowIndex} Column${columnIndex}"]`)
|
@@ -2818,7 +2828,12 @@ const steps = {
|
|
2818
2828
|
const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
|
2819
2829
|
expect(CSSStyleDeclarationValue).to.deep.eq(`${width} ${height}`);
|
2820
2830
|
});
|
2821
|
-
}
|
2831
|
+
},
|
2832
|
+
|
2833
|
+
verifyCorrectAnswerSectionNotExists: () => {
|
2834
|
+
utilities.verifyElementVisibilityState(gridFillPage.correctAnswerLabel(), 'notExist');
|
2835
|
+
utilities.verifyElementVisibilityState(gridFillPage.gridWrapperPreviewTab().eq(1), 'notExist');
|
2836
|
+
},
|
2822
2837
|
}
|
2823
2838
|
|
2824
2839
|
const tests = {
|