itemengine-cypress-automation 1.0.143-migrationScripts-d059d60.0 → 1.0.143
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/additionalSettingsBasic.js +104 -0
- package/cypress/e2e/ILC/ContentBlocks/additionalSection.js +92 -0
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +11 -1
- package/cypress/e2e/ILC/ContentBlocks/previewTab.js +91 -0
- package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +3 -3
- package/cypress/e2e/ILC/Desmos/desmosFourFunctionCalculatorEditTabBasicSection.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosFourFunctionCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosGeometryToolEditTabBasicSection.js +1 -0
- package/cypress/e2e/ILC/Desmos/desmosGeometryToolPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosGraphingCalculatorEditTabBasicSection.js +1 -0
- package/cypress/e2e/ILC/Desmos/desmosGraphingCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosMatrixCalculatorEditTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/Desmos/desmosMatrixCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/Desmos/desmosScientificCalculatorEditTabBasicSection.js +3 -2
- package/cypress/e2e/ILC/Desmos/desmosScientificCalculatorPreviewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/DesmosGraphing/additionalSettings.js +0 -5
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +124 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +0 -9
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +17 -17
- package/cypress/e2e/ILC/EssayResponse/additionalSettingsBasic.js +83 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +32 -30
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +25 -21
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +40 -41
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +249 -99
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +118 -187
- package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +11 -11
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +1 -3
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/additionalSettingsBasic.js +138 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/additionalSettingsForDropdowns.js +309 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownSettings.js +181 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettingsBasic.js +132 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsBasic.js +143 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsForDropdowns.js +345 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +49 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +25 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js +251 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +49 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsBasic.js +93 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +215 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/textContainerSettings.js +219 -0
- package/cypress/e2e/ILC/GeoGebraTools/3DGraphingCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/3DGraphingCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeoGebraTools/casCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/casCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeoGebraTools/geometryCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/geometryCalculatorPreviewTabContents.smoke.js +76 -0
- package/cypress/e2e/ILC/GeoGebraTools/graphingCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/graphingCalculatorPreviewTabContents.smoke.js +73 -0
- package/cypress/e2e/ILC/GeoGebraTools/probablityCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/probablityCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeoGebraTools/scientificCalculatorEditTabBasicSection.js +96 -0
- package/cypress/e2e/ILC/GeoGebraTools/scientificCalculatorPreviewTabContents.smoke.js +75 -0
- package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +10 -8
- package/cypress/e2e/ILC/GeogebraActivity/gradingViewAndCorrectAnswerViewContents.smoke.js +3 -2
- package/cypress/e2e/ILC/GeogebraActivity/headerSection.js +2 -1
- package/cypress/e2e/ILC/GeogebraActivity/insertResourceLink.js +318 -0
- package/cypress/e2e/ILC/GeogebraActivity/previewTabContent.smoke.js +2 -1
- package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +15 -4
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +280 -0
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +136 -0
- package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +205 -0
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +213 -0
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +106 -0
- package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +79 -0
- package/cypress/e2e/ILC/MultipleSelection/additionalSettingsBasic.js +108 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +251 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +180 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +48 -56
- package/cypress/e2e/ILC/SingleSelection/additionalSettingsBasic.js +107 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +251 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +180 -0
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +12 -3
- package/cypress/e2e/ILC/TextEntryMath/checkAnswerFunctionalityForAllViews.smoke.js +4 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +93 -68
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +59 -52
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +59 -52
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +61 -50
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +65 -51
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +55 -46
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +6 -3
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +11 -9
- package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +4 -3
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +4 -2
- package/cypress/e2e/ILC/UploadResponse/additionalSettingsBasic.js +85 -0
- package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +12 -12
- package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +1 -1
- package/cypress/fixtures/constants.js +2 -0
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +1114 -1511
- package/cypress/fixtures/theme/ilc.json +7 -1
- package/cypress/pages/audioResponsePage.js +26 -2
- package/cypress/pages/components/additionalSettingsAccessibilitySectionComponent.js +1 -0
- package/cypress/pages/components/additionalSettingsPanel.js +3 -10
- package/cypress/pages/components/ariaLabelSectionComponent.js +84 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +5 -2
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/commonComponents.js +1 -1
- package/cypress/pages/components/createCustomCategoryFlyout.js +2 -2
- package/cypress/pages/components/createQuestionBasePage.js +1 -1
- package/cypress/pages/components/desmosToolComponent.js +1 -0
- package/cypress/pages/components/draggableOptionContainer.js +1 -1
- package/cypress/pages/components/editCategoryFlyout.js +9 -10
- package/cypress/pages/components/equationEditorFlyout.js +20 -11
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +167 -3
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +149 -6
- package/cypress/pages/components/gradingViewEnumerationComponent.js +151 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +390 -0
- package/cypress/pages/components/imageCanvasComponent.js +25 -1
- package/cypress/pages/components/index.js +5 -1
- package/cypress/pages/components/placeholderTextSectionComponent.js +110 -0
- package/cypress/pages/components/responseAreaSettingsPopupComponent.js +2 -2
- package/cypress/pages/contentBlocksPage.js +60 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +4 -17
- package/cypress/pages/essayResponsePage.js +14 -11
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +15 -0
- package/cypress/pages/fillInTheGapsDropdownPage.js +121 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +70 -3
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +33 -3
- package/cypress/pages/fillInTheGapsTextPage.js +81 -4
- package/cypress/pages/geoGebraActivityPage.js +75 -11
- package/cypress/pages/geoGebraToolsPage.js +292 -0
- package/cypress/pages/graphingPage.js +2 -1
- package/cypress/pages/gridFillPage.js +713 -0
- package/cypress/pages/index.js +3 -1
- package/cypress/pages/multipleSelectionGridPage.js +71 -317
- package/cypress/pages/multipleSelectionPage.js +2 -1
- package/cypress/pages/selectQuestionResourceToolPage.js +13 -2
- package/cypress/pages/singleSelectionGridPage.js +78 -329
- package/cypress/pages/singleSelectionPage.js +2 -1
- package/cypress/pages/textEntryMathPage.js +24 -6
- package/cypress/pages/textEntryMathWithImagePage.js +1 -1
- package/cypress/pages/uploadResponsePage.js +4 -3
- package/package.json +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +0 -43
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -642
@@ -1,642 +0,0 @@
|
|
1
|
-
import { autoScoredScoringSectionMultipleResponsesType } from "./autoScoredScoringSectionMultipleResponsesType";
|
2
|
-
import { scoringSectionBase } from "./scoringSectionBase";
|
3
|
-
import { autoScoredSetCorrectAnswerSection } from "./autoScoredSetCorrectAnswerSection";
|
4
|
-
import { additionalSettingsPanel } from "./additionalSettingsPanel";
|
5
|
-
import { autoScoredAdditionalSettings } from "./autoScoredAdditionalSettings";
|
6
|
-
const css = Cypress.env('css');
|
7
|
-
|
8
|
-
const selectors = {
|
9
|
-
setCorrectAnswerResponseFieldLabel: () => cy.get('.cloze-with-text-form-control-wrapper .input-field-label'),
|
10
|
-
additionalSettingsResponseAccordion: () => cy.get('.response-setting-container .ngie-accordion-summary'),
|
11
|
-
previewTabQuestionContainer: () => cy.get('[class*="ClozeWithTextPreviewstyle__QuestionPreviewWrapper"]'),
|
12
|
-
//ScoringSection
|
13
|
-
pointsPerResponseLabel: () => cy.get('.cloze-with-text-partial-points-per-response-label'),
|
14
|
-
partialEqualWeightsPointsPerResponseScore: () => cy.get('.cloze-with-text-partial-points'),
|
15
|
-
// Additional setting accordion
|
16
|
-
advanceSettingsforAllResponseAreasLabel: () => cy.get('.additional-settings-heading-label').eq(0),
|
17
|
-
placeholderTextLabel: () => cy.get('.text-label').eq(0),
|
18
|
-
placeholderTextInputField: () => cy.get('.additional-option-placeholder-input [aria-label="Placeholder Text"]').eq(0),
|
19
|
-
heightLabel: () => cy.get('.additional-settings-label[aria-labelledby="Height (px)"]').eq(0),
|
20
|
-
heightInputField: () => cy.get('input[aria-label="Height (px)"]').eq(0),
|
21
|
-
widthLabel: () => cy.get('.additional-settings-label[aria-labelledby="Width (px)"]').eq(0),
|
22
|
-
widthInputField: () => cy.get('input[aria-label="Width (px)"]').eq(0),
|
23
|
-
//Response accordion
|
24
|
-
advanceSettingForIndividualResponsesLabel: () => cy.get('.additional-settings-heading-label').eq(1),
|
25
|
-
studentResponseAreaAndLayoutLabel: () => cy.get('.additional-settings-heading-label').eq(2),
|
26
|
-
responseAccordionWrapper: () => cy.get('.response-setting-container'),
|
27
|
-
responseAccordionPlaceholderLabel: () => cy.get('.common-text-wrapper .text-label'),
|
28
|
-
ariaLabelLabel: () => cy.get('.text-label'),
|
29
|
-
ariaLabelInputField: () => cy.get('.input-field [aria-label="ARIA label"]'),
|
30
|
-
responseAccordionCustomLabel: () => cy.get('.custom-label-container'),
|
31
|
-
matchFromAllResponsesLabel: () => cy.get('[data-ngie-testid="match-from-all-responses-checkbox"] .MuiFormControlLabel-label'),
|
32
|
-
matchFromAllResponsesCheckbox: () => cy.get('[data-ngie-testid="match-from-all-responses-checkbox"] input'),
|
33
|
-
previewTabResponseWrapper: () => cy.get('.cloze-with-text-answer-status-response-preview-wrapper'),
|
34
|
-
previewTabCorrectAnswerContainer: () => cy.get('[class*="ClozeWithTextResponsestyles__CorrectAnswerWrapper"]'),
|
35
|
-
previewTabCorrectAnswerLabel: () => cy.get('[class*="ClozeWithTextResponsestyles__CorrectAnswerLabel"]'),
|
36
|
-
previewTabCorrectAnswerResponseWrapper: () => cy.get('[class*="ClozeWithTextResponsestyles__CorrectResponseWrapper"] [aria-label*="Add answer for response"]'),
|
37
|
-
previewTabCorrectAnswerResponseNumerationWrapper: () => fillInTheGapsCommonComponents.previewTabCorrectAnswerContainer().find('.response-input-adornment') //Verify once numeration is implemented in all FIG questions
|
38
|
-
}
|
39
|
-
|
40
|
-
const steps = {
|
41
|
-
verifyIncorrectOptionCrossmarkIcon: (index) => {
|
42
|
-
fillInTheGapsCommonComponents.previewTabResponseWrapper()
|
43
|
-
.eq(index)
|
44
|
-
.find('.tick-icon-wrapper')
|
45
|
-
.should('have.class', 'icon-incorrect')
|
46
|
-
.and('be.visible');
|
47
|
-
},
|
48
|
-
|
49
|
-
verifyCorrectOptionCheckmarkIcon: (index) => {
|
50
|
-
fillInTheGapsCommonComponents.previewTabResponseWrapper()
|
51
|
-
.eq(index)
|
52
|
-
.find('.tick-icon-wrapper')
|
53
|
-
.should('have.class', 'icon-correct')
|
54
|
-
.and('be.visible');
|
55
|
-
},
|
56
|
-
|
57
|
-
verifyCorrectIncorrectIconNotVisible: (index) => {
|
58
|
-
fillInTheGapsCommonComponents.previewTabResponseWrapper()
|
59
|
-
.eq(index)
|
60
|
-
.prev('.tick-icon-wrapper')
|
61
|
-
.should('not.exist');
|
62
|
-
},
|
63
|
-
|
64
|
-
addPartialDifferentWeightsPoints: (responsePointsArray) => {
|
65
|
-
responsePointsArray.forEach((points, count) => {
|
66
|
-
scoringSectionBase.pointsInputField()
|
67
|
-
.eq(count)
|
68
|
-
.clear()
|
69
|
-
.type(points)
|
70
|
-
.should('have.value', points)
|
71
|
-
.blur();
|
72
|
-
});
|
73
|
-
},
|
74
|
-
|
75
|
-
expandResponseAccordion: (responseIndex) => {
|
76
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
77
|
-
.eq(responseIndex)
|
78
|
-
.find('.ngie-accordion-summary')
|
79
|
-
.should('have.attr', 'aria-expanded', 'false')
|
80
|
-
.click()
|
81
|
-
.should('have.attr', 'aria-expanded', 'true');
|
82
|
-
},
|
83
|
-
|
84
|
-
setAriaLabelInResponseAccordion: (responseIndex, textContent) => {
|
85
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
86
|
-
.eq(responseIndex)
|
87
|
-
.within(() => {
|
88
|
-
fillInTheGapsCommonComponents.ariaLabelInputField()
|
89
|
-
.type(textContent)
|
90
|
-
.should('have.value', textContent);
|
91
|
-
});
|
92
|
-
},
|
93
|
-
|
94
|
-
setPlaceholderTextInResponseAccordion: (responseIndex, textContent) => {
|
95
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
96
|
-
.eq(responseIndex)
|
97
|
-
.within(() => {
|
98
|
-
fillInTheGapsCommonComponents.placeholderTextInputField()
|
99
|
-
.type(textContent)
|
100
|
-
.should('have.value', textContent);
|
101
|
-
});
|
102
|
-
},
|
103
|
-
|
104
|
-
setWidthInResponseAccordion: (responseIndex, value) => {
|
105
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
106
|
-
.eq(responseIndex)
|
107
|
-
.within(() => {
|
108
|
-
fillInTheGapsCommonComponents.widthInputField()
|
109
|
-
.clear()
|
110
|
-
.type(value)
|
111
|
-
.should('have.value', value);
|
112
|
-
});
|
113
|
-
},
|
114
|
-
|
115
|
-
setHeightInResponseAccordion: (responseIndex, value) => {
|
116
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
117
|
-
.eq(responseIndex)
|
118
|
-
.within(() => {
|
119
|
-
fillInTheGapsCommonComponents.heightInputField()
|
120
|
-
.clear()
|
121
|
-
.type(value)
|
122
|
-
.should('have.value', value);
|
123
|
-
});
|
124
|
-
},
|
125
|
-
|
126
|
-
/**
|
127
|
-
* Verify correct answer responses in the correct answer container and count.
|
128
|
-
* @param {string} questionType - The question type ('fill in the gaps - text' or 'fill in the gaps with dropdown').
|
129
|
-
* @param {string[]} correctAnswerArray - An array of correct answer strings.
|
130
|
-
*/
|
131
|
-
verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount: (questionType, correctAnswerArray) => {
|
132
|
-
const isDropdown = questionType.includes('dropdown');
|
133
|
-
const responseWrapperSelector = isDropdown ? 'have.text' : 'have.value';
|
134
|
-
fillInTheGapsCommonComponents.previewTabCorrectAnswerContainer()
|
135
|
-
.should('be.visible');
|
136
|
-
fillInTheGapsCommonComponents.previewTabCorrectAnswerLabel()
|
137
|
-
.verifyInnerText('Correct answers:');
|
138
|
-
correctAnswerArray.forEach((responseFieldText, count) => {
|
139
|
-
fillInTheGapsCommonComponents.previewTabCorrectAnswerResponseWrapper()
|
140
|
-
.eq(count)
|
141
|
-
.should(responseWrapperSelector, responseFieldText);
|
142
|
-
});
|
143
|
-
fillInTheGapsCommonComponents.previewTabCorrectAnswerResponseWrapper()
|
144
|
-
.should('have.length', correctAnswerArray.length);
|
145
|
-
},
|
146
|
-
|
147
|
-
setPlaceholderText: (placeholder) => {
|
148
|
-
fillInTheGapsCommonComponents.placeholderTextInputField()
|
149
|
-
.type(placeholder)
|
150
|
-
.should('have.value', placeholder);
|
151
|
-
},
|
152
|
-
|
153
|
-
setResponseContainerHeight: (height) => {
|
154
|
-
fillInTheGapsCommonComponents.heightInputField()
|
155
|
-
.type(height)
|
156
|
-
.should('have.value', height)
|
157
|
-
.blur();
|
158
|
-
}
|
159
|
-
}
|
160
|
-
|
161
|
-
const tests = {
|
162
|
-
verifyMatchFromAllResponsesGetsDisabledWhenAlternateTabsAreDeleted: () => {
|
163
|
-
it('When the user removes all the \'Alternate\' tabs, \'Match from all responses\' functionality should get disabled', () => {
|
164
|
-
autoScoredSetCorrectAnswerSection.deleteAlternateTabButton()
|
165
|
-
.click();
|
166
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerTab(1)
|
167
|
-
.should('not.exist');
|
168
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
169
|
-
.should('not.be.checked')
|
170
|
-
.parents('.response-condition-checkbox-label')
|
171
|
-
.should('have.class', 'Mui-disabled');
|
172
|
-
});
|
173
|
-
},
|
174
|
-
|
175
|
-
verifyAutoScoredPartialEqualWeightsScoringEditTabContents: () => {
|
176
|
-
it('User should be able to select \'Partial - equal weights\' scoring type', () => {
|
177
|
-
autoScoredScoringSectionMultipleResponsesType.partialEqualWeightsCheckbox()
|
178
|
-
.click()
|
179
|
-
.should('be.checked');
|
180
|
-
});
|
181
|
-
|
182
|
-
it('When the Points input field is empty and the user has switched to \'Partial - equal weights\' scoring, then \'Points per response\' label should be displayed and a \'-\' should be displayed besides each response, \'Penalty Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed and \'Round down score\' label and checkbox should be displayed and by default it should be checked', () => {
|
183
|
-
autoScoredScoringSectionMultipleResponsesType.pointsPerResponseLabel()
|
184
|
-
.verifyInnerText('Points per response')
|
185
|
-
.should('be.visible');
|
186
|
-
autoScoredScoringSectionMultipleResponsesType.partialEqualWeightsPointsPerResponseScore()
|
187
|
-
.each(($element) => {
|
188
|
-
cy.wrap($element)
|
189
|
-
.verifyInnerText('-');
|
190
|
-
});
|
191
|
-
autoScoredScoringSectionMultipleResponsesType.penaltyPointsLabel()
|
192
|
-
.verifyInnerText('Penalty points')
|
193
|
-
.should('be.visible');
|
194
|
-
autoScoredScoringSectionMultipleResponsesType.penaltyPointsInputField()
|
195
|
-
.should('have.value', '')
|
196
|
-
.and('be.visible');
|
197
|
-
scoringSectionBase.steps.expandMinimumScoringDropdown();
|
198
|
-
scoringSectionBase.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
|
199
|
-
scoringSectionBase.minimumScoreIfAttemptedLabel()
|
200
|
-
.verifyInnerText('Minimum points')
|
201
|
-
.and('be.visible');
|
202
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
203
|
-
.should('have.value', '')
|
204
|
-
.and('be.visible');
|
205
|
-
autoScoredScoringSectionMultipleResponsesType.rounddownScoreCheckboxLabel()
|
206
|
-
.verifyInnerText('Rounding')
|
207
|
-
.and('be.visible');
|
208
|
-
autoScoredScoringSectionMultipleResponsesType.roundingDropdown()
|
209
|
-
.verifyInnerText('None');
|
210
|
-
});
|
211
|
-
|
212
|
-
it('When user gives a score input to \'Points\' input field, then the score should be equally divided and displayed besides each response under the \'Points per response\' label', () => {
|
213
|
-
scoringSectionBase.pointsInputField()
|
214
|
-
.type('4');
|
215
|
-
autoScoredScoringSectionMultipleResponsesType.partialEqualWeightsPointsPerResponseScore()
|
216
|
-
.each(($element) => {
|
217
|
-
cy.wrap($element)
|
218
|
-
.verifyInnerText('2');
|
219
|
-
});
|
220
|
-
});
|
221
|
-
},
|
222
|
-
|
223
|
-
verifyAutoScoredPartialEqualWeightsScoringEditTabFunctionality: () => {
|
224
|
-
it('When user removes a response from the question, then the points per response score should be updated accordingly', () => {
|
225
|
-
fillInTheGapsCommonComponents.steps.deleteAResponseToken(2);
|
226
|
-
autoScoredScoringSectionMultipleResponsesType.partialEqualWeightsPointsPerResponseScore()
|
227
|
-
.each(($element) => {
|
228
|
-
cy.wrap($element)
|
229
|
-
.verifyInnerText('2');
|
230
|
-
});
|
231
|
-
});
|
232
|
-
|
233
|
-
it('User should be able to enter points in \'Penalty Points\' and \'Minimum score awarded (if attempted)\' input fields', () => {
|
234
|
-
autoScoredScoringSectionMultipleResponsesType.penaltyPointsInputField()
|
235
|
-
.type('1')
|
236
|
-
.should('have.value', '1');
|
237
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
238
|
-
.type('1')
|
239
|
-
.should('have.value', '1');
|
240
|
-
});
|
241
|
-
|
242
|
-
it('CSS of \'Points per response\' label and its displayed score, \'Penalty Points\' and \'Minimum score awarded (if attempted)\' and \'Round down score\' checkbox', { tags: 'css' }, () => {
|
243
|
-
autoScoredScoringSectionMultipleResponsesType.pointsPerResponseLabel()
|
244
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
245
|
-
autoScoredScoringSectionMultipleResponsesType.partialEqualWeightsPointsPerResponseScore()
|
246
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
247
|
-
autoScoredScoringSectionMultipleResponsesType.penaltyPointsLabel()
|
248
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
249
|
-
scoringSectionBase.minimumScoreIfAttemptedLabel()
|
250
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
251
|
-
autoScoredScoringSectionMultipleResponsesType.rounddownScoreCheckboxLabel()
|
252
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
253
|
-
});
|
254
|
-
|
255
|
-
it('Accessibility of \'Penalty Points\' and \'Minimum score awarded (if attempted)\' input field and \'Round down score\' checkbox', { tags: 'a11y' }, () => {
|
256
|
-
cy.checkAccessibility(autoScoredScoringSectionMultipleResponsesType.penaltyPointsInputField());
|
257
|
-
cy.checkAccessibility(scoringSectionBase.minimumScoreIfAttemptedInputField());
|
258
|
-
cy.checkAccessibility(autoScoredScoringSectionMultipleResponsesType.roundingDropdown());
|
259
|
-
});
|
260
|
-
|
261
|
-
it('When the user switches to \'All or nothing\' scoring, the \'Points per response\' label and the points displayed for individual responses should not be displayed and the points displayed in \'Points\' input field should remain unchanged', () => {
|
262
|
-
autoScoredScoringSectionMultipleResponsesType.allOrNothingCheckbox()
|
263
|
-
.click();
|
264
|
-
autoScoredScoringSectionMultipleResponsesType.pointsPerResponseLabel()
|
265
|
-
.should('not.exist');
|
266
|
-
autoScoredScoringSectionMultipleResponsesType.partialEqualWeightsPointsPerResponseScore()
|
267
|
-
.should('not.exist');
|
268
|
-
scoringSectionBase.pointsInputField()
|
269
|
-
.should('have.value', '4');
|
270
|
-
});
|
271
|
-
|
272
|
-
it('When user has entered points in \'All or nothing\' scoring type and switches to \'Partial equal weights\' scoring type, then the score should be equally divided and displayed besides each response under the \'Points per response\' label', () => {
|
273
|
-
scoringSectionBase.pointsInputField()
|
274
|
-
.clear()
|
275
|
-
.type('9');
|
276
|
-
autoScoredScoringSectionMultipleResponsesType.partialEqualWeightsCheckbox()
|
277
|
-
.click();
|
278
|
-
autoScoredScoringSectionMultipleResponsesType.partialEqualWeightsPointsPerResponseScore()
|
279
|
-
.each(($element) => {
|
280
|
-
cy.wrap($element)
|
281
|
-
.verifyInnerText('4.5');
|
282
|
-
});
|
283
|
-
});
|
284
|
-
},
|
285
|
-
|
286
|
-
verifyAutoScoredPartialDifferentWeightsScoringEditTabContents: () => {
|
287
|
-
it('User should be able to select \'Partial - different weights\' scoring', () => {
|
288
|
-
autoScoredScoringSectionMultipleResponsesType.partialDifferentWeightsCheckbox()
|
289
|
-
.click()
|
290
|
-
.should('be.checked');
|
291
|
-
});
|
292
|
-
|
293
|
-
it('When the user has switched to \'Partial - different weights\' scoring, then \'Points per response\' label should be displayed and a points input field should be displayed besides each response option, \'Penalty Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed and \'Round down score\' checkbox should be displayed and by default it should be checked', () => {
|
294
|
-
autoScoredScoringSectionMultipleResponsesType.pointsPerResponseLabel()
|
295
|
-
.verifyInnerText('Points per response')
|
296
|
-
.and('be.visible');
|
297
|
-
scoringSectionBase.pointsInputField()
|
298
|
-
.each(($element) => {
|
299
|
-
cy.wrap($element)
|
300
|
-
.should('have.value', '');
|
301
|
-
});
|
302
|
-
autoScoredScoringSectionMultipleResponsesType.penaltyPointsLabel()
|
303
|
-
.verifyInnerText('Penalty points')
|
304
|
-
.should('be.visible');
|
305
|
-
autoScoredScoringSectionMultipleResponsesType.penaltyPointsInputField()
|
306
|
-
.should('have.value', '')
|
307
|
-
.and('be.visible');
|
308
|
-
scoringSectionBase.steps.expandMinimumScoringDropdown();
|
309
|
-
scoringSectionBase.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
|
310
|
-
scoringSectionBase.minimumScoreIfAttemptedLabel()
|
311
|
-
.verifyInnerText('Minimum points')
|
312
|
-
.and('be.visible');
|
313
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
314
|
-
.should('have.value', '')
|
315
|
-
.and('be.visible');
|
316
|
-
autoScoredScoringSectionMultipleResponsesType.rounddownScoreCheckboxLabel()
|
317
|
-
.verifyInnerText('Rounding')
|
318
|
-
.and('be.visible');
|
319
|
-
autoScoredScoringSectionMultipleResponsesType.roundingDropdown()
|
320
|
-
.verifyInnerText('None');
|
321
|
-
});
|
322
|
-
|
323
|
-
it('When the user has not set any answer in the response, then the \'Points per response\' input field should be disabled', () => {
|
324
|
-
scoringSectionBase.pointsInputField()
|
325
|
-
.each(($element) => {
|
326
|
-
cy.wrap($element)
|
327
|
-
.should('be.disabled');
|
328
|
-
});
|
329
|
-
});
|
330
|
-
},
|
331
|
-
|
332
|
-
verifyAutoScoredPartialDifferentWeightsScoringEditTabFunctionality: () => {
|
333
|
-
it('User should be able to give a score input to \'Points per response\' input fields', () => {
|
334
|
-
autoScoredScoringSectionMultipleResponsesType.steps.addPartialDifferentWeightsPoints([2.3, 3.4]);
|
335
|
-
});
|
336
|
-
|
337
|
-
it('User should be able to enter points in \'Penalty Points\' and \'Minimum score awarded (if attempted)\' input fields', () => {
|
338
|
-
autoScoredScoringSectionMultipleResponsesType.penaltyPointsInputField()
|
339
|
-
.type('1')
|
340
|
-
.should('have.value', '1');
|
341
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
342
|
-
.type('1')
|
343
|
-
.should('have.value', '1');
|
344
|
-
});
|
345
|
-
|
346
|
-
it('CSS of \'Points per response\' label, \'Penalty Points\' and \'Minimum score awarded (if attempted)\' and \'Round down score\' checkbox', { tags: 'css' }, () => {
|
347
|
-
autoScoredScoringSectionMultipleResponsesType.pointsPerResponseLabel()
|
348
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
349
|
-
autoScoredScoringSectionMultipleResponsesType.penaltyPointsLabel()
|
350
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
351
|
-
scoringSectionBase.minimumScoreIfAttemptedLabel()
|
352
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
353
|
-
autoScoredScoringSectionMultipleResponsesType.rounddownScoreCheckboxLabel()
|
354
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
355
|
-
});
|
356
|
-
|
357
|
-
it('Accessibility of \'Points per response\', \'Penalty Points\' and \'Minimum score awarded (if attempted)\' input fields and \'Round down score\' checkbox', { tags: 'a11y' }, () => {
|
358
|
-
cy.checkAccessibility(scoringSectionBase.pointsInputField());
|
359
|
-
cy.checkAccessibility(scoringSectionBase.minimumScoreIfAttemptedInputField());
|
360
|
-
cy.checkAccessibility(autoScoredScoringSectionMultipleResponsesType.roundingDropdown());
|
361
|
-
});
|
362
|
-
|
363
|
-
it('When the user switches to \'All or nothing\' scoring, the points added for individual responses in Partial - different weights scoring should get summed up in the All or nothing scoring Points input field', () => {
|
364
|
-
autoScoredScoringSectionMultipleResponsesType.allOrNothingCheckbox()
|
365
|
-
.click();
|
366
|
-
scoringSectionBase.pointsInputField()
|
367
|
-
.should('have.value', '5.7');
|
368
|
-
});
|
369
|
-
|
370
|
-
it('When user has entered points in \'All or nothing\' scoring type and switches to \'Partial different weights\' scoring type, then the points allocated should get equally divided between each correct response', () => {
|
371
|
-
scoringSectionBase.pointsInputField()
|
372
|
-
.clear()
|
373
|
-
.type('9');
|
374
|
-
autoScoredScoringSectionMultipleResponsesType.partialDifferentWeightsCheckbox()
|
375
|
-
.click();
|
376
|
-
scoringSectionBase.pointsInputField()
|
377
|
-
.each(($element) => {
|
378
|
-
cy.wrap($element)
|
379
|
-
.should('have.value', '4.5');
|
380
|
-
});
|
381
|
-
});
|
382
|
-
},
|
383
|
-
|
384
|
-
verifyManuallyScoredScoringContents: () => {
|
385
|
-
it('When the user has selected \'Manually Scored\' option from the Scoring Type dropdown then the \'Set Correct Answer\' section should not be displayed; \'All or Nothing\', \'Partial - equal weights\' and \'Partial - different weights\' radio buttons should not be displayed; \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed; and inside Additional Settings accordion Check Answer section i.e. \'Allow student to check answer\' checkbox should not be displayed', () => {
|
386
|
-
autoScoredSetCorrectAnswerSection.setCorrectAnswerLabel()
|
387
|
-
.should('not.exist');
|
388
|
-
autoScoredScoringSectionMultipleResponsesType.allOrNothingCheckbox()
|
389
|
-
.should('not.exist');
|
390
|
-
autoScoredScoringSectionMultipleResponsesType.partialEqualWeightsCheckbox()
|
391
|
-
.should('not.exist');
|
392
|
-
autoScoredScoringSectionMultipleResponsesType.partialDifferentWeightsCheckbox()
|
393
|
-
.should('not.exist');
|
394
|
-
cy.log('Pre-step: Selecting minimum scoring from dropdown');
|
395
|
-
scoringSectionBase.steps.expandMinimumScoringDropdown();
|
396
|
-
scoringSectionBase.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
|
397
|
-
scoringSectionBase.minimumScoreIfAttemptedLabel()
|
398
|
-
.verifyInnerText('Minimum points')
|
399
|
-
.and('be.visible');
|
400
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
401
|
-
.should('have.value', '')
|
402
|
-
.and('be.visible');
|
403
|
-
additionalSettingsPanel.additionalSettingsPanel()
|
404
|
-
.click();
|
405
|
-
autoScoredAdditionalSettings.checkAnswerLabel()
|
406
|
-
.should('not.exist');
|
407
|
-
autoScoredAdditionalSettings.allowStudentsToCheckAnswerLabel()
|
408
|
-
.should('not.exist');
|
409
|
-
});
|
410
|
-
},
|
411
|
-
|
412
|
-
verifyAdvanceSettingsForAllResponsesLabelAndCSS: () => {
|
413
|
-
it('\'Advanced settings for all response areas\' label should be displayed', () => {
|
414
|
-
fillInTheGapsCommonComponents.advanceSettingsforAllResponseAreasLabel()
|
415
|
-
.verifyInnerText('Advanced settings for all response areas')
|
416
|
-
.should('be.visible');
|
417
|
-
});
|
418
|
-
|
419
|
-
it('CSS of \'Advanced settings for all response areas\' section', { tags: 'css' }, () => {
|
420
|
-
fillInTheGapsCommonComponents.advanceSettingsforAllResponseAreasLabel()
|
421
|
-
.verifyCSS(css.color.labels, css.fontSize.default, css.fontWeight.semibold);
|
422
|
-
});
|
423
|
-
},
|
424
|
-
|
425
|
-
verifyPlaceholderTextLabelInputFieldAndCSS: () => {
|
426
|
-
it('\'Placeholder text\' label and input field should be displayed and by default, the input field should be empty', () => {
|
427
|
-
fillInTheGapsCommonComponents.placeholderTextLabel()
|
428
|
-
.verifyInnerText('Placeholder text');
|
429
|
-
fillInTheGapsCommonComponents.placeholderTextInputField()
|
430
|
-
.should('have.value', '');
|
431
|
-
});
|
432
|
-
|
433
|
-
it('CSS of \'Placeholder text\' section', { tags: 'css' }, () => {
|
434
|
-
fillInTheGapsCommonComponents.placeholderTextLabel()
|
435
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
436
|
-
fillInTheGapsCommonComponents.placeholderTextInputField()
|
437
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
438
|
-
});
|
439
|
-
},
|
440
|
-
|
441
|
-
verifyHeightAndWidthLabelInputFieldWithCSSAnda11y: () => {
|
442
|
-
it('\'Height\' and \'Width\' labels and input fields should be displayed and by default, the input fields should be empty', () => {
|
443
|
-
fillInTheGapsCommonComponents.heightLabel()
|
444
|
-
.verifyInnerText('Height (px)');
|
445
|
-
fillInTheGapsCommonComponents.heightInputField()
|
446
|
-
.should('have.value', '');
|
447
|
-
fillInTheGapsCommonComponents.widthLabel()
|
448
|
-
.verifyInnerText('Width (px)');
|
449
|
-
fillInTheGapsCommonComponents.widthInputField()
|
450
|
-
.should('have.value', '');
|
451
|
-
});
|
452
|
-
|
453
|
-
it('CSS of \'Height\' and \'Width\' section', { tags: 'css' }, () => {
|
454
|
-
fillInTheGapsCommonComponents.heightLabel()
|
455
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
456
|
-
fillInTheGapsCommonComponents.heightInputField()
|
457
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
458
|
-
fillInTheGapsCommonComponents.widthLabel()
|
459
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
460
|
-
fillInTheGapsCommonComponents.widthInputField()
|
461
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
462
|
-
});
|
463
|
-
|
464
|
-
it('Accessibility of \'Height\' and \'Width\' section', { tags: 'a11y' }, () => {
|
465
|
-
cy.checkAccessibility(fillInTheGapsCommonComponents.heightLabel().parents('.common-text-wrapper'));
|
466
|
-
});
|
467
|
-
},
|
468
|
-
|
469
|
-
verifyAdditionalSettingsResponseAccordionLabelCSSAndA11y: () => {
|
470
|
-
it('\'Advanced settings for individual response area\' label should be displayed', () => {
|
471
|
-
fillInTheGapsCommonComponents.advanceSettingForIndividualResponsesLabel()
|
472
|
-
.verifyInnerText('Advanced settings for individual response area')
|
473
|
-
.should('be.visible');
|
474
|
-
});
|
475
|
-
|
476
|
-
it('CSS of \'Advanced settings for individual response area\' section', { tags: 'css' }, () => {
|
477
|
-
fillInTheGapsCommonComponents.advanceSettingForIndividualResponsesLabel()
|
478
|
-
.verifyCSS(css.color.labels, css.fontSize.default, css.fontWeight.semibold);
|
479
|
-
});
|
480
|
-
|
481
|
-
it('By default \'Response\' accordion should be collapsed and by clicking on the \'Response\' accordion, user should be able to expand the accordion', () => {
|
482
|
-
cy.log('Expand the Response accordion 1')
|
483
|
-
fillInTheGapsCommonComponents.steps.expandResponseAccordion(0)
|
484
|
-
cy.log('Expand the Response accordion 2')
|
485
|
-
fillInTheGapsCommonComponents.steps.expandResponseAccordion(1)
|
486
|
-
});
|
487
|
-
|
488
|
-
it('CSS of \'Additonal Settings\' accordion', { tags: 'css' }, () => {
|
489
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
490
|
-
.eq(0)
|
491
|
-
.find('.additional-settings')
|
492
|
-
.verifyCSS(css.color.secondaryBtn, css.fontSize.default, css.fontWeight.bold);
|
493
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
494
|
-
.eq(0)
|
495
|
-
.find('svg')
|
496
|
-
.eq(0)
|
497
|
-
.should('have.css', 'fill', css.color.activeButtons);
|
498
|
-
});
|
499
|
-
|
500
|
-
it('Accessibility of \'Response\' accordion', { tags: 'a11y' }, () => {
|
501
|
-
cy.checkAccessibility(fillInTheGapsCommonComponents.responseAccordionWrapper().parents('.ngie-accordion-detail'));
|
502
|
-
});
|
503
|
-
},
|
504
|
-
|
505
|
-
verifyDefaultStateOfAriaLabelInputFieldInResponseAccordionAndCSS: () => {
|
506
|
-
it('CSS of \'ARIA label\' section', { tags: 'css' }, () => {
|
507
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
508
|
-
.each(($el) => {
|
509
|
-
cy.wrap($el)
|
510
|
-
.within(() => {
|
511
|
-
fillInTheGapsCommonComponents.ariaLabelLabel()
|
512
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
513
|
-
fillInTheGapsCommonComponents.ariaLabelInputField()
|
514
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
515
|
-
});
|
516
|
-
});
|
517
|
-
});
|
518
|
-
|
519
|
-
//Note: a11y covered in Additional Settings: Response accordion
|
520
|
-
|
521
|
-
it('By default, \'ARIA label\' label and empty \'ARIA label\' input field should be displayed', () => {
|
522
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
523
|
-
.each(($el) => {
|
524
|
-
cy.wrap($el)
|
525
|
-
.within(() => {
|
526
|
-
fillInTheGapsCommonComponents.ariaLabelLabel()
|
527
|
-
.verifyInnerText('ARIA label');
|
528
|
-
fillInTheGapsCommonComponents.ariaLabelInputField()
|
529
|
-
.should('have.value', '');
|
530
|
-
});
|
531
|
-
});
|
532
|
-
});
|
533
|
-
|
534
|
-
it('When user has not set \'ARIA label\' in the response accordion then \'Custom\' label should not be displayed', () => {
|
535
|
-
fillInTheGapsCommonComponents.responseAccordionCustomLabel()
|
536
|
-
.should('not.exist');
|
537
|
-
});
|
538
|
-
},
|
539
|
-
|
540
|
-
verifyCustomLabelOnResponseAccordionCSS: () => {
|
541
|
-
it('CSS of Custom label', { tags: 'css' }, () => {
|
542
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
543
|
-
.eq(0)
|
544
|
-
.within(() => {
|
545
|
-
fillInTheGapsCommonComponents.responseAccordionCustomLabel()
|
546
|
-
.verifyCSS(css.color.activeButtons, css.fontSize.normal, css.fontWeight.medium)
|
547
|
-
.should('have.css', 'border', `1px solid ${css.color.primaryBtnBorder}`)
|
548
|
-
});
|
549
|
-
});
|
550
|
-
},
|
551
|
-
|
552
|
-
verifyDefaultStateOfPlaceholderTextInputFieldInResponseAccordionAndCSS: () => {
|
553
|
-
it('\'Placeholder text\' label and input field should be displayed and by default, the input field should be empty for both the Response accordions', () => {
|
554
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
555
|
-
.each(($el) => {
|
556
|
-
cy.wrap($el)
|
557
|
-
.within(() => {
|
558
|
-
fillInTheGapsCommonComponents.responseAccordionPlaceholderLabel()
|
559
|
-
.verifyInnerText('Placeholder text');
|
560
|
-
fillInTheGapsCommonComponents.placeholderTextInputField()
|
561
|
-
.should('have.value', '');
|
562
|
-
});
|
563
|
-
})
|
564
|
-
});
|
565
|
-
|
566
|
-
it('CSS of \'Placeholder text\' section', { tags: 'css' }, () => {
|
567
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
568
|
-
.eq(0)
|
569
|
-
.within(() => {
|
570
|
-
fillInTheGapsCommonComponents.responseAccordionPlaceholderLabel()
|
571
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
572
|
-
fillInTheGapsCommonComponents.placeholderTextInputField()
|
573
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
574
|
-
});
|
575
|
-
});
|
576
|
-
},
|
577
|
-
|
578
|
-
verifyDefaultStateOfHeightAndWidthInputFieldInResponseAccordionAndCSS: () => {
|
579
|
-
it('\'Height (px)\' and \'Width (px)\' labels and input fields should be displayed and by default, the input fields should be empty for both the Response accordions', () => {
|
580
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
581
|
-
.each(($el) => {
|
582
|
-
cy.wrap($el)
|
583
|
-
.within(() => {
|
584
|
-
fillInTheGapsCommonComponents.heightLabel()
|
585
|
-
.verifyInnerText('Height (px)');
|
586
|
-
fillInTheGapsCommonComponents.heightInputField()
|
587
|
-
.should('have.value', '');
|
588
|
-
fillInTheGapsCommonComponents.widthLabel()
|
589
|
-
.verifyInnerText('Width (px)');
|
590
|
-
fillInTheGapsCommonComponents.widthInputField()
|
591
|
-
.should('have.value', '');
|
592
|
-
});
|
593
|
-
});
|
594
|
-
});
|
595
|
-
|
596
|
-
it('CSS of \'Height\' and \'Width\' section', { tags: 'css' }, () => {
|
597
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
598
|
-
.eq(0)
|
599
|
-
.within(() => {
|
600
|
-
fillInTheGapsCommonComponents.heightLabel()
|
601
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
602
|
-
fillInTheGapsCommonComponents.heightInputField()
|
603
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
604
|
-
fillInTheGapsCommonComponents.widthLabel()
|
605
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
606
|
-
fillInTheGapsCommonComponents.widthInputField()
|
607
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
608
|
-
});
|
609
|
-
});
|
610
|
-
},
|
611
|
-
|
612
|
-
verifyCustomLabelNotVisibleOnResponseAccordion: (advancedSetting) => {
|
613
|
-
it(`When user has not set ${advancedSetting} in the input field then Custom label should not be displayed on the response accordion`, () => {
|
614
|
-
fillInTheGapsCommonComponents.responseAccordionCustomLabel()
|
615
|
-
.should('not.exist');
|
616
|
-
});
|
617
|
-
},
|
618
|
-
|
619
|
-
verifyCustomLabelVisibleOnResponseAccordion: (advancedSetting) => {
|
620
|
-
it(`When the user sets ${advancedSetting} for a response then Custom label should be displayed on that response accordion and the other accordion should remain the same`, () => {
|
621
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
622
|
-
.eq(0)
|
623
|
-
.within(() => {
|
624
|
-
fillInTheGapsCommonComponents.responseAccordionCustomLabel()
|
625
|
-
.verifyInnerText('Custom')
|
626
|
-
.should('be.visible');
|
627
|
-
});
|
628
|
-
fillInTheGapsCommonComponents.responseAccordionWrapper()
|
629
|
-
.eq(1)
|
630
|
-
.within(() => {
|
631
|
-
fillInTheGapsCommonComponents.responseAccordionCustomLabel()
|
632
|
-
.should('not.exist');
|
633
|
-
});
|
634
|
-
});
|
635
|
-
}
|
636
|
-
}
|
637
|
-
|
638
|
-
export const fillInTheGapsCommonComponents = {
|
639
|
-
...selectors,
|
640
|
-
steps,
|
641
|
-
tests
|
642
|
-
}
|