itemengine-cypress-automation 1.0.276-updatedRepo12thDec-303c8a0.0 → 1.0.277
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ChartsBar/specifyCorrectAnswerSection.js +2 -1
- package/cypress/e2e/ILC/ChartsBar/toolSettings.js +1 -1
- package/cypress/e2e/ILC/ChartsLine/toolSettings.js +1 -1
- package/cypress/e2e/ILC/Compass/compassEditTabBasicsSection.js +5 -11
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +0 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +5 -7
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -6
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/draggableOptions.js +0 -8
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +0 -8
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +0 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettingsForGroupedLayout.js +0 -2
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +0 -2
- package/cypress/e2e/ILC/EssayResponse/toolSettings.js +2 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneAlternateAnswerPopup.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +0 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/toolSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +20 -20
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +20 -20
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +20 -20
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAlternateAnswerPopup.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +0 -2
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/toolSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/allOrNothingGroupedScoring.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +17 -17
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/manuallyAndNonScored.js +7 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialDifferentWeightsBasic.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialEqualWeightsBasic.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +2 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +0 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomization.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +20 -20
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +20 -20
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +20 -20
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +18 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +18 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +18 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +18 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +18 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +9 -9
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +18 -18
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +18 -18
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +18 -18
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -18
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +18 -18
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsBasic.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
- package/cypress/e2e/ILC/FillInTheGapsTextNew/toolSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +4 -2
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +2 -4
- package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +0 -1
- package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +1 -2
- package/cypress/e2e/ILC/ImageHighlight/toolSettings.js +1 -1
- package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +0 -2
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +0 -6
- package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +2 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +4 -4
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +2 -3
- package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +0 -2
- package/cypress/e2e/ILC/Matching/toolSettings.js +1 -1
- package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/NumberLineLabel/toolSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/previewContentsForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/Protractor/protractorEditTabBasicsSection.js +4 -3
- package/cypress/e2e/ILC/Protractor/protractorEditTabFunctionality.js +0 -4
- package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +3 -2
- package/cypress/e2e/ILC/Ruler/rulerEditTabFunctionality.js +0 -5
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingWithAlternativeAnswer.js +1 -1
- package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +0 -3
- package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +3 -6
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/additionalSettingsForAnswerInputFields.js +1 -23
- package/cypress/e2e/ILC/TextEntryMath/customSettingsSeparators.ts +0 -476
- package/cypress/e2e/ILC/TextEntryMath/equationEditor.smoke.js +1 -1
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +5 -7
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +3 -3
- package/cypress/e2e/ILC/ToolAudioPlayerNew/standardAudioPlayerStyle.js +1 -1
- package/cypress/e2e/ILC/VideoResponseNew/standardRecorderStyle.js +6 -6
- package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +6 -6
- package/cypress/e2e/ILC/chartsDotsPlot/toolSettings.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +84 -84
- package/cypress/pages/audioPlayerPage.js +2 -2
- package/cypress/pages/components/ariaLabelSectionComponent.js +2 -2
- package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +1 -1
- package/cypress/pages/components/customSettingsSeparatorsComponent.ts +1 -19
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +1 -1
- package/cypress/pages/components/essayResponseCommonComponents.js +5 -6
- package/cypress/pages/components/imageCanvasComponent.js +2 -2
- package/cypress/pages/components/layoutSectionComponent.js +2 -6
- package/cypress/pages/components/numberLineCommonComponent.js +5 -12
- package/cypress/pages/components/playbackControlsBaseComponent.js +0 -5
- package/cypress/pages/components/scoringSectionBaseEditTab.js +3 -3
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
- package/cypress/pages/drawingResponsePage.js +1 -18
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -3
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +6 -19
- package/cypress/pages/gridFillPage.js +3 -2
- package/cypress/pages/listOrderingPage.js +12 -19
- package/cypress/pages/matchingPage.js +2 -16
- package/cypress/pages/textEntryMathPage.js +4 -716
- package/cypress/pages/textEntryMathWithImagePage.js +5 -133
- package/package.json +1 -1
- package/cypress/e2e/ILC/TextEntryMath/styleAndLayoutCustomization.js +0 -129
- package/cypress/e2e/ILC/TextEntryMathWithImage/styleAndLayoutCustomization.js +0 -384
@@ -1,14 +1,9 @@
|
|
1
1
|
import { decimalSeparator, evaluationMethods } from "../fixtures/evaluationMethodsAndCustomSettings"
|
2
2
|
import utilities from "../support/helpers/utilities"
|
3
|
-
import { questionInstructionsComponent, questionInputFieldComponent, createQuestionBasePage, commonComponents, additionalSettingsPanel, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, autoScoredScoringPreviewTab, equationEditorFlyout, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, ckEditorToolbar, colorPopupComponent, gradingViewEnumerationComponent, ariaLabelSectionComponent, additionalSettingsAccessibilitySectionComponent, equationEditorSectionCommonComponent
|
3
|
+
import { questionInstructionsComponent, questionInputFieldComponent, createQuestionBasePage, commonComponents, additionalSettingsPanel, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, autoScoredScoringPreviewTab, equationEditorFlyout, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, ckEditorToolbar, colorPopupComponent, gradingViewEnumerationComponent, ariaLabelSectionComponent, additionalSettingsAccessibilitySectionComponent, equationEditorSectionCommonComponent } from "./components"
|
4
4
|
import { customSettingsSeparatorComponent } from "./components/customSettingsSeparatorsComponent";
|
5
|
-
import { dialogBoxBase } from "./dialogBoxBase";
|
6
|
-
|
7
5
|
|
8
6
|
const css = Cypress.env('css');
|
9
|
-
const borderStyles = ["Dashed", "Dotted", "Solid", "None"]
|
10
|
-
const modifiedColor = 'rgb(121, 60, 60)'
|
11
|
-
const selectedStyle = 'dashed';
|
12
7
|
|
13
8
|
const selectors = {
|
14
9
|
...questionInstructionsComponent,
|
@@ -23,8 +18,6 @@ const selectors = {
|
|
23
18
|
...gradingViewEnumerationComponent,
|
24
19
|
...ariaLabelSectionComponent,
|
25
20
|
...equationEditorSectionCommonComponent,
|
26
|
-
...styleAndLayoutCustomizationAccordionComponent,
|
27
|
-
...imageCanvasComponent,
|
28
21
|
addStructureTab: () => cy.get('[data-ngie-testid="add-structure-tab"]'),
|
29
22
|
responseToken: () => cy.get('.cke_button__addresponse'),
|
30
23
|
penaltyPointsForEachIncorrectOptionInputField: () => cy.get('input[aria-label="Penalty points for each incorrect text container"]'),
|
@@ -34,7 +27,6 @@ const selectors = {
|
|
34
27
|
responseAccordion: () => cy.get('.response-accordion [class*="ResponseAccordionstyles__ResponsePanel"]'),
|
35
28
|
responseAccordionLabel: () => cy.get('[class*="ResponseAccordionstyles__Label"]'),
|
36
29
|
responseAccordionAnswerInputField: () => cy.get('[class*="__AnswersWrapper"] .equation-input-component .mq-editable-field'),
|
37
|
-
responseAccordionAnswerInputFieldNew: () => cy.get('[class*="__AnswersWrapper"] .equation-input-component'),
|
38
30
|
responseAccordionPointsWrapper: () => cy.get('[class*="ResponseAccordionstyles__PointsDiv"]'),
|
39
31
|
responseAccordionPointsLabel: () => cy.get('[class*="ResponseAccordionstyles__PointsLabel"]'),
|
40
32
|
responseAccordionPointsScore: () => cy.get('[class*="ResponseAccordionstyles__Points-"]'),
|
@@ -141,7 +133,7 @@ const selectors = {
|
|
141
133
|
//Formula Template
|
142
134
|
layoutAccordion: () => cy.get('.custom-settings-option-wrapper .ngie-accordion-summary:visible').eq(0),
|
143
135
|
layoutAccordionExpandIcon: () => cy.get('.ngie-accordion-summary [class*="expandIconWrapper"]').eq(2),
|
144
|
-
inputFieldLayoutAccordion: () => cy.get('.equation-input-component[aria-label*="Math template"]
|
136
|
+
inputFieldLayoutAccordion: () => cy.get('.equation-input-component[aria-label*="Math template"]'),
|
145
137
|
addResponseContainerButton: () => cy.get('[type="button"][class*="ResponseContainerButton"]'),
|
146
138
|
responseFieldFormulaTemplatePreviewTab: () => cy.get('.add_response_element .mq-root-block'),
|
147
139
|
responseContainerLabel: () => cy.get('[class*="FormulaTemplatestyles__ResponseContainerWrapper"]'),
|
@@ -155,22 +147,6 @@ const selectors = {
|
|
155
147
|
equationEditorInputField: () => cy.get('[class*="EquationEditorstyles__PreviewWrappe"]'),
|
156
148
|
equationEditorInputFieldNew: () => cy.get('.latex-preview-response-wrapper'),
|
157
149
|
dialogBox: () => cy.get('[role="dialog"]'),
|
158
|
-
|
159
|
-
//style and layout customization
|
160
|
-
componentContainerLabel: () => cy.get('[class*="styles__SectionWrapper"][class*="label"]'),
|
161
|
-
fillColorLabel: () => cy.get('.sub-section-label').eq(0),
|
162
|
-
borderColorLabel: () => cy.get('.sub-section-label').eq(1),
|
163
|
-
colorBlock: () => cy.get('.color-grid-wrapper .color-picker-block'),
|
164
|
-
editColorButton: () => cy.get('button[aria-label="edit color"]'),
|
165
|
-
borderStyleLabel: () => cy.get('.options-border-style .options-label'),
|
166
|
-
dashedBorderStyleToggleButton: () => cy.get('[data-ngie-testid="dashed-toggle-button"]').eq(0),
|
167
|
-
dottedBorderStyleToggleButton: () => cy.get('[data-ngie-testid="dotted-toggle-button"]').eq(0),
|
168
|
-
solidBorderStyleToggleButton: () => cy.get('[data-ngie-testid="solid-toggle-button"]').eq(0),
|
169
|
-
noneBorderStyleToggleButton: () => cy.get('[data-ngie-testid="none-toggle-button"]').eq(0),
|
170
|
-
colorBlockSelectedIcon: () => cy.get('[class*="BtnSelectionWrapper"] svg'),
|
171
|
-
responseArea: () => cy.get('[data-widget="add_response"]'),
|
172
|
-
responseAreaNew: () => cy.get('.canvas-dropzone'),
|
173
|
-
answerInputFieldPreviewTabNew: () => cy.get('.equation-input-component '),
|
174
150
|
}
|
175
151
|
|
176
152
|
const steps = {
|
@@ -191,8 +167,6 @@ const steps = {
|
|
191
167
|
...gradingViewEnumerationComponent.steps,
|
192
168
|
...ariaLabelSectionComponent.steps,
|
193
169
|
...equationEditorSectionCommonComponent.steps,
|
194
|
-
...styleAndLayoutCustomizationAccordionComponent.steps,
|
195
|
-
...imageCanvasComponent.steps,
|
196
170
|
verifyAddStructureTabIsSelected: () => {
|
197
171
|
textEntryMathPage.addStructureTab()
|
198
172
|
.should('have.attr', 'aria-selected', 'true');
|
@@ -1020,7 +994,7 @@ const steps = {
|
|
1020
994
|
*/
|
1021
995
|
verifyAnswerInputFieldAriaLabelSpecifyCorrectAnswerSection: (inputFieldIndex, ariaLabel) => {
|
1022
996
|
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(inputFieldIndex);
|
1023
|
-
textEntryMathPage.
|
997
|
+
textEntryMathPage.responseAccordionAnswerInputField()
|
1024
998
|
.eq(inputFieldIndex)
|
1025
999
|
.should('have.attr', 'aria-label', ariaLabel)
|
1026
1000
|
},
|
@@ -1108,229 +1082,6 @@ const steps = {
|
|
1108
1082
|
textEntryMathPage.responseInputFieldMathTemplatePreviewTab()
|
1109
1083
|
.should('not.have.class', 'mq-editable-field');
|
1110
1084
|
},
|
1111
|
-
|
1112
|
-
/**
|
1113
|
-
* Verifies the ARIA label text input fields.
|
1114
|
-
* @param {number} inputFieldIndex - The index of the input field to verify.
|
1115
|
-
*/
|
1116
|
-
verifyAriaLabelTextInputFields: (inputFieldIndex) => {
|
1117
|
-
utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.inputFieldNumeration(), inputFieldIndex), `${inputFieldIndex + 1}`);
|
1118
|
-
// utilities.verifyInnerText(textEntryMathPage.inputFieldNumeration(), `${inputFieldIndex + 1}`)
|
1119
|
-
utilities.verifyInputFieldValue(textEntryMathPage.ariaLabelInputField(), '');
|
1120
|
-
},
|
1121
|
-
|
1122
|
-
/**
|
1123
|
-
* Verifies the color of a color block.
|
1124
|
-
* @param {number} blockIndex - The index of the color block.
|
1125
|
-
* @param {string} color - The expected background color of the color block.
|
1126
|
-
*/
|
1127
|
-
verifyColorBlockColor: (blockIndex, color) => {
|
1128
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.colorBlock(), blockIndex), {
|
1129
|
-
'background-color': color
|
1130
|
-
});
|
1131
|
-
},
|
1132
|
-
|
1133
|
-
/**
|
1134
|
-
* @param {number} blockIndex index of the color block in the style and layout customization section
|
1135
|
-
* @description this function verifies the selected state of a block
|
1136
|
-
*/
|
1137
|
-
verifyColorBlockSelectedState: (blockIndex) => {
|
1138
|
-
utilities.getNthElement(textEntryMathPage.colorBlock(), blockIndex)
|
1139
|
-
.should('have.class', 'selected-button-icon')
|
1140
|
-
.within(() => {
|
1141
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.colorBlockSelectedIcon(), 'visible');
|
1142
|
-
});
|
1143
|
-
},
|
1144
|
-
|
1145
|
-
/**
|
1146
|
-
* Verifies the selected state of a border style toggle button.
|
1147
|
-
* @param {('Dashed' | 'Dotted' | 'Solid' | 'None')} button - The border style to verify.
|
1148
|
-
* @throws {Error} Throws an error if an invalid border style is provided.
|
1149
|
-
*/
|
1150
|
-
verifyBorderStyleToggleButtonSelectedState: (button) => {
|
1151
|
-
switch (button) {
|
1152
|
-
case 'Dashed':
|
1153
|
-
textEntryMathPage.dashedBorderStyleToggleButton()
|
1154
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
1155
|
-
break;
|
1156
|
-
case 'Dotted':
|
1157
|
-
textEntryMathPage.dottedBorderStyleToggleButton()
|
1158
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
1159
|
-
break;
|
1160
|
-
case 'Solid':
|
1161
|
-
textEntryMathPage.solidBorderStyleToggleButton()
|
1162
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
1163
|
-
break;
|
1164
|
-
case 'None':
|
1165
|
-
textEntryMathPage.noneBorderStyleToggleButton()
|
1166
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
1167
|
-
break;
|
1168
|
-
default:
|
1169
|
-
throw new Error('Invalid border style');
|
1170
|
-
}
|
1171
|
-
},
|
1172
|
-
|
1173
|
-
/**
|
1174
|
-
* Verifies the background color of a response area element.
|
1175
|
-
* @param {number} responseAreaIndex - The index of the response area to verify.
|
1176
|
-
* @param {string} colorValue - The expected background color value.
|
1177
|
-
*/
|
1178
|
-
verifyResponseAreaFillColor: (responseAreaIndex, colorValue) => {
|
1179
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.responseArea(), responseAreaIndex), {
|
1180
|
-
'background-color': colorValue
|
1181
|
-
});
|
1182
|
-
},
|
1183
|
-
|
1184
|
-
/**
|
1185
|
-
* Selects a color block by index.
|
1186
|
-
* @param {number} blockIndex - The index of the color block to select.
|
1187
|
-
*/
|
1188
|
-
selectColorBlock: (blockIndex) => {
|
1189
|
-
utilities.getNthElement(textEntryMathPage.colorBlock(), blockIndex)
|
1190
|
-
.click();
|
1191
|
-
},
|
1192
|
-
|
1193
|
-
/**
|
1194
|
-
* Clicks on the edit color button.
|
1195
|
-
* @param {number} buttonIndex - The index of the edit color button.
|
1196
|
-
*/
|
1197
|
-
editColor: (buttonIndex) => {
|
1198
|
-
utilities.getNthElement(textEntryMathPage.editColorButton(), buttonIndex)
|
1199
|
-
.click();
|
1200
|
-
},
|
1201
|
-
|
1202
|
-
/**
|
1203
|
-
* Verifies the background color of the answer input field at the specified index.
|
1204
|
-
* @param {number} responseAreaIndex - The index of the response area to verify.
|
1205
|
-
* @param {string} colorValue - The expected background color value in CSS format.
|
1206
|
-
*/
|
1207
|
-
verifyAnswerInputFieldFillColor: (responseAreaIndex, colorValue) => {
|
1208
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTab(), responseAreaIndex), {
|
1209
|
-
'background-color': colorValue
|
1210
|
-
});
|
1211
|
-
},
|
1212
|
-
|
1213
|
-
/**
|
1214
|
-
* Verifies the border color of the answer input field at the specified index.
|
1215
|
-
* @param {number} responseAreaIndex - The index of the response area to verify.
|
1216
|
-
* @param {string} borderValue - The expected border color value in CSS format.
|
1217
|
-
*/
|
1218
|
-
verifyAnswerInputFieldBorderColor: (responseAreaIndex, borderValue) => {
|
1219
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTab(), responseAreaIndex), {
|
1220
|
-
'border': borderValue
|
1221
|
-
});
|
1222
|
-
},
|
1223
|
-
|
1224
|
-
/**
|
1225
|
-
* Verifies the border style of the answer input field at the specified index.
|
1226
|
-
* @param {number} responseAreaIndex - The index of the response area to verify.
|
1227
|
-
* @param {string} borderStyle - The expected border style value in CSS format.
|
1228
|
-
*/
|
1229
|
-
verifyAnswerInputFieldBorderStyle: (responseAreaIndex, borderStyle) => {
|
1230
|
-
const styleName = borderStyle.toLowerCase();
|
1231
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTab(), responseAreaIndex), {
|
1232
|
-
'border-style': styleName
|
1233
|
-
});
|
1234
|
-
},
|
1235
|
-
|
1236
|
-
/**
|
1237
|
-
* Selects a border style toggle button and verifies it has the selected class.
|
1238
|
-
* @param {('Dashed' | 'Dotted' | 'Solid' | 'None')} button - The border style to select.
|
1239
|
-
* @throws {Error} Throws an error if an invalid border style is provided.
|
1240
|
-
*/
|
1241
|
-
selectBorderStyleToggleButton: (button) => {
|
1242
|
-
switch (button) {
|
1243
|
-
case 'Dashed':
|
1244
|
-
textEntryMathPage.dashedBorderStyleToggleButton()
|
1245
|
-
.click()
|
1246
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
1247
|
-
break;
|
1248
|
-
case 'Dotted':
|
1249
|
-
textEntryMathPage.dottedBorderStyleToggleButton()
|
1250
|
-
.click()
|
1251
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
1252
|
-
break;
|
1253
|
-
case 'Solid':
|
1254
|
-
textEntryMathPage.solidBorderStyleToggleButton()
|
1255
|
-
.click()
|
1256
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
1257
|
-
break;
|
1258
|
-
case 'None':
|
1259
|
-
textEntryMathPage.noneBorderStyleToggleButton()
|
1260
|
-
.click()
|
1261
|
-
.should('have.class', 'ngie-toggle-button-selected');
|
1262
|
-
break;
|
1263
|
-
default:
|
1264
|
-
throw new Error('Invalid border style');
|
1265
|
-
}
|
1266
|
-
},
|
1267
|
-
|
1268
|
-
/**
|
1269
|
-
* Verifies the border color of a response area element.
|
1270
|
-
* @param {number} responseAreaIndex - The index of the response area to verify.
|
1271
|
-
* @param {string} colorValue - The expected border color value.
|
1272
|
-
*/
|
1273
|
-
verifyResponseAreaBorderColor: (responseAreaIndex, colorValue) => {
|
1274
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.responseArea(), responseAreaIndex), {
|
1275
|
-
'border': colorValue
|
1276
|
-
});
|
1277
|
-
},
|
1278
|
-
|
1279
|
-
/**
|
1280
|
-
* Verifies the background color of a response area element.
|
1281
|
-
* @param {number} responseAreaIndex - The index of the response area to verify.
|
1282
|
-
* @param {string} colorValue - The expected background color value.
|
1283
|
-
*/
|
1284
|
-
verifyResponseAreaFillColorAddBackGround: (responseAreaIndex, colorValue) => {
|
1285
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.responseAreaNew(), responseAreaIndex), {
|
1286
|
-
'background-color': colorValue
|
1287
|
-
});
|
1288
|
-
},
|
1289
|
-
|
1290
|
-
/**
|
1291
|
-
* Verifies the background color of the answer input field at the specified index.
|
1292
|
-
* @param {number} responseAreaIndex - The index of the response area to verify.
|
1293
|
-
* @param {string} colorValue - The expected background color value in CSS format.
|
1294
|
-
*/
|
1295
|
-
verifyAnswerInputFieldFillColorAddBackground: (responseAreaIndex, colorValue) => {
|
1296
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTabNew(), responseAreaIndex), {
|
1297
|
-
'background-color': colorValue
|
1298
|
-
});
|
1299
|
-
},
|
1300
|
-
|
1301
|
-
/**
|
1302
|
-
* Verifies the border color of a response area element.
|
1303
|
-
* @param {number} responseAreaIndex - The index of the response area to verify.
|
1304
|
-
* @param {string} colorValue - The expected border color value.
|
1305
|
-
*/
|
1306
|
-
verifyResponseAreaOverImageBorderColorAddBackGround: (responseAreaIndex, colorValue) => {
|
1307
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.responseAreaNew(), responseAreaIndex), {
|
1308
|
-
'border': colorValue
|
1309
|
-
});
|
1310
|
-
},
|
1311
|
-
|
1312
|
-
/**
|
1313
|
-
* Verifies the border color of the answer input field at the specified index.
|
1314
|
-
* @param {number} responseAreaIndex - The index of the response area to verify.
|
1315
|
-
* @param {string} borderValue - The expected border color value in CSS format.
|
1316
|
-
*/
|
1317
|
-
verifyAnswerInputFieldBorderColorAddBackGround: (responseAreaIndex, borderValue) => {
|
1318
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTab(), responseAreaIndex), {
|
1319
|
-
'border': borderValue
|
1320
|
-
});
|
1321
|
-
},
|
1322
|
-
|
1323
|
-
/**
|
1324
|
-
* Verifies the border style of the answer input field at the specified index.
|
1325
|
-
* @param {number} responseAreaIndex - The index of the response area to verify.
|
1326
|
-
* @param {string} borderStyle - The expected border style value in CSS format.
|
1327
|
-
*/
|
1328
|
-
verifyAnswerInputFieldBorderStyleAddBackGround: (responseAreaIndex, borderStyle) => {
|
1329
|
-
const styleName = borderStyle.toLowerCase();
|
1330
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTab(), responseAreaIndex), {
|
1331
|
-
'border-style': styleName
|
1332
|
-
});
|
1333
|
-
}
|
1334
1085
|
}
|
1335
1086
|
|
1336
1087
|
const tests = {
|
@@ -1346,7 +1097,6 @@ const tests = {
|
|
1346
1097
|
...ariaLabelSectionComponent.tests,
|
1347
1098
|
...additionalSettingsAccessibilitySectionComponent.tests,
|
1348
1099
|
...equationEditorSectionCommonComponent.tests,
|
1349
|
-
...styleAndLayoutCustomizationAccordionComponent.tests,
|
1350
1100
|
/**
|
1351
1101
|
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
1352
1102
|
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
@@ -1373,7 +1123,7 @@ const tests = {
|
|
1373
1123
|
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
1374
1124
|
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
1375
1125
|
equationEditorFlyout.steps.focusInPreviewInputField();
|
1376
|
-
equationEditorFlyout.steps.
|
1126
|
+
equationEditorFlyout.steps.clickOnEquationEditorCancelButton();
|
1377
1127
|
textEntryMathPage.steps.focusOutOfResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
1378
1128
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
|
1379
1129
|
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Answer is required.');
|
@@ -1385,11 +1135,8 @@ const tests = {
|
|
1385
1135
|
});
|
1386
1136
|
|
1387
1137
|
it('User should be able to expand multiple response accordions simultaneously', () => {
|
1388
|
-
textEntryMathPage.steps.deleteAlternativeAnswerAccordion(0);
|
1389
|
-
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
1390
1138
|
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
1391
1139
|
textEntryMathPage.steps.verifyResponseAccordionIsExpanded(0);
|
1392
|
-
textEntryMathPage.steps.verifyResponseAccordionIsExpanded(1);
|
1393
1140
|
});
|
1394
1141
|
|
1395
1142
|
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
@@ -1450,465 +1197,6 @@ const tests = {
|
|
1450
1197
|
it('User should be able to select a different evaluation method', () => {
|
1451
1198
|
textEntryMathPage.steps.selectEvaluationMethod(evaluationMethods[3].name);
|
1452
1199
|
});
|
1453
|
-
},
|
1454
|
-
|
1455
|
-
/**
|
1456
|
-
* Verifies the border color functionality in edit tab.
|
1457
|
-
* @param {string} type - 'Add structure' || 'Add background'.
|
1458
|
-
*/
|
1459
|
-
verifyBorderColorFunctionalityEditTab: (type) => {
|
1460
|
-
it('When the default color block is in selected state in the "Fill color" section, then the background color of the text containers in the question input field should be the default selected color', () => {
|
1461
|
-
if (type === 'add background') {
|
1462
|
-
textEntryMathPage.steps.verifyResponseAreaOverImageBorderColorAddBackGround(0, `1px dashed ${css.color.activeComponentBorder}`);
|
1463
|
-
}
|
1464
|
-
else {
|
1465
|
-
textEntryMathPage.steps.verifyResponseAreaBorderColor(0, `1px solid ${css.color.activeComponentBorder}`);
|
1466
|
-
textEntryMathPage.steps.verifyResponseAreaBorderColor(1, `1px solid ${css.color.activeComponentBorder}`);
|
1467
|
-
}
|
1468
|
-
});
|
1469
|
-
|
1470
|
-
it('When the user selects the "None" color block, it should get in selected state and the no background color should be present for the text containers in the question input field', () => {
|
1471
|
-
textEntryMathPage.steps.selectColorBlock(3);
|
1472
|
-
if (type === 'add background') {
|
1473
|
-
textEntryMathPage.steps.verifyResponseAreaOverImageBorderColorAddBackGround(0, `1px dashed ${css.color.transparent}`);
|
1474
|
-
}
|
1475
|
-
else {
|
1476
|
-
textEntryMathPage.steps.verifyResponseAreaBorderColor(0, `1px solid ${css.color.transparent}`);
|
1477
|
-
textEntryMathPage.steps.verifyResponseAreaBorderColor(1, `1px solid ${css.color.transparent}`);
|
1478
|
-
}
|
1479
|
-
});
|
1480
|
-
|
1481
|
-
it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the background color of the text containers in the question input field should be the modified selected color', () => {
|
1482
|
-
textEntryMathPage.steps.editColor(1);
|
1483
|
-
colorPopupComponent.steps.clickInColorSaturationPalette();
|
1484
|
-
colorPopupComponent.steps.clickOnOkButton();
|
1485
|
-
if (type === 'add background') {
|
1486
|
-
textEntryMathPage.steps.verifyResponseAreaOverImageBorderColorAddBackGround(0, `1px dashed ${modifiedColor}`);
|
1487
|
-
}
|
1488
|
-
else {
|
1489
|
-
textEntryMathPage.steps.verifyResponseAreaBorderColor(0, `1px solid ${modifiedColor}`);
|
1490
|
-
textEntryMathPage.steps.verifyResponseAreaBorderColor(1, `1px solid ${modifiedColor}`);
|
1491
|
-
}
|
1492
|
-
});
|
1493
|
-
|
1494
|
-
it('When the adds a new text container, then the background color of the newly added text container should be the modified selected color', () => {
|
1495
|
-
if (type === 'add background') {
|
1496
|
-
textEntryMathPage.steps.insertResponseArea(60);
|
1497
|
-
textEntryMathPage.steps.verifyResponseAreaOverImageBorderColorAddBackGround(0, `1px dashed ${modifiedColor}`);
|
1498
|
-
textEntryMathPage.steps.verifyResponseAreaOverImageBorderColorAddBackGround(1, `1px dashed ${modifiedColor}`);
|
1499
|
-
}
|
1500
|
-
else {
|
1501
|
-
textEntryMathPage.steps.addResponseArea();
|
1502
|
-
textEntryMathPage.steps.verifyResponseAreaBorderColor(0, `1px solid ${modifiedColor}`);
|
1503
|
-
textEntryMathPage.steps.verifyResponseAreaBorderColor(1, `1px solid ${modifiedColor}`);
|
1504
|
-
textEntryMathPage.steps.verifyResponseAreaBorderColor(2, `1px solid ${modifiedColor}`);
|
1505
|
-
}
|
1506
|
-
});
|
1507
|
-
},
|
1508
|
-
|
1509
|
-
/**
|
1510
|
-
* Verifies the border color functionality in preview tab.
|
1511
|
-
* @param {string} type - 'Add structure' || 'Add background'.
|
1512
|
-
*/
|
1513
|
-
verifyBorderColorFunctionalityPreviewTab: (type) => {
|
1514
|
-
it('When the default color block is in selected state in the "Fill color" section, then the background color of the text containers in the preview tab should be the default selected color', () => {
|
1515
|
-
if (type === 'add background') {
|
1516
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColorAddBackGround(0, `1px dashed ${css.color.activeComponentBorder}`);
|
1517
|
-
}
|
1518
|
-
else {
|
1519
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(0, `1px dashed ${css.color.activeComponentBorder}`);
|
1520
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(1, `1px dashed ${css.color.activeComponentBorder}`);
|
1521
|
-
}
|
1522
|
-
});
|
1523
|
-
|
1524
|
-
it('When the user selects the "None" color block, it should get in selected state and the no background color should be present for the text containers in the preview tab', () => {
|
1525
|
-
textEntryMathPage.steps.switchToEditTab();
|
1526
|
-
textEntryMathPage.steps.selectColorBlock(3);
|
1527
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
1528
|
-
if (type === 'add background') {
|
1529
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColorAddBackGround(0, `0px dashed ${css.color.text}`);
|
1530
|
-
}
|
1531
|
-
else {
|
1532
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(0, `0px dashed ${css.color.text}`);
|
1533
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(1, `0px dashed ${css.color.text}`);
|
1534
|
-
}
|
1535
|
-
});
|
1536
|
-
|
1537
|
-
it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the color block should get updated accordingly', () => {
|
1538
|
-
textEntryMathPage.steps.switchToEditTab();
|
1539
|
-
textEntryMathPage.steps.editColor(1);
|
1540
|
-
colorPopupComponent.steps.clickInColorSaturationPalette();
|
1541
|
-
colorPopupComponent.steps.clickOnOkButton();
|
1542
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
1543
|
-
if (type === 'add background') {
|
1544
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColorAddBackGround(0, `1px dashed ${modifiedColor}`);
|
1545
|
-
}
|
1546
|
-
else {
|
1547
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(0, `1px dashed ${modifiedColor}`);
|
1548
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(1, `1px dashed ${modifiedColor}`);
|
1549
|
-
}
|
1550
|
-
});
|
1551
|
-
|
1552
|
-
it('The background color of the text containers in the preview tab should be the modified selected color', () => {
|
1553
|
-
textEntryMathPage.steps.switchToEditTab();
|
1554
|
-
if (type === 'add background') {
|
1555
|
-
textEntryMathPage.steps.insertResponseArea(60);
|
1556
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
1557
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColorAddBackGround(0, `1px dashed ${modifiedColor}`);
|
1558
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColorAddBackGround(1, `1px dashed ${modifiedColor}`);
|
1559
|
-
}
|
1560
|
-
else {
|
1561
|
-
textEntryMathPage.steps.addResponseArea();
|
1562
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
1563
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(0, `1px dashed ${modifiedColor}`);
|
1564
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(1, `1px dashed ${modifiedColor}`);
|
1565
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(2, `1px dashed ${modifiedColor}`);
|
1566
|
-
}
|
1567
|
-
});
|
1568
|
-
},
|
1569
|
-
|
1570
|
-
verifyEditColorPopupFunctionality: () => {
|
1571
|
-
it('When the user clicks on the \'Edit color\' present in an \'Text color\' popup, then a select color popup should be displayed', () => {
|
1572
|
-
textEntryMathPage.steps.editColor(0);
|
1573
|
-
colorPopupComponent.steps.verifyColorPopupIsDisplayed();
|
1574
|
-
});
|
1575
|
-
|
1576
|
-
colorPopupComponent.tests.verifyColorPopupSelectColorTitle();
|
1577
|
-
|
1578
|
-
colorPopupComponent.tests.verifySaturationAndOpacityGradientPalette('rgb(255, 255, 255)');
|
1579
|
-
|
1580
|
-
colorPopupComponent.tests.verifyColorHuePaletteAndHexInputField('rgb(255, 0, 0)', '#ffffff');
|
1581
|
-
|
1582
|
-
colorPopupComponent.tests.verifyColorPopupFunctionality();
|
1583
|
-
},
|
1584
|
-
|
1585
|
-
verifyColorPopupUpdatingSelectedColorFunctionality: () => {
|
1586
|
-
it('When the user moves the color picker in the color saturation palette, color in the selected color block and the hex code should change, color in the hue color palette and the opacity value should not change', () => {
|
1587
|
-
textEntryMathPage.steps.editColor(0);
|
1588
|
-
colorPopupComponent.steps.clickInColorSaturationPalette();
|
1589
|
-
colorPopupComponent.steps.verifySelectedColorBlock('rgb(121, 60, 60)');
|
1590
|
-
colorPopupComponent.steps.verifySaturationPaletteColor('rgb(119, 60, 60)');
|
1591
|
-
colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
|
1592
|
-
colorPopupComponent.steps.verifyHexValue('#793c3c');
|
1593
|
-
colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(119, 60, 60)');
|
1594
|
-
});
|
1595
|
-
|
1596
|
-
it('When the user moves the color picker in the color hue palette, color in the selected color block, the hex code and the saturation color palette should change and the opacity value should not change', () => {
|
1597
|
-
colorPopupComponent.steps.clickInColorHuePalette();
|
1598
|
-
colorPopupComponent.steps.verifySelectedColorBlock('rgb(60, 121, 121)');
|
1599
|
-
colorPopupComponent.steps.verifyHuePaletteColor('rgb(0, 255, 255)');
|
1600
|
-
colorPopupComponent.steps.verifyHexValue('#3c7979');
|
1601
|
-
colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(60, 119, 119)');
|
1602
|
-
});
|
1603
|
-
|
1604
|
-
it('When the user changes the color using hex code, the color in color saturation palette and color hue palette should change and the opacity value should not change', () => {
|
1605
|
-
colorPopupComponent.steps.addInputToHexInputField('#ff0000');
|
1606
|
-
colorPopupComponent.steps.verifyHexValue('#ff0000');
|
1607
|
-
colorPopupComponent.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
|
1608
|
-
colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
|
1609
|
-
colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(255, 0, 0)');
|
1610
|
-
});
|
1611
|
-
},
|
1612
|
-
|
1613
|
-
verifyColorPopUpCancelOkButtonFunctionality: () => {
|
1614
|
-
it('When the user modifies the selected color in the color popup and clicks on \'Cancel\' button, then the popup should close, the color block should not change and the modifications in the color popup should not persist', () => {
|
1615
|
-
textEntryMathPage.steps.editColor(0);
|
1616
|
-
colorPopupComponent.steps.addInputToHexInputField('#ff0000');
|
1617
|
-
colorPopupComponent.steps.clickOnOpacityGradientHuePalette();
|
1618
|
-
colorPopupComponent.steps.clickOnCancelButton();
|
1619
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
1620
|
-
colorPopupComponent.steps.verifyColorBlockInOptionAccordion(0, 'rgb(245, 248, 255)');
|
1621
|
-
});
|
1622
|
-
|
1623
|
-
it('When the user modifies the selected color in the color popup and clicks on \'Ok\' button, then the popup should close, the color block should change to the new selected color and the modifications in the color popup should persist', () => {
|
1624
|
-
cy.log('Pre-step: clicking on the edit color button')
|
1625
|
-
textEntryMathPage.steps.editColor(0);
|
1626
|
-
colorPopupComponent.steps.addInputToHexInputField('#ff0000');
|
1627
|
-
colorPopupComponent.steps.clickOnOpacityGradientHuePalette();
|
1628
|
-
colorPopupComponent.steps.clickOnOkButton();
|
1629
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
1630
|
-
colorPopupComponent.steps.verifyColorBlockInOptionAccordion(0, 'rgba(255, 0, 0, 0.5)');
|
1631
|
-
});
|
1632
|
-
},
|
1633
|
-
|
1634
|
-
verifyStyleAndLayoutCustomizationAccordionContent: () => {
|
1635
|
-
it('"Text container" label should be displayed', () => {
|
1636
|
-
utilities.verifyInnerText(textEntryMathPage.componentContainerLabel(), 'Text container');
|
1637
|
-
});
|
1638
|
-
|
1639
|
-
it('"Fill color" label and two color blocks and an "Edit color" button should be displayed. The selected color block should be of color "rgb(245, 248, 255)" and the other color block should have "No color"', () => {
|
1640
|
-
utilities.verifyInnerText(textEntryMathPage.fillColorLabel(), 'Fill color');
|
1641
|
-
textEntryMathPage.steps.verifyColorBlockColor(0, css.color.optionsBg);
|
1642
|
-
textEntryMathPage.steps.verifyColorBlockSelectedState(0);
|
1643
|
-
textEntryMathPage.steps.verifyColorBlockColor(1, css.color.none);
|
1644
|
-
utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.editColorButton(), 0), 'Edit color');
|
1645
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.editColorButton(), 'visible');
|
1646
|
-
});
|
1647
|
-
|
1648
|
-
it('"Border color" label and two color blocks and an "Edit color" button should be displayed. The selected color block should be of color "rgb(82, 0, 255) and the other color block should have "No color"', () => {
|
1649
|
-
utilities.verifyInnerText(textEntryMathPage.borderColorLabel(), 'Border color');
|
1650
|
-
utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.editColorButton(), 1), 'Edit color');
|
1651
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.editColorButton(), 'visible');
|
1652
|
-
textEntryMathPage.steps.verifyColorBlockColor(2, css.color.activeComponentBorder);
|
1653
|
-
textEntryMathPage.steps.verifyColorBlockSelectedState(2);
|
1654
|
-
textEntryMathPage.steps.verifyColorBlockColor(3, css.color.none);
|
1655
|
-
});
|
1656
|
-
|
1657
|
-
it(`"Border style" label and four toggle buttons should be displayed - "Dashed", "Dotted", "Solid", "None". By default \'Dashed\' button should be in selected state`, () => {
|
1658
|
-
utilities.verifyInnerText(textEntryMathPage.borderStyleLabel(), 'Border style');
|
1659
|
-
utilities.verifyInnerText(textEntryMathPage.dashedBorderStyleToggleButton(), 'Dashed');
|
1660
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.dashedBorderStyleToggleButton(), 'visible');
|
1661
|
-
utilities.verifyInnerText(textEntryMathPage.dottedBorderStyleToggleButton(), 'Dotted');
|
1662
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.dottedBorderStyleToggleButton(), 'visible');
|
1663
|
-
utilities.verifyInnerText(textEntryMathPage.solidBorderStyleToggleButton(), 'Solid');
|
1664
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.solidBorderStyleToggleButton(), 'visible');
|
1665
|
-
textEntryMathPage.steps.verifyBorderStyleToggleButtonSelectedState('Dashed');
|
1666
|
-
utilities.verifyInnerText(textEntryMathPage.noneBorderStyleToggleButton(), 'None');
|
1667
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.noneBorderStyleToggleButton(), 'visible');
|
1668
|
-
});
|
1669
|
-
|
1670
|
-
it('When the user hovers over the color blocks in the "Fill color" section, hex code of the selected color should be displayed in a tooltip', () => {
|
1671
|
-
utilities.getNthElement(textEntryMathPage.colorBlock(), 0).verifyTooltip('#F5F8FF');
|
1672
|
-
utilities.getNthElement(textEntryMathPage.colorBlock(), 1).verifyTooltip('None');
|
1673
|
-
});
|
1674
|
-
|
1675
|
-
it('When the user hovers over the color blocks in the "Border color" section, hex code of the selected color should be displayed in a tooltip', () => {
|
1676
|
-
utilities.getNthElement(textEntryMathPage.colorBlock(), 2).verifyTooltip('#5200FF');
|
1677
|
-
utilities.getNthElement(textEntryMathPage.colorBlock(), 3).verifyTooltip('None');
|
1678
|
-
});
|
1679
|
-
|
1680
|
-
it('CSS of "Style and layout customization accordion contents"', { tags: 'css' }, () => {
|
1681
|
-
utilities.verifyCSS(textEntryMathPage.componentContainerLabel(), {
|
1682
|
-
'color': css.color.labels,
|
1683
|
-
'font-size': css.fontSize.default,
|
1684
|
-
'font-weight': css.fontWeight.semibold
|
1685
|
-
});
|
1686
|
-
utilities.verifyCSS(textEntryMathPage.fillColorLabel(), {
|
1687
|
-
'color': css.color.labels,
|
1688
|
-
'font-size': css.fontSize.normal,
|
1689
|
-
'font-weight': css.fontWeight.semibold
|
1690
|
-
});
|
1691
|
-
utilities.verifyCSS(textEntryMathPage.borderColorLabel(), {
|
1692
|
-
'color': css.color.labels,
|
1693
|
-
'font-size': css.fontSize.normal,
|
1694
|
-
'font-weight': css.fontWeight.semibold
|
1695
|
-
});
|
1696
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.colorBlock(), 0), {
|
1697
|
-
'background-color': css.color.optionsBg,
|
1698
|
-
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
1699
|
-
});
|
1700
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.editColorButton(), 0), {
|
1701
|
-
'color': css.color.activeButtons,
|
1702
|
-
'font-size': css.fontSize.default,
|
1703
|
-
'font-weight': css.fontWeight.regular,
|
1704
|
-
'background-color': css.color.transparent
|
1705
|
-
});
|
1706
|
-
utilities.verifyCSS(textEntryMathPage.borderStyleLabel(), {
|
1707
|
-
'color': css.color.labels,
|
1708
|
-
'font-size': css.fontSize.normal,
|
1709
|
-
'font-weight': css.fontWeight.semibold
|
1710
|
-
});
|
1711
|
-
utilities.verifyCSS(textEntryMathPage.dottedBorderStyleToggleButton(), {
|
1712
|
-
'color': css.color.secondaryBtn,
|
1713
|
-
'background-color': css.color.secondaryBtnBg,
|
1714
|
-
'font-size': css.fontSize.default,
|
1715
|
-
'font-weight': css.fontWeight.regular,
|
1716
|
-
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
1717
|
-
});
|
1718
|
-
let selectedToggleButton;
|
1719
|
-
if (selectedStyle == 'dashed') {
|
1720
|
-
selectedToggleButton = textEntryMathPage.dashedBorderStyleToggleButton();
|
1721
|
-
} else {
|
1722
|
-
selectedToggleButton = textEntryMathPage.solidBorderStyleToggleButton();
|
1723
|
-
}
|
1724
|
-
utilities.verifyCSS(selectedToggleButton, {
|
1725
|
-
'color': css.color.defaultBackground,
|
1726
|
-
'background-color': css.color.secondaryBtnBg,
|
1727
|
-
'font-size': css.fontSize.default,
|
1728
|
-
'font-weight': css.fontWeight.regular,
|
1729
|
-
'border': `2px solid ${css.color.primaryBtnBg}`
|
1730
|
-
});
|
1731
|
-
});
|
1732
|
-
|
1733
|
-
it('Accessibility of "Style and layout customization accordion contents"', { tags: 'a11y' }, () => {
|
1734
|
-
cy.checkAccessibility(textEntryMathPage.componentContainerLabel().parents('.ngie-accordion-detail'))
|
1735
|
-
});
|
1736
|
-
|
1737
|
-
it('CSS of "Style and layout customization accordion contents" - hover state', { tags: 'css' }, () => {
|
1738
|
-
utilities.triggerMouseover(utilities.getNthElement(textEntryMathPage.colorBlock(), 0));
|
1739
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.tooltipText(), 'visible');
|
1740
|
-
utilities.verifyCSS(textEntryMathPage.tooltipText(), {
|
1741
|
-
'background-color': css.color.tooltipBg,
|
1742
|
-
'color': css.color.whiteText,
|
1743
|
-
'font-size': css.fontSize.small,
|
1744
|
-
'font-weight': css.fontWeight.regular
|
1745
|
-
});
|
1746
|
-
utilities.triggerMouseout(utilities.getNthElement(textEntryMathPage.colorBlock(), 0));
|
1747
|
-
utilities.verifyElementVisibilityState(textEntryMathPage.tooltipText(), 'notExist');
|
1748
|
-
utilities.hoverOverElement(utilities.getNthElement(textEntryMathPage.editColorButton(), 0));
|
1749
|
-
utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.editColorButton(), 0), {
|
1750
|
-
'background-color': css.color.optionsBg,
|
1751
|
-
'color': css.color.activeButtons,
|
1752
|
-
'font-size': css.fontSize.default,
|
1753
|
-
'font-weight': css.fontWeight.regular
|
1754
|
-
});
|
1755
|
-
utilities.hoverAwayFromElement();
|
1756
|
-
utilities.hoverOverElement(textEntryMathPage.dottedBorderStyleToggleButton());
|
1757
|
-
utilities.verifyCSS(textEntryMathPage.dottedBorderStyleToggleButton(), {
|
1758
|
-
'color': css.color.secondaryBtn,
|
1759
|
-
'background-color': css.color.secondaryBtnBg,
|
1760
|
-
'font-size': css.fontSize.default,
|
1761
|
-
'font-weight': css.fontWeight.regular,
|
1762
|
-
'border': `2px solid ${css.color.draggableOptionBorder}`
|
1763
|
-
});
|
1764
|
-
utilities.hoverAwayFromElement();
|
1765
|
-
});
|
1766
|
-
},
|
1767
|
-
|
1768
|
-
/**
|
1769
|
-
* Verifies the fill color functionality preview tab.
|
1770
|
-
* @param {string} type - 'Add structure' || 'Add background'.
|
1771
|
-
*/
|
1772
|
-
verifyFillColorFunctionalityEditTab: (type) => {
|
1773
|
-
it('When the default color block is in selected state in the "Fill color" section, then the background color of the text containers in the question input field should be the default selected color', () => {
|
1774
|
-
if (type === 'add background') {
|
1775
|
-
textEntryMathPage.steps.verifyResponseAreaFillColorAddBackGround(0, css.color.optionsBg);
|
1776
|
-
}
|
1777
|
-
else {
|
1778
|
-
textEntryMathPage.steps.verifyResponseAreaFillColor(0, css.color.optionsBg);
|
1779
|
-
textEntryMathPage.steps.verifyResponseAreaFillColor(1, css.color.optionsBg);
|
1780
|
-
}
|
1781
|
-
});
|
1782
|
-
|
1783
|
-
it('When the user selects the "None" color block, it should get in selected state and the no background color should be present for the text containers in the question input field', () => {
|
1784
|
-
textEntryMathPage.steps.selectColorBlock(1);
|
1785
|
-
if (type === 'add background') {
|
1786
|
-
textEntryMathPage.steps.verifyResponseAreaFillColorAddBackGround(0, css.color.transparent);
|
1787
|
-
}
|
1788
|
-
else {
|
1789
|
-
textEntryMathPage.steps.verifyResponseAreaFillColor(0, css.color.transparent);
|
1790
|
-
textEntryMathPage.steps.verifyResponseAreaFillColor(1, css.color.transparent);
|
1791
|
-
}
|
1792
|
-
});
|
1793
|
-
|
1794
|
-
it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the background color of the text containers in the question input field should be the modified selected color', () => {
|
1795
|
-
textEntryMathPage.steps.editColor(0);
|
1796
|
-
colorPopupComponent.steps.clickInColorSaturationPalette();
|
1797
|
-
colorPopupComponent.steps.clickOnOkButton();
|
1798
|
-
if (type === 'add background') {
|
1799
|
-
textEntryMathPage.steps.verifyResponseAreaFillColorAddBackGround(0, modifiedColor);
|
1800
|
-
}
|
1801
|
-
else {
|
1802
|
-
textEntryMathPage.steps.verifyResponseAreaFillColor(0, modifiedColor);
|
1803
|
-
textEntryMathPage.steps.verifyResponseAreaFillColor(1, modifiedColor);
|
1804
|
-
}
|
1805
|
-
});
|
1806
|
-
|
1807
|
-
it('When the adds a new text container, then the background color of the newly added text container should be the modified selected color', () => {
|
1808
|
-
if (type === 'add background') {
|
1809
|
-
textEntryMathPage.steps.insertResponseArea(60);
|
1810
|
-
textEntryMathPage.steps.verifyResponseAreaFillColorAddBackGround(0, modifiedColor);
|
1811
|
-
textEntryMathPage.steps.verifyResponseAreaFillColorAddBackGround(1, modifiedColor);;
|
1812
|
-
}
|
1813
|
-
else {
|
1814
|
-
textEntryMathPage.steps.addResponseArea();
|
1815
|
-
textEntryMathPage.steps.verifyResponseAreaFillColor(0, modifiedColor);
|
1816
|
-
textEntryMathPage.steps.verifyResponseAreaFillColor(1, modifiedColor);
|
1817
|
-
textEntryMathPage.steps.verifyResponseAreaFillColor(2, modifiedColor);
|
1818
|
-
}
|
1819
|
-
});
|
1820
|
-
},
|
1821
|
-
|
1822
|
-
/**
|
1823
|
-
* Verifies the fill color functionality preview tab.
|
1824
|
-
* @param {string} type - 'Add structure' || 'Add background'.
|
1825
|
-
*/
|
1826
|
-
verifyFillColorFunctionalityPreviewTab: (type) => {
|
1827
|
-
it('When the default color block is in selected state in the "Fill color" section, then the background color of the text containers in the preview tab should be the default selected color', () => {
|
1828
|
-
if (type === 'add background') {
|
1829
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColorAddBackground(0, css.color.optionsBg);
|
1830
|
-
}
|
1831
|
-
else {
|
1832
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColor(0, css.color.optionsBg);
|
1833
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColor(1, css.color.optionsBg);
|
1834
|
-
}
|
1835
|
-
});
|
1836
|
-
|
1837
|
-
it('When the user selects the "None" color block, it should get in selected state and the no background color should be present for the text containers in the preview tab', () => {
|
1838
|
-
textEntryMathPage.steps.switchToEditTab();
|
1839
|
-
textEntryMathPage.steps.selectColorBlock(1);
|
1840
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
1841
|
-
if (type === 'add background') {
|
1842
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColorAddBackground(0, css.color.transparent);
|
1843
|
-
}
|
1844
|
-
else {
|
1845
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColor(0, css.color.transparent);
|
1846
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColor(1, css.color.transparent);
|
1847
|
-
}
|
1848
|
-
});
|
1849
|
-
|
1850
|
-
it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the color block should get updated accordingly', () => {
|
1851
|
-
textEntryMathPage.steps.switchToEditTab();
|
1852
|
-
textEntryMathPage.steps.editColor(0);
|
1853
|
-
colorPopupComponent.steps.clickInColorSaturationPalette();
|
1854
|
-
colorPopupComponent.steps.clickOnOkButton();
|
1855
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
1856
|
-
if (type === 'add background') {
|
1857
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColorAddBackground(0, modifiedColor);
|
1858
|
-
}
|
1859
|
-
else {
|
1860
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColor(0, modifiedColor);
|
1861
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColor(1, modifiedColor);
|
1862
|
-
}
|
1863
|
-
});
|
1864
|
-
|
1865
|
-
it('The background color of the text containers in the preview tab should be the modified selected color', () => {
|
1866
|
-
textEntryMathPage.steps.switchToEditTab();
|
1867
|
-
if (type === 'add background') {
|
1868
|
-
textEntryMathPage.steps.insertResponseArea(60);
|
1869
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
1870
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColorAddBackground(0, modifiedColor);
|
1871
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColorAddBackground(1, modifiedColor);;
|
1872
|
-
}
|
1873
|
-
else {
|
1874
|
-
textEntryMathPage.steps.addResponseArea();
|
1875
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
1876
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColor(0, modifiedColor);
|
1877
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColor(1, modifiedColor);
|
1878
|
-
textEntryMathPage.steps.verifyAnswerInputFieldFillColor(2, modifiedColor);
|
1879
|
-
}
|
1880
|
-
});
|
1881
|
-
},
|
1882
|
-
|
1883
|
-
/**
|
1884
|
-
* Verifies the border style of the answer input field preview tab.
|
1885
|
-
* @param {string} type - 'Add structure' || 'Add background'.
|
1886
|
-
*/
|
1887
|
-
verifyBorderStylePreviewTab: (type) => {
|
1888
|
-
it('When by default \'Dashed\' border style is in selected state, then the border style of the text containers in the preview tab should be \'Dashed\'', () => {
|
1889
|
-
if (type === 'add background') {
|
1890
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderStyleAddBackGround(0, 'dashed');
|
1891
|
-
}
|
1892
|
-
else {
|
1893
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderStyle(0, 'dashed');
|
1894
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderStyle(1, 'dashed');
|
1895
|
-
}
|
1896
|
-
});
|
1897
|
-
|
1898
|
-
borderStyles.forEach((style) => {
|
1899
|
-
it(`When the user selects ${style}, then the border style of the text containers in the preview tab should update to ${style}`, () => {
|
1900
|
-
textEntryMathPage.steps.switchToEditTab();
|
1901
|
-
textEntryMathPage.steps.selectBorderStyleToggleButton(style);
|
1902
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
1903
|
-
if (type === 'add background') {
|
1904
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderStyleAddBackGround(0, style);
|
1905
|
-
}
|
1906
|
-
else {
|
1907
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderStyle(0, style);
|
1908
|
-
textEntryMathPage.steps.verifyAnswerInputFieldBorderStyle(1, style);
|
1909
|
-
}
|
1910
|
-
});
|
1911
|
-
})
|
1912
1200
|
}
|
1913
1201
|
}
|
1914
1202
|
|