itemengine-cypress-automation 1.0.129 → 1.0.131-updateILCrepo6March-02c78d1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +210 -0
- package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +91 -0
- package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +392 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +152 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +195 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +288 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +141 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +413 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +218 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +163 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +83 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +653 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +180 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabScoringSection.js +229 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/switchingCasesBetweenOptionsLayout.js +50 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +298 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingPenaltyScoring.js +63 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +111 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsBasic.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +232 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsBasic.js +138 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +186 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +161 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +328 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +144 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabScoringSection.js +250 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +74 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +188 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +4 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -52
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +3 -211
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +39 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -50
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +325 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +1 -146
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +78 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +265 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/responseAnswersAndAcceptedStudentInput.js +56 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +40 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +249 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +64 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +128 -0
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +889 -0
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +168 -0
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +203 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +222 -0
- package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +349 -0
- package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +132 -0
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +35 -7
- package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +213 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +41 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +377 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +161 -0
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +250 -0
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/fixtures/theme/ilc.json +6 -1
- package/cypress/fixtures/uploadResponseFileType.js +5 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -13
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +24 -6
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +42 -4
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +149 -5
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +954 -77
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +2 -1
- package/cypress/pages/contentBlocksPage.js +515 -0
- package/cypress/pages/drawingResponsePage.js +2 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +359 -3
- package/cypress/pages/fillInTheGapsDropdownPage.js +21 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +5 -57
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -24
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -435
- package/cypress/pages/fillInTheGapsTextPage.js +9 -2
- package/cypress/pages/graphingPage.js +484 -0
- package/cypress/pages/index.js +4 -1
- package/cypress/pages/simpleCalculatorPage.js +310 -0
- package/cypress/pages/uploadResponsePage.js +260 -92
- package/package.json +2 -2
- package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +0 -242
- package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +0 -99
- package/cypress/e2e/ILC/Passage/passageEditTab.js +0 -241
- package/cypress/e2e/ILC/Passage/passageHeaderSection.js +0 -73
- package/cypress/e2e/ILC/Passage/passagePreviewTab.js +0 -246
@@ -0,0 +1,310 @@
|
|
1
|
+
import utilities from "../support/helpers/utilities";
|
2
|
+
import { createQuestionBasePage } from "./components/";
|
3
|
+
|
4
|
+
const selectors = {
|
5
|
+
calculatorWrapper: () => cy.get('[class*="SimpleCalculatorComponentWrapper"]'),
|
6
|
+
calculatorDisplay: () => cy.get('.calculator-screen-wrapper'),
|
7
|
+
calculatorDisplayEquation: () => cy.get('.calculator-result-wrapper'),
|
8
|
+
checkHistoryButton: () => cy.get('[role="button"][aria-label*="history"]'),
|
9
|
+
undoButton: () => cy.get('[role="button"][aria-label*="undo action"]'),
|
10
|
+
redoButton: () => cy.get('[role="button"][aria-label*="redo action"]'),
|
11
|
+
allClearButton: () => cy.get('[role="button"][aria-label*="All clear"]'),
|
12
|
+
deleteButton: () => cy.get('[role="button"][aria-label*="Delete"]'),
|
13
|
+
divisionButton: () => cy.get('[role="button"][aria-label*="Divide"]'),
|
14
|
+
additionButton: () => cy.get('[role="button"][aria-label*="Add"]'),
|
15
|
+
multiplicationButton: () => cy.get('[role="button"][aria-label*="Multiply"]'),
|
16
|
+
subtractionButton: () => cy.get('[role="button"][aria-label*="Subtract"]'),
|
17
|
+
leftArrowButton: () => cy.get('[role="button"][aria-label*="Move cursor left"]'),
|
18
|
+
rightArrowButton: () => cy.get('[role="button"][aria-label*="Move cursor right"]'),
|
19
|
+
equalToButton: () => cy.get('[role="button"][aria-label*="Equal"]'),
|
20
|
+
leftParenthesesButton: () => cy.get('[role="button"][aria-label*="Left Bracket"]'),
|
21
|
+
rightParenthesesButton: () => cy.get('[role="button"][aria-label*="Right Bracket"]'),
|
22
|
+
piButton: () => cy.get('[role="button"][aria-label*="Pi"]'),
|
23
|
+
squareButton: () => cy.get('[role="button"][aria-label*="Square"]'),
|
24
|
+
reciprocalButton: () => cy.get('[role="button"][aria-label*="Reciprocal"]'),
|
25
|
+
percentageButton: () => cy.get('[role="button"][aria-label*="Percent"]'),
|
26
|
+
squareRootButton: () => cy.get('[role="button"][aria-label*="Root"]'),
|
27
|
+
exponentButton: () => cy.get('[role="button"][aria-label*="Exponent"]'),
|
28
|
+
signChangeButton: () => cy.get('[role="button"][aria-label*="Sign change"]'),
|
29
|
+
decimalButton: () => cy.get('[role="button"][aria-label*="Decimal"]'),
|
30
|
+
zeroButton: () => cy.get('[role="button"][aria-label*="0 Digit"]'),
|
31
|
+
oneButton: () => cy.get('[role="button"][aria-label*="1 Digit"]'),
|
32
|
+
twoButton: () => cy.get('[role="button"][aria-label*="2 Digit"]'),
|
33
|
+
threeButton: () => cy.get('[role="button"][aria-label*="3 Digit"]'),
|
34
|
+
fourButton: () => cy.get('[role="button"][aria-label*="4 Digit"]'),
|
35
|
+
fiveButton: () => cy.get('[role="button"][aria-label*="5 Digit"]'),
|
36
|
+
sixButton: () => cy.get('[role="button"][aria-label*="6 Digit"]'),
|
37
|
+
sevenButton: () => cy.get('[role="button"][aria-label*="7 Digit"]'),
|
38
|
+
eightButton: () => cy.get('[role="button"][aria-label*="8 Digit"]'),
|
39
|
+
nineButton: () => cy.get('[role="button"][aria-label*="9 Digit"]'),
|
40
|
+
calculatorDragHandleButton: () => cy.get('[class*="SimpleCalculatorComponentstyles__DragHandleWrapper"]'),
|
41
|
+
calculatorHistoryPanel: () => cy.get('.large-history-wrapper'),
|
42
|
+
historyPanelEquation: () => cy.get('.large-history-wrapper [class*="HistoryResult"]'),
|
43
|
+
historyPanelResult: () => cy.get('.large-history-wrapper [class*="HistoryScreen"]'),
|
44
|
+
customizeCalculatorSettingsHistoryButton: () => cy.get('[class*="SimpleCalculatorstyles__ButtonsWrapper"] [aria-label*="History button"]'),
|
45
|
+
customizeCalculatorSettingsUndoRedoButton: () => cy.get('[class*="SimpleCalculatorstyles__ButtonsWrapper"] [aria-label*="Undo/Redo button"]'),
|
46
|
+
customizeCalculatorSettingsParenthesesButton: () => cy.get('[class*="SimpleCalculatorstyles__ButtonsWrapper"] [aria-label*="Parentheses button"]'),
|
47
|
+
customizeCalculatorSettingsPiButton: () => cy.get('[class*="SimpleCalculatorstyles__ButtonsWrapper"] [aria-label*="Pi button"]'),
|
48
|
+
customizeCalculatorSettingsSquareButton: () => cy.get('[class*="SimpleCalculatorstyles__ButtonsWrapper"] [aria-label*="Square button"]'),
|
49
|
+
customizeCalculatorSettingsReciprocalButton: () => cy.get('[class*="SimpleCalculatorstyles__ButtonsWrapper"] [aria-label*="Reciprocal button"]'),
|
50
|
+
customizeCalculatorSettingsPercentageButton: () => cy.get('[class*="SimpleCalculatorstyles__ButtonsWrapper"] [aria-label*="Percentage button"]'),
|
51
|
+
customizeCalculatorSettingsSquareRootButton: () => cy.get('[class*="SimpleCalculatorstyles__ButtonsWrapper"] [aria-label*="Square root button"]'),
|
52
|
+
customizeCalculatorSettingsExponentButton: () => cy.get('[class*="SimpleCalculatorstyles__ButtonsWrapper"] [aria-label*="Exponent button"]'),
|
53
|
+
customizeCalculatorSettingsSignChangeButton: () => cy.get('[class*="SimpleCalculatorstyles__ButtonsWrapper"] [aria-label*="Sign change button"]'),
|
54
|
+
}
|
55
|
+
|
56
|
+
const steps = {
|
57
|
+
...createQuestionBasePage.steps,
|
58
|
+
/**
|
59
|
+
* @description Verifies the displayed result value on the calculator.
|
60
|
+
* @param {string} value - The expected value to verify against.
|
61
|
+
*/
|
62
|
+
verifyCalculatorDisplayResultValue: (value) => {
|
63
|
+
utilities.verifyTextContent(simpleCalculatorPage.calculatorDisplay(), value);
|
64
|
+
},
|
65
|
+
|
66
|
+
/**
|
67
|
+
* @description Verifies the displayed input equation value on the calculator.
|
68
|
+
* @param {string} value - The expected value to verify against.
|
69
|
+
*/
|
70
|
+
verifyCalculatorDisplayInputEquationValue: (value) => {
|
71
|
+
utilities.verifyTextContent(simpleCalculatorPage.calculatorDisplayEquation(), value);
|
72
|
+
},
|
73
|
+
|
74
|
+
verifyUndoButtonDisabled: () => {
|
75
|
+
simpleCalculatorPage.undoButton()
|
76
|
+
.should('have.class', 'disable');
|
77
|
+
},
|
78
|
+
|
79
|
+
verifyRedoButtonDisabled: () => {
|
80
|
+
simpleCalculatorPage.redoButton()
|
81
|
+
.should('have.class', 'disable');
|
82
|
+
},
|
83
|
+
|
84
|
+
verifyUndoButtonEnabled: () => {
|
85
|
+
simpleCalculatorPage.undoButton()
|
86
|
+
.should('not.have.class', 'disable');
|
87
|
+
},
|
88
|
+
|
89
|
+
verifyRedoButtonEnabled: () => {
|
90
|
+
simpleCalculatorPage.redoButton()
|
91
|
+
.should('not.have.class', 'disable');
|
92
|
+
},
|
93
|
+
|
94
|
+
/**
|
95
|
+
* @description Clicks on a button in the calculator.
|
96
|
+
* @param {string} button - The button to click. Options: ('all clear', 'delete', 'division', 'addition', 'multiplication', 'subtraction', 'left arrow', 'right arrow', 'equal to', 'left parenthesis', 'right parenthesis', 'pi', 'square', 'reciprocal', 'percentage', 'square root', 'exponent', 'sign change', 'decimal', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'undo', 'redo')
|
97
|
+
*/
|
98
|
+
clickOnACalculatorButton: (button) => {
|
99
|
+
switch (button) {
|
100
|
+
case 'all clear':
|
101
|
+
simpleCalculatorPage.allClearButton()
|
102
|
+
.click();
|
103
|
+
break;
|
104
|
+
case 'delete':
|
105
|
+
simpleCalculatorPage.deleteButton()
|
106
|
+
.click();
|
107
|
+
break;
|
108
|
+
case 'division':
|
109
|
+
simpleCalculatorPage.divisionButton()
|
110
|
+
.click();
|
111
|
+
break;
|
112
|
+
case 'addition':
|
113
|
+
simpleCalculatorPage.additionButton()
|
114
|
+
.click();
|
115
|
+
break;
|
116
|
+
case 'multiplication':
|
117
|
+
simpleCalculatorPage.multiplicationButton()
|
118
|
+
.click();
|
119
|
+
break;
|
120
|
+
case 'subtraction':
|
121
|
+
simpleCalculatorPage.subtractionButton()
|
122
|
+
.click();
|
123
|
+
break;
|
124
|
+
case 'left arrow':
|
125
|
+
simpleCalculatorPage.leftArrowButton()
|
126
|
+
.click();
|
127
|
+
break;
|
128
|
+
case 'right arrow':
|
129
|
+
simpleCalculatorPage.rightArrowButton()
|
130
|
+
.click();
|
131
|
+
break;
|
132
|
+
case 'equal to':
|
133
|
+
simpleCalculatorPage.equalToButton()
|
134
|
+
.click();
|
135
|
+
break;
|
136
|
+
case 'left parenthesis':
|
137
|
+
simpleCalculatorPage.leftParenthesesButton()
|
138
|
+
.click();
|
139
|
+
break;
|
140
|
+
case 'right parenthesis':
|
141
|
+
simpleCalculatorPage.rightParenthesesButton()
|
142
|
+
.click();
|
143
|
+
break;
|
144
|
+
case 'pi':
|
145
|
+
simpleCalculatorPage.piButton()
|
146
|
+
.click();
|
147
|
+
break;
|
148
|
+
case 'square':
|
149
|
+
simpleCalculatorPage.squareButton()
|
150
|
+
.click();
|
151
|
+
break;
|
152
|
+
case 'reciprocal':
|
153
|
+
simpleCalculatorPage.reciprocalButton()
|
154
|
+
.click();
|
155
|
+
break;
|
156
|
+
case 'percentage':
|
157
|
+
simpleCalculatorPage.percentageButton()
|
158
|
+
.click();
|
159
|
+
break;
|
160
|
+
case 'square root':
|
161
|
+
simpleCalculatorPage.squareRootButton()
|
162
|
+
.click();
|
163
|
+
break;
|
164
|
+
case 'exponent':
|
165
|
+
simpleCalculatorPage.exponentButton()
|
166
|
+
.click();
|
167
|
+
break;
|
168
|
+
case 'sign change':
|
169
|
+
simpleCalculatorPage.signChangeButton()
|
170
|
+
.click();
|
171
|
+
break;
|
172
|
+
case 'decimal':
|
173
|
+
simpleCalculatorPage.decimalButton()
|
174
|
+
.click();
|
175
|
+
break;
|
176
|
+
case 'zero':
|
177
|
+
simpleCalculatorPage.zeroButton()
|
178
|
+
.click();
|
179
|
+
break;
|
180
|
+
case 'one':
|
181
|
+
simpleCalculatorPage.oneButton()
|
182
|
+
.click();
|
183
|
+
break;
|
184
|
+
case 'two':
|
185
|
+
simpleCalculatorPage.twoButton()
|
186
|
+
.click();
|
187
|
+
break;
|
188
|
+
case 'three':
|
189
|
+
simpleCalculatorPage.threeButton()
|
190
|
+
.click();
|
191
|
+
break;
|
192
|
+
case 'four':
|
193
|
+
simpleCalculatorPage.fourButton()
|
194
|
+
.click();
|
195
|
+
break;
|
196
|
+
case 'five':
|
197
|
+
simpleCalculatorPage.fiveButton()
|
198
|
+
.click();
|
199
|
+
break;
|
200
|
+
case 'six':
|
201
|
+
simpleCalculatorPage.sixButton()
|
202
|
+
.click();
|
203
|
+
break;
|
204
|
+
case 'seven':
|
205
|
+
simpleCalculatorPage.sevenButton()
|
206
|
+
.click();
|
207
|
+
break;
|
208
|
+
case 'eight':
|
209
|
+
simpleCalculatorPage.eightButton()
|
210
|
+
.click();
|
211
|
+
break;
|
212
|
+
case 'nine':
|
213
|
+
simpleCalculatorPage.nineButton().
|
214
|
+
click();
|
215
|
+
break;
|
216
|
+
case 'undo':
|
217
|
+
simpleCalculatorPage.undoButton().
|
218
|
+
click();
|
219
|
+
break;
|
220
|
+
case 'redo':
|
221
|
+
simpleCalculatorPage.redoButton().
|
222
|
+
click();
|
223
|
+
break;
|
224
|
+
default:
|
225
|
+
throw new Error(`Invalid button: ${button}`);
|
226
|
+
}
|
227
|
+
},
|
228
|
+
|
229
|
+
resetCalculator: () => {
|
230
|
+
simpleCalculatorPage.steps.clickOnACalculatorButton('all clear');
|
231
|
+
},
|
232
|
+
|
233
|
+
selectCheckHistoryButton: () => {
|
234
|
+
simpleCalculatorPage.checkHistoryButton()
|
235
|
+
.click()
|
236
|
+
.should('have.class', 'active');
|
237
|
+
},
|
238
|
+
|
239
|
+
unselectCheckHistoryButton: () => {
|
240
|
+
simpleCalculatorPage.checkHistoryButton()
|
241
|
+
.click()
|
242
|
+
.should('not.have.class', 'active');
|
243
|
+
},
|
244
|
+
|
245
|
+
/**
|
246
|
+
* Verifies the calculator history at a specific index.
|
247
|
+
* @param {number} index - The index of the history entry to verify.
|
248
|
+
* @param {string} equation - The expected equation displayed in the history.
|
249
|
+
* @param {string} result - The expected result displayed in the history.
|
250
|
+
*/
|
251
|
+
verifyCalculatorHistory: (index, equation, result) => {
|
252
|
+
utilities.verifyInnerText(utilities.getNthElement(simpleCalculatorPage.historyPanelEquation(), index), equation);
|
253
|
+
utilities.verifyInnerText(utilities.getNthElement(simpleCalculatorPage.historyPanelResult(), index), result);
|
254
|
+
},
|
255
|
+
|
256
|
+
selectCustomizeCalculatorSettingsHistoryButton: () => {
|
257
|
+
simpleCalculatorPage.customizeCalculatorSettingsHistoryButton()
|
258
|
+
.click();
|
259
|
+
},
|
260
|
+
|
261
|
+
selectCustomizeCalculatorSettingsUndoRedoButton: () => {
|
262
|
+
simpleCalculatorPage.customizeCalculatorSettingsUndoRedoButton()
|
263
|
+
.click();
|
264
|
+
},
|
265
|
+
|
266
|
+
selectCustomizeCalculatorSettingsParenthesesButton: () => {
|
267
|
+
simpleCalculatorPage.customizeCalculatorSettingsParenthesesButton()
|
268
|
+
.click();
|
269
|
+
},
|
270
|
+
|
271
|
+
selectCustomizeCalculatorSettingsPiButton: () => {
|
272
|
+
simpleCalculatorPage.customizeCalculatorSettingsPiButton()
|
273
|
+
.click();
|
274
|
+
},
|
275
|
+
|
276
|
+
selectCustomizeCalculatorSettingsSquareButton: () => {
|
277
|
+
simpleCalculatorPage.customizeCalculatorSettingsSquareButton()
|
278
|
+
.click();
|
279
|
+
},
|
280
|
+
|
281
|
+
selectCustomizeCalculatorSettingsReciprocalButton: () => {
|
282
|
+
simpleCalculatorPage.customizeCalculatorSettingsReciprocalButton()
|
283
|
+
.click();
|
284
|
+
},
|
285
|
+
|
286
|
+
selectCustomizeCalculatorSettingsPercentageButton: () => {
|
287
|
+
simpleCalculatorPage.customizeCalculatorSettingsPercentageButton()
|
288
|
+
.click();
|
289
|
+
},
|
290
|
+
|
291
|
+
selectCustomizeCalculatorSettingsSquareRootButton: () => {
|
292
|
+
simpleCalculatorPage.customizeCalculatorSettingsSquareRootButton()
|
293
|
+
.click();
|
294
|
+
},
|
295
|
+
|
296
|
+
selectCustomizeCalculatorSettingsExponentButton: () => {
|
297
|
+
simpleCalculatorPage.customizeCalculatorSettingsExponentButton()
|
298
|
+
.click();
|
299
|
+
},
|
300
|
+
|
301
|
+
selectCustomizeCalculatorSettingsSignChangeButton: () => {
|
302
|
+
simpleCalculatorPage.customizeCalculatorSettingsSignChangeButton()
|
303
|
+
.click();
|
304
|
+
},
|
305
|
+
}
|
306
|
+
|
307
|
+
export const simpleCalculatorPage = {
|
308
|
+
...selectors,
|
309
|
+
steps
|
310
|
+
}
|