itemengine-cypress-automation 1.0.340 → 1.0.341
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/DragAndDropIntoCategoriesNew/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +84 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/checkAddAlternativeButton.js +33 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/draggableOptions.js +2 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +33 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/headerSection.js +37 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +96 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/checkAddAlternative.js +37 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +4 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabBasicSection.js +47 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +37 -9
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +12 -0
- package/cypress/e2e/ILC/Ruler/rulerEditTabFunctionality.js +10 -0
- package/cypress/e2e/ILC/TextSelection/ScoringParagraph/allOrNothingAlternatePointsMoreThanCorrectPoints.js +80 -0
- package/cypress/e2e/ILC/TextSelection/ScoringParagraph/allOrNothingCorrectPointsMoreThanAlternatePoints.js +30 -0
- package/cypress/e2e/ILC/TextSelection/ScoringParagraph/checkScoringLabelBannerAndCorrectAnswerSection.js +110 -0
- package/cypress/e2e/ILC/TextSelection/checkAddAlternativeButton.js +46 -0
- package/cypress/e2e/ILC/TextSelection/editTabBasicSection.js +57 -0
- package/cypress/e2e/ILC/TextSelection/headerSection.js +38 -6
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +1 -2
- package/cypress/fixtures/constants.js +5 -1
- package/cypress/fixtures/theme/ilc.json +2 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +5 -27
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -67
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +0 -66
- package/cypress/pages/components/hideExpressionListComponent.js +53 -0
- package/cypress/pages/components/index.js +1 -0
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/desmos3DGraphingPage.js +368 -0
- package/cypress/pages/desmosGeometryPage.js +308 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +26 -6
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -68
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +4 -4
- package/cypress/pages/imageHighlightPage.js +0 -66
- package/cypress/pages/index.js +3 -2
- package/cypress/pages/multipleSelectionGridPage.js +1 -68
- package/cypress/pages/multipleSelectionPage.js +0 -67
- package/cypress/pages/singleSelectionGridPage.js +1 -68
- package/cypress/pages/singleSelectionPage.js +0 -67
- package/cypress/pages/textSelectionPage.js +25 -6
- package/package.json +1 -1
@@ -1715,72 +1715,6 @@ const tests = {
|
|
1715
1715
|
fillInTheGapsTextCommonComponent.steps.verifyAnswerInputFieldPlaceholderTextPreviewTab(1, 'Global placeholder');
|
1716
1716
|
});
|
1717
1717
|
},
|
1718
|
-
|
1719
|
-
//TODO need to remove once Save as you go is available for all questions
|
1720
|
-
/**
|
1721
|
-
* @description Verifies the behavior of the 'Add alternative answer' button, warning popups, and validation error messages
|
1722
|
-
* in the 'Specify correct answer' section for alternative answers in auto-scored questions.
|
1723
|
-
* @param {string|null} questionType - The type of the question (e.g., 'list ordering'). Pass `null` if not applicable.
|
1724
|
-
* @example - verifyAutoScoredAddAlternativeAnswerButtonAndValidation();
|
1725
|
-
*/
|
1726
|
-
verifyAutoScoredAddAlternativeAnswerButtonAndValidation: (questionType = null) => {
|
1727
|
-
it('\'+ Add alternative answer\' button should be present', () => {
|
1728
|
-
utilities.verifyInnerText(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'Add alternative answer');
|
1729
|
-
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'visible');
|
1730
|
-
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
|
1731
|
-
.verifyPseudoClassBeforeProperty('content', '""');
|
1732
|
-
});
|
1733
|
-
|
1734
|
-
it('CSS of \'Add Alternative answer\' button', { tags: 'css' }, () => {
|
1735
|
-
utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton().find('p'), {
|
1736
|
-
'color': css.color.activeButtons,
|
1737
|
-
'font-size': css.fontSize.default,
|
1738
|
-
'font-weight': css.fontWeight.regular
|
1739
|
-
});
|
1740
|
-
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
|
1741
|
-
.verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
|
1742
|
-
});
|
1743
|
-
|
1744
|
-
it('If user has not selected correct answer in the correct accordion, then the Add alternative answer button should be in enabled state', () => {
|
1745
|
-
utilities.verifyElementNotDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
|
1746
|
-
autoScoredSpecifyCorrectAnswerSection.steps.clickOnAddAlternativeAnswerButton();
|
1747
|
-
});
|
1748
|
-
|
1749
|
-
it('CSS of warning popup', { tags: 'css' }, () => {
|
1750
|
-
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
1751
|
-
'color': css.color.flyoutTitle,
|
1752
|
-
'font-size': css.fontSize.heading,
|
1753
|
-
'font-weight': css.fontWeight.semibold
|
1754
|
-
});
|
1755
|
-
utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
|
1756
|
-
'color': css.color.labels,
|
1757
|
-
'font-size': css.fontSize.default,
|
1758
|
-
'font-weight': css.fontWeight.regular
|
1759
|
-
});
|
1760
|
-
utilities.verifyCSS(dialogBoxBase.buttonClose().find('svg'), {
|
1761
|
-
'fill': css.color.closeIcon
|
1762
|
-
});
|
1763
|
-
});
|
1764
|
-
|
1765
|
-
it('Accessibility of warning popup', { tags: 'a11y' }, () => {
|
1766
|
-
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
1767
|
-
dialogBoxBase.steps.closeWarningPopup();
|
1768
|
-
});
|
1769
|
-
},
|
1770
|
-
|
1771
|
-
//TODO need to remove once Save as you go is available for all questions
|
1772
|
-
verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion: () => {
|
1773
|
-
it('When user tries to expand correct accordion when all the mandatory fields are not filled in the alternative accordion, then a warning popup should be displayed and on closing the popup, alternative 2 accordion should be in expanded state', () => {
|
1774
|
-
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
1775
|
-
.click();
|
1776
|
-
dialogBoxBase.steps.closeWarningPopup();
|
1777
|
-
//TODO: Need to add error message according to question types
|
1778
|
-
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
|
1779
|
-
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
1780
|
-
.eq(1)
|
1781
|
-
.should('have.attr', 'aria-expanded', 'true');
|
1782
|
-
});
|
1783
|
-
},
|
1784
1718
|
}
|
1785
1719
|
|
1786
1720
|
export const fillInTheGapsTextCommonComponent = {
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import utilities from "../../support/helpers/utilities";
|
2
|
+
const css = Cypress.env('css');
|
3
|
+
|
4
|
+
const selectors = {
|
5
|
+
hideExpressionListLabel: () => cy.get('[data-ngie-testid="hide-expression-list-checkbox"] .MuiFormControlLabel-label'),
|
6
|
+
hideExpressionListCheckbox: () => cy.get('[data-ngie-testid="hide-expression-list-checkbox"] input'),
|
7
|
+
}
|
8
|
+
|
9
|
+
const steps = {
|
10
|
+
verifyHideExpressionListCheckboxUnchecked: () => {
|
11
|
+
hideExpressionListComponent.hideExpressionListCheckbox()
|
12
|
+
.should('not.be.checked');
|
13
|
+
},
|
14
|
+
checkHideExpressionListCheckbox: () => {
|
15
|
+
hideExpressionListComponent.hideExpressionListCheckbox()
|
16
|
+
.click()
|
17
|
+
.should('be.checked');
|
18
|
+
},
|
19
|
+
}
|
20
|
+
const tests = {
|
21
|
+
verifyHideExpressionList: () => {
|
22
|
+
it('\'Hide expression list\' label and checkbox should be displayed and by default it should be unchecked', () => {
|
23
|
+
utilities.verifyInnerText(hideExpressionListComponent.hideExpressionListLabel(), 'Hide expression list');
|
24
|
+
utilities.verifyElementVisibilityState(hideExpressionListComponent.hideExpressionListLabel(), 'visible');
|
25
|
+
hideExpressionListComponent.steps.verifyHideExpressionListCheckboxUnchecked();
|
26
|
+
});
|
27
|
+
|
28
|
+
it('User should be able to check the \'Hide expression list\' checkbox', () => {
|
29
|
+
hideExpressionListComponent.steps.checkHideExpressionListCheckbox();
|
30
|
+
});
|
31
|
+
|
32
|
+
it('CSS of hide expression list checkbox and label', { tags: 'css' }, () => {
|
33
|
+
utilities.verifyCSS(hideExpressionListComponent.hideExpressionListLabel(), {
|
34
|
+
'color': css.color.labelText,
|
35
|
+
'font-size': css.fontSize.normal,
|
36
|
+
'font-weight': css.fontWeight.regular
|
37
|
+
});
|
38
|
+
utilities.verifyCSS(hideExpressionListComponent.hideExpressionListCheckbox().parents('[data-ngie-testid="hide-expression-list-checkbox"]').find('svg g').eq(1), {
|
39
|
+
'fill': css.color.primaryBtnBg
|
40
|
+
});
|
41
|
+
});
|
42
|
+
|
43
|
+
it('Accessibility of hide expression list', { tags: 'a11y' }, () => {
|
44
|
+
cy.checkAccessibility(hideExpressionListComponent.hideExpressionListCheckbox().parents('[data-ngie-testid="hide-expression-list-checkbox"]'))
|
45
|
+
});
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
export const hideExpressionListComponent = {
|
50
|
+
...selectors,
|
51
|
+
steps,
|
52
|
+
tests
|
53
|
+
}
|
@@ -69,3 +69,4 @@ export * from './draggableOptionsStyleAndLayoutComponent';
|
|
69
69
|
export * from './connectorStyleStyleAndLayoutCustomizationComponent';
|
70
70
|
export * from './equationEditorSectionCommonComponent';
|
71
71
|
export * from './ckEditorAudioPlayerComponent';
|
72
|
+
export * from './hideExpressionListComponent';
|
@@ -0,0 +1,368 @@
|
|
1
|
+
import utilities from "../support/helpers/utilities";
|
2
|
+
import { commonComponents, createQuestionBasePage, questionInstructionsComponent, additionalSettingsPanel, scoringSectionBaseEditTab, additionalSettingsAccessibilitySectionComponent, studentViewSettingsLabelComponent, hideExpressionListComponent } from "./components";
|
3
|
+
import { desmosToolComponent } from "./components/desmosToolComponent";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const selectors = {
|
7
|
+
...desmosToolComponent,
|
8
|
+
...scoringSectionBaseEditTab,
|
9
|
+
...commonComponents,
|
10
|
+
...additionalSettingsPanel,
|
11
|
+
...questionInstructionsComponent,
|
12
|
+
desmosGraphingTool: () => cy.get('[id*="desmos-graph-tool"]'),
|
13
|
+
desmosGraphingToolExpressionPanel: () => cy.get('[id*="desmos-graph-tool"] .dcg-exppanel-container.dcg-add-shadow'),
|
14
|
+
studentViewSettingsLabel: () => cy.get('[class*="StudentViewWrapper"]'),
|
15
|
+
hideExpressionListLabel: () => cy.get('[data-ngie-testid="hide-expression-list-checkbox"] .MuiFormControlLabel-label'),
|
16
|
+
hideExpressionListCheckbox: () => cy.get('[data-ngie-testid="hide-expression-list-checkbox"] input'),
|
17
|
+
showHideListButton: () => cy.get('.dcg-show-expressions-tab[role="button"]'),
|
18
|
+
desmosGraphingWidthLabel: () => cy.get('[class*="LabelInputWrapper"]').eq(0),
|
19
|
+
desmosGraphingWidthInputField: () => cy.get('[class*="DimensionInputWrapper"] input').eq(0),
|
20
|
+
desmosGraphingHeightLabel: () => cy.get('[class*="LabelInputWrapper"]').eq(1),
|
21
|
+
desmosGraphingHeightInputField: () => cy.get('[class*="DimensionInputWrapper"] input').eq(1),
|
22
|
+
desmosGraphingExpressionPreviewTab: () => cy.get('.edit-question-preview-wrapper .dcg-expressionlist .dcg-main .dcg-mathquill-wrapper'),
|
23
|
+
desmosGraphingOutput: () => cy.get('.dcg-evaluation-container .dcg-typeset-math .dcg-mq-mathspeak').eq(1),
|
24
|
+
buttonAspectRatio: () => cy.get('[class*="LockIconWrapper"] button'),
|
25
|
+
buttonResetDimensions: () => cy.get('[class*="ResetIconWrapper"] button'),
|
26
|
+
specifyPredefinedExpressionLabel: () => cy.get('.label-wrapper'),
|
27
|
+
addExpressionButton: () => cy.get('.dcg-add-expression-btn:visible'),
|
28
|
+
expressionListNewFolderOption: () => cy.get('.dcg-action-newfolder'),
|
29
|
+
folderInExpressionList: () => cy.get('.dcg-expressionfolder'),
|
30
|
+
accessibilityLabel: () => cy.get('[class*="Accessibilitystyles__AccessibilityLabelWrapper"]'),
|
31
|
+
flagNonAccessibleCheckbox: () => cy.get('[data-ngie-testid="response-option-checkbox"] input'),
|
32
|
+
flagNonAccessibleLabel: () => cy.get('[data-ngie-testid="response-option-checkbox"] .MuiFormControlLabel-label'),
|
33
|
+
widthInputField: () => cy.get('[class*="StudentViewSettingsstyles__DimensionWrapper"] .text-input-field input').eq(0),
|
34
|
+
heightInputField: () => cy.get('[class*="StudentViewSettingsstyles__DimensionWrapper"] .text-input-field input').eq(1),
|
35
|
+
insertResourceLinkLabel: () => cy.get('.label-wrapper'),
|
36
|
+
insertResourceLinkInputField: () => cy.get('.additional-option-placeholder-input .MuiOutlinedInput-input'),
|
37
|
+
httpsLabel: () => cy.get('.start-adornment'),
|
38
|
+
errorMessage: () => cy.get('.error-text-message'),
|
39
|
+
resourceLinkPreviewTitle: () => cy.get('[class*="DesmosGraphingstyles__ResourceLinkPreviewLabel"]'),
|
40
|
+
desmosComponent: () => cy.get('[class*="DesmosGraphingstyles__DesmosComponentWrapper"]'),
|
41
|
+
}
|
42
|
+
|
43
|
+
const steps = {
|
44
|
+
...desmosToolComponent.steps,
|
45
|
+
...createQuestionBasePage.steps,
|
46
|
+
...scoringSectionBaseEditTab.steps,
|
47
|
+
...additionalSettingsPanel.steps,
|
48
|
+
...questionInstructionsComponent.steps,
|
49
|
+
...commonComponents.steps,
|
50
|
+
verifyHideExpressionListCheckboxUnchecked: () => {
|
51
|
+
desmos3DGraphingPage.hideExpressionListCheckbox()
|
52
|
+
.should('not.be.checked');
|
53
|
+
},
|
54
|
+
|
55
|
+
checkHideExpressionListCheckbox: () => {
|
56
|
+
desmos3DGraphingPage.hideExpressionListCheckbox()
|
57
|
+
.click()
|
58
|
+
.should('be.checked');
|
59
|
+
},
|
60
|
+
|
61
|
+
uncheckHideExpressionListCheckbox: () => {
|
62
|
+
desmos3DGraphingPage.hideExpressionListCheckbox()
|
63
|
+
.click()
|
64
|
+
.should('not.be.checked');
|
65
|
+
},
|
66
|
+
|
67
|
+
verifyExpressionListPanelVisible: () => {
|
68
|
+
utilities.verifyElementVisibilityState(desmos3DGraphingPage.desmosGraphingToolExpressionPanel(), 'visible');
|
69
|
+
},
|
70
|
+
|
71
|
+
verifyPreviewTabExpressionListPanelVisible: () => {
|
72
|
+
commonComponents.previewTabQuestionWrapper()
|
73
|
+
.within(() => {
|
74
|
+
utilities.verifyElementVisibilityState(desmos3DGraphingPage.desmosGraphingToolExpressionPanel(), 'visible');
|
75
|
+
});
|
76
|
+
},
|
77
|
+
|
78
|
+
verifyPreviewTabExpressionListPanelHidden: () => {
|
79
|
+
commonComponents.previewTabQuestionWrapper()
|
80
|
+
.within(() => {
|
81
|
+
desmos3DGraphingPage.desmosGraphingToolExpressionPanel()
|
82
|
+
.should('not.exist');
|
83
|
+
});
|
84
|
+
},
|
85
|
+
|
86
|
+
showHideList: () => {
|
87
|
+
desmos3DGraphingPage.showHideListButton()
|
88
|
+
.click();
|
89
|
+
},
|
90
|
+
|
91
|
+
verifyDesmosGraphingWidthInputField: (width) => {
|
92
|
+
desmos3DGraphingPage.desmosGraphingWidthInputField()
|
93
|
+
.should('have.value', width);
|
94
|
+
},
|
95
|
+
|
96
|
+
verifyDesmosGraphingHeightInputField: (height) => {
|
97
|
+
desmos3DGraphingPage.desmosGraphingHeightInputField()
|
98
|
+
.should('have.value', height);
|
99
|
+
},
|
100
|
+
|
101
|
+
/**
|
102
|
+
* @param {number} width value to enter in width input field
|
103
|
+
* @description this function enters value in width input field
|
104
|
+
*/
|
105
|
+
enterInputInDesmosGraphingWidthInputField: (width) => {
|
106
|
+
desmos3DGraphingPage.desmosGraphingWidthInputField()
|
107
|
+
.clear()
|
108
|
+
.type(width)
|
109
|
+
.should('have.value', width);
|
110
|
+
},
|
111
|
+
|
112
|
+
/**
|
113
|
+
* @param {number} height value to enter in height input field
|
114
|
+
* @description this function enters value in height input field
|
115
|
+
*/
|
116
|
+
enterInputInDesmosGraphingHeightInputField: (height) => {
|
117
|
+
desmos3DGraphingPage.desmosGraphingHeightInputField()
|
118
|
+
.clear()
|
119
|
+
.type(height)
|
120
|
+
.should('have.value', height);
|
121
|
+
},
|
122
|
+
|
123
|
+
/**
|
124
|
+
* @description this function locks aspect ratio
|
125
|
+
*/
|
126
|
+
lockAspectRatio: () => {
|
127
|
+
desmos3DGraphingPage.buttonAspectRatio()
|
128
|
+
.click();
|
129
|
+
steps.verifyButtonAspectRatioLocked();
|
130
|
+
},
|
131
|
+
|
132
|
+
/**
|
133
|
+
* @description this function unlocks aspect ratio
|
134
|
+
*/
|
135
|
+
unlockAspectRatio: () => {
|
136
|
+
desmos3DGraphingPage.buttonAspectRatio()
|
137
|
+
.click();
|
138
|
+
steps.verifyButtonAspectRatioUnlocked();
|
139
|
+
},
|
140
|
+
|
141
|
+
/**
|
142
|
+
* @description this function verifies aspect ratio is locked
|
143
|
+
*/
|
144
|
+
verifyButtonAspectRatioLocked: () => {
|
145
|
+
desmos3DGraphingPage.buttonAspectRatio()
|
146
|
+
.should('have.attr', 'aria-label', 'Locked aspect ratio')
|
147
|
+
},
|
148
|
+
|
149
|
+
/**
|
150
|
+
* @description this function verifies aspect ratio is unlocked
|
151
|
+
*/
|
152
|
+
verifyButtonAspectRatioUnlocked: () => {
|
153
|
+
desmos3DGraphingPage.buttonAspectRatio()
|
154
|
+
.should('have.attr', 'aria-label', 'Unlocked aspect ratio')
|
155
|
+
},
|
156
|
+
/**
|
157
|
+
* @description this function verifies aspect ratio is disabled
|
158
|
+
*/
|
159
|
+
verifyButtonAspectRatioDisabled: () => {
|
160
|
+
desmos3DGraphingPage.buttonAspectRatio()
|
161
|
+
.should('be.disabled')
|
162
|
+
},
|
163
|
+
|
164
|
+
/**
|
165
|
+
* @description this function verifies the reset dimensions button is disabled
|
166
|
+
*/
|
167
|
+
verifyButtonResetDimensionsDisabled: () => {
|
168
|
+
desmos3DGraphingPage.buttonResetDimensions()
|
169
|
+
.should('be.disabled');
|
170
|
+
},
|
171
|
+
|
172
|
+
/**
|
173
|
+
* @description this function verifies the reset dimensions button is enabled
|
174
|
+
*/
|
175
|
+
verifyButtonResetDimensionsEnabled: () => {
|
176
|
+
desmos3DGraphingPage.buttonResetDimensions()
|
177
|
+
.should('be.enabled');
|
178
|
+
},
|
179
|
+
|
180
|
+
/**
|
181
|
+
* @description this function resets dimensions
|
182
|
+
*/
|
183
|
+
resetDimensions: () => {
|
184
|
+
desmos3DGraphingPage.buttonResetDimensions()
|
185
|
+
.click();
|
186
|
+
},
|
187
|
+
|
188
|
+
verifyDesmosGraphingDimensions: (width, height) => {
|
189
|
+
desmos3DGraphingPage.desmosGraphingTool()
|
190
|
+
.should('have.css', 'width', width)
|
191
|
+
.and('have.css', 'height', height);
|
192
|
+
},
|
193
|
+
|
194
|
+
verifyPreviewTabDesmosGraphingDimensions: (width, height) => {
|
195
|
+
commonComponents.previewTabQuestionWrapper()
|
196
|
+
.within(() => {
|
197
|
+
desmos3DGraphingPage.desmosGraphingTool()
|
198
|
+
.should('have.css', 'width', `${width}px`)
|
199
|
+
.and('have.css', 'height', `${height}px`);
|
200
|
+
});
|
201
|
+
},
|
202
|
+
|
203
|
+
addExpression: () => {
|
204
|
+
desmos3DGraphingPage.addExpressionButton()
|
205
|
+
.click();
|
206
|
+
},
|
207
|
+
|
208
|
+
selectNewFolderOptionFromExpressionList: () => {
|
209
|
+
desmos3DGraphingPage.expressionListNewFolderOption()
|
210
|
+
.click();
|
211
|
+
},
|
212
|
+
|
213
|
+
addFolderInPreviewTabExpressionList: () => {
|
214
|
+
commonComponents.previewTabQuestionWrapper()
|
215
|
+
.within(() => {
|
216
|
+
steps.addExpression();
|
217
|
+
steps.selectNewFolderOptionFromExpressionList();
|
218
|
+
});
|
219
|
+
},
|
220
|
+
|
221
|
+
verifyDesmosGraphingOutput: (output) => {
|
222
|
+
utilities.verifyInnerText(desmos3DGraphingPage.desmosGraphingOutput(), output);
|
223
|
+
},
|
224
|
+
|
225
|
+
verifyPreviewTabDesmosGraphingOutput: (output) => {
|
226
|
+
commonComponents.previewTabQuestionWrapper()
|
227
|
+
.within(() => {
|
228
|
+
utilities.verifyInnerText(desmos3DGraphingPage.desmosGraphingOutput(), output);
|
229
|
+
});
|
230
|
+
},
|
231
|
+
|
232
|
+
verifyFolderInExpressionListVisible: () => {
|
233
|
+
utilities.verifyElementVisibilityState(desmos3DGraphingPage.folderInExpressionList(), 'notExist');
|
234
|
+
},
|
235
|
+
|
236
|
+
verifyFlagThisItemNonAccessibleCheckboxIsUnchecked: () => {
|
237
|
+
desmos3DGraphingPage.flagNonAccessibleCheckbox()
|
238
|
+
.should('not.be.checked');
|
239
|
+
},
|
240
|
+
|
241
|
+
checkFlagThisItemNonAccessibleCheckbox: () => {
|
242
|
+
desmos3DGraphingPage.flagNonAccessibleCheckbox()
|
243
|
+
.click()
|
244
|
+
.should('be.checked');
|
245
|
+
},
|
246
|
+
|
247
|
+
verifyInputInPreviewTabTextAreaField: (inputText) => {
|
248
|
+
commonComponents.previewTabQuestionWrapper()
|
249
|
+
.within(() => {
|
250
|
+
utilities.verifyInnerText(desmosToolComponent.previewTabDesmosTextArea(), inputText);
|
251
|
+
});
|
252
|
+
},
|
253
|
+
/**
|
254
|
+
* @param {number} width holds value of width attribute
|
255
|
+
* @description function updates width in input field
|
256
|
+
*/
|
257
|
+
updateWidth: (width) => {
|
258
|
+
desmos3DGraphingPage.widthInputField()
|
259
|
+
.clear()
|
260
|
+
.type(width);
|
261
|
+
},
|
262
|
+
/**
|
263
|
+
* @param {number} width holds value of width attribute
|
264
|
+
* @description function verifies width in input field
|
265
|
+
*/
|
266
|
+
verifyWidth: (width) => {
|
267
|
+
desmos3DGraphingPage.widthInputField()
|
268
|
+
.should('have.value', width);
|
269
|
+
},
|
270
|
+
/**
|
271
|
+
* @param {number} height holds value of height attribute
|
272
|
+
* @description function updates height in input field
|
273
|
+
*/
|
274
|
+
updateHeight: (height) => {
|
275
|
+
desmos3DGraphingPage.heightInputField()
|
276
|
+
.clear()
|
277
|
+
.type(height);
|
278
|
+
},
|
279
|
+
/**
|
280
|
+
* @param {number} height holds value of height attribute
|
281
|
+
* @description function verifies height in input field
|
282
|
+
*/
|
283
|
+
verifyHeight: (height) => {
|
284
|
+
desmos3DGraphingPage.heightInputField()
|
285
|
+
.should('have.value', height);
|
286
|
+
},
|
287
|
+
/**
|
288
|
+
* @param {number} width holds value of width attribute
|
289
|
+
* @description function verifies width property in image
|
290
|
+
*/
|
291
|
+
verifyUpdatedWidthOfImage: (width) => {
|
292
|
+
rulerPage.widthInputField()
|
293
|
+
.should('have.attr', 'width', width)
|
294
|
+
},
|
295
|
+
/**
|
296
|
+
* @param {number} height holds value of height attribute
|
297
|
+
* @description function verifies height property in image
|
298
|
+
*/
|
299
|
+
verifyUpdatedHeightOfImage: (height) => {
|
300
|
+
rulerPage.uploadedImagePreview()
|
301
|
+
.find('img')
|
302
|
+
.should('have.attr', 'height', height)
|
303
|
+
},
|
304
|
+
verifyInsertResourceLinkPlaceholderText: () => {
|
305
|
+
desmos3DGraphingPage.insertResourceLinkInputField()
|
306
|
+
.should('have.attr', 'placeholder', 'www.desmos.com/');
|
307
|
+
},
|
308
|
+
/**
|
309
|
+
* @description add desmos 3D Link to insert resource link input field
|
310
|
+
* @param {string} inputURL
|
311
|
+
*/
|
312
|
+
addInputToInsertResourceLinkInputField: (inputURL) => {
|
313
|
+
desmos3DGraphingPage.insertResourceLinkInputField()
|
314
|
+
.focus()
|
315
|
+
.clear()
|
316
|
+
.type(`${inputURL}`);
|
317
|
+
utilities.hoverAwayFromElement();
|
318
|
+
},
|
319
|
+
verifyInsertResourceLinkPlaceholderTextNotDisplayed: () => {
|
320
|
+
desmos3DGraphingPage.insertResourceLinkInputField()
|
321
|
+
.should('not.have.attr', 'placeholder');
|
322
|
+
},
|
323
|
+
clearInputToInsertResourceLinkInputField: () => {
|
324
|
+
desmos3DGraphingPage.insertResourceLinkInputField()
|
325
|
+
.clear();
|
326
|
+
cy.get('body')
|
327
|
+
.click();
|
328
|
+
},
|
329
|
+
}
|
330
|
+
|
331
|
+
const tests = {
|
332
|
+
...createQuestionBasePage.tests,
|
333
|
+
...questionInstructionsComponent.tests,
|
334
|
+
...scoringSectionBaseEditTab.tests,
|
335
|
+
...additionalSettingsPanel.tests,
|
336
|
+
...commonComponents.tests,
|
337
|
+
...additionalSettingsAccessibilitySectionComponent.tests,
|
338
|
+
...studentViewSettingsLabelComponent.tests,
|
339
|
+
...hideExpressionListComponent.tests,
|
340
|
+
|
341
|
+
verifyGraphingQuestionSpecifyPredefinedExpressionContent: () => {
|
342
|
+
it('When user selects a scoring type the contents of the Specify predefined expression should be displayed', () => {
|
343
|
+
utilities.verifyElementVisibilityState(desmos3DGraphingPage.desmosGraphingTool(), 'exist');
|
344
|
+
utilities.verifyElementVisibilityState(desmos3DGraphingPage.previewTabDesmosToolGraph(), 'exist');
|
345
|
+
utilities.verifyElementVisibilityState(desmosToolComponent.previewTabDesmosToolKeypadButton(), 'exist');
|
346
|
+
});
|
347
|
+
},
|
348
|
+
|
349
|
+
verifyErrorMessageCSSAndA11y: () => {
|
350
|
+
it('CSS of error message', { tags: 'css' }, () => {
|
351
|
+
utilities.verifyCSS(desmos3DGraphingPage.errorMessage(), {
|
352
|
+
'color': css.color.desmosErrorText,
|
353
|
+
'font-size': css.fontSize.small,
|
354
|
+
'font-weight': css.fontWeight.regular
|
355
|
+
});
|
356
|
+
});
|
357
|
+
|
358
|
+
it('Accessibility of error message', { tags: 'a11y' }, () => {
|
359
|
+
cy.checkAccessibility(commonComponents.nextGenCreateItemWrapper());
|
360
|
+
});
|
361
|
+
}
|
362
|
+
}
|
363
|
+
|
364
|
+
export const desmos3DGraphingPage = {
|
365
|
+
...selectors,
|
366
|
+
steps,
|
367
|
+
tests
|
368
|
+
}
|