itemengine-cypress-automation 1.0.155-migrationScripts-86e4c95.0 → 1.0.155
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/DesmosGraphing/additionalSettings.js +5 -5
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +4 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +6 -6
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +2 -3
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +34 -29
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsForDropdowns.js +7 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +20 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +5 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +5 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +4 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +0 -8
- package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +39 -35
- package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +8 -6
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillColor.js +475 -0
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +669 -0
- package/cypress/e2e/ILC/GridFill/customizeLayoutSectionShadeCellsGridBorders.js +1 -1
- package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +0 -11
- package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +204 -0
- package/cypress/e2e/ILC/GridFill/gridLayoutEditTabFunctionality.js +229 -0
- package/cypress/e2e/ILC/GridFill/gridLayoutPreviewTabFunctionality.js +219 -0
- package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -0
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +0 -2
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/Matching/draggableOptions.js +1 -1
- package/cypress/e2e/ILC/Matching/headerSection.js +82 -0
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +93 -0
- package/cypress/e2e/ILC/MultipleSelection/blockCreateItem.js +2 -2
- package/cypress/e2e/ILC/MultipleSelection/editTabScoringSection.js +3 -0
- package/cypress/e2e/ILC/MultipleSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/multipleSelectionBasicAccessibility.js +8 -10
- package/cypress/e2e/ILC/MultipleSelection/specifyCorrectAnswerSection.js +3 -3
- package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +16 -25
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +403 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +363 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +393 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +377 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +341 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +373 -0
- package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +0 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +27 -8
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +15 -34
- package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +13 -15
- package/cypress/e2e/ILC/ShortTextResponseNew/specifyCorrectAnswerSection.js +4 -4
- package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +4 -2
- package/cypress/e2e/ILC/SingleSelection/blockCreateItem.js +2 -2
- package/cypress/e2e/ILC/SingleSelection/specifyCorrectAnswerSection.js +3 -3
- package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +183 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +185 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +263 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +233 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +205 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +233 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +214 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +213 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +21 -17
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +25 -25
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +20 -17
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -2
- package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +2 -3
- package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +3 -3
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +2 -2
- package/cypress/fixtures/fillColorDefaultProperties.js +35 -0
- package/cypress/fixtures/theme/ilc.json +2 -1
- package/cypress/fixtures/uploads/sampleVirus.zip +0 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +4 -1
- package/cypress/pages/components/colorPopupComponent.js +6 -3
- package/cypress/pages/components/commonComponents.js +1 -1
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +4 -3
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +47 -12
- package/cypress/pages/components/gridQuestionCommonComponent.js +0 -81
- package/cypress/pages/components/imageCanvasComponent.js +10 -8
- package/cypress/pages/components/listSortingAndOrderingBase.js +1 -1
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +1 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
- package/cypress/pages/essayResponsePage.js +4 -4
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +34 -23
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +0 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +26 -4
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +0 -29
- package/cypress/pages/graphingPage.js +26 -16
- package/cypress/pages/gridFillPage.js +1610 -90
- package/cypress/pages/matchingPage.js +164 -20
- package/cypress/pages/multipleSelectionGridPage.js +82 -2
- package/cypress/pages/multipleSelectionPage.js +7 -2
- package/cypress/pages/rulerPage.js +3 -8
- package/cypress/pages/shortTextResponsePage.js +13 -0
- package/cypress/pages/simpleCalculatorPage.js +8 -0
- package/cypress/pages/singleSelectionGridPage.js +58 -2
- package/cypress/pages/textEntryMathPage.js +58 -11
- package/cypress/pages/uploadResponsePage.js +4 -2
- package/package.json +2 -2
- package/cypress/e2e/ILC/MultipleSelection/multipleSelectionAdditionalSettings.js +0 -835
- package/cypress/e2e/ILC/SingleSelection/singleSelectionAdditionalSettings.js +0 -469
@@ -16,6 +16,7 @@ const selectors = {
|
|
16
16
|
...draggableOptionContainer,
|
17
17
|
//Edit tab
|
18
18
|
promptInputField: () => cy.get('.edit-mcq-stems-wrapper [role="textbox"]'),
|
19
|
+
promptInputFieldWrapper: () => cy.get('.edit-mcq-stems-wrapper [class*="SingleOptionstyle__EditorBlockWrapper"]'),
|
19
20
|
optionInputField: () => cy.get('.edit-mcq-options-wrapper').eq(1).find('[data-rbd-draggable-id*="option-draggable"] [role="textbox"]'),
|
20
21
|
optionWrapper: () => cy.get('.response-options-wrapper [data-rbd-draggable-id*="option-draggable"]'),
|
21
22
|
optionNumeration: () => cy.get('.response-options-wrapper [class*="SingleOptionstyle__AdornmentDiv"]'),
|
@@ -25,6 +26,9 @@ const selectors = {
|
|
25
26
|
optionsLabel: () => cy.get('.cloze-with-drag-and-drop-options-label'),
|
26
27
|
addPromptButton: () => cy.get('.add-option-wrapper-cls button').contains('Add prompt'),
|
27
28
|
deletePromptButton: () => cy.get('.edit-mcq-stems-wrapper [type="button"]'),
|
29
|
+
optionsLabel: () => cy.get('.cloze-with-drag-and-drop-options-label'),
|
30
|
+
optionWrapper: () => cy.get('.response-options-wrapper [data-rbd-draggable-id*="option-draggable"]'),
|
31
|
+
optionNumeration: () => cy.get('.response-options-wrapper [class*="SingleOptionstyle__AdornmentDiv"]'),
|
28
32
|
|
29
33
|
//Penalty points
|
30
34
|
penaltyPointsForEachIncorrectDropzoneInputField: () => cy.get('input[aria-label="Penalty points for each incorrect dropzone"]'),
|
@@ -35,6 +39,8 @@ const selectors = {
|
|
35
39
|
//Specify correct answer section
|
36
40
|
dropzoneSpecifyCorrectAnswerSection: () => cy.get('.authoring-droppable-hotspot-wrapper'),
|
37
41
|
promptSpecifyCorrectAnswerSection: () => cy.get('.stem-container [data-testid="question-instruction-element"]'),
|
42
|
+
dropzoneSpecifyCorrectAnswerSection: () => cy.get('.authoring-droppable-hotspot-wrapper'),
|
43
|
+
optionContainerOptionsSpecifyCorrectAnswerSection: () => cy.get('.draggable-selected-item'),
|
38
44
|
|
39
45
|
//Preview tab
|
40
46
|
promptContainerPreviewTab: () => cy.get('.stem-container'),
|
@@ -59,6 +65,10 @@ const steps = {
|
|
59
65
|
...equationEditorFlyout.steps,
|
60
66
|
...autoScoredStudentViewSettings.steps,
|
61
67
|
...autoScoredSpecifyCorrectAnswerSection.steps,
|
68
|
+
...autoScoredScoringSectionMultiResponseType.steps,
|
69
|
+
...draggableOptionsSectionComponent.steps,
|
70
|
+
...draggableOptionContainer.steps,
|
71
|
+
...commonComponents.steps,
|
62
72
|
...draggableOptionsSectionComponent.steps,
|
63
73
|
...draggableOptionContainer.steps,
|
64
74
|
...autoScoredScoringSectionMultiResponseType.steps,
|
@@ -137,6 +147,18 @@ const steps = {
|
|
137
147
|
.should('have.text', 'This is a bold option');
|
138
148
|
},
|
139
149
|
|
150
|
+
/**
|
151
|
+
* @param {number} index of option
|
152
|
+
* @description this function verifies error message of option input field
|
153
|
+
*/
|
154
|
+
verifyPromptInputFieldErrorMessage: (index) => {
|
155
|
+
matchingPage.promptInputFieldWrapper()
|
156
|
+
.eq(index)
|
157
|
+
.within(() => {
|
158
|
+
commonComponents.errorMessage()
|
159
|
+
.should('have.text', 'Error: Prompt is required');
|
160
|
+
});
|
161
|
+
},
|
140
162
|
|
141
163
|
/**
|
142
164
|
* Enters text into multiple options input fields.
|
@@ -149,9 +171,6 @@ const steps = {
|
|
149
171
|
.clear()
|
150
172
|
.type(options, { delay: 500 })
|
151
173
|
.blur();
|
152
|
-
matchingPage.optionInputField()
|
153
|
-
.eq(index)
|
154
|
-
.should('have.text', options);
|
155
174
|
});
|
156
175
|
},
|
157
176
|
|
@@ -177,9 +196,6 @@ const steps = {
|
|
177
196
|
.eq(index)
|
178
197
|
.type(options)
|
179
198
|
.blur();
|
180
|
-
matchingPage.optionInputField()
|
181
|
-
.eq(index)
|
182
|
-
.should('have.text', options);
|
183
199
|
},
|
184
200
|
|
185
201
|
/**
|
@@ -302,6 +318,32 @@ const steps = {
|
|
302
318
|
.should('have.value', points);
|
303
319
|
},
|
304
320
|
|
321
|
+
/**
|
322
|
+
* @param {number} index of the option
|
323
|
+
* @description verify the enter option input field, drag handle, delete button and option numeration
|
324
|
+
*/
|
325
|
+
verifyOptionsContents: (index) => {
|
326
|
+
matchingPage.optionInputField()
|
327
|
+
.eq(index)
|
328
|
+
.should('have.attr', 'data-cke-editorplaceholder', 'Enter option');
|
329
|
+
utilities.verifyElementVisibilityState(commonComponents.dragHandleButton(), 'exist');
|
330
|
+
utilities.verifyElementVisibilityState(commonComponents.deleteButton(), 'visible');
|
331
|
+
matchingPage.optionNumeration()
|
332
|
+
.eq(index)
|
333
|
+
.should('have.text', index + 1);
|
334
|
+
},
|
335
|
+
|
336
|
+
verifyDeleteOptionButtonDisabledState: () => {
|
337
|
+
matchingPage.optionWrapper()
|
338
|
+
.eq(0)
|
339
|
+
.within(() => {
|
340
|
+
optionsWrapperComponent.deleteOptionButton()
|
341
|
+
.each(($element) => {
|
342
|
+
utilities.verifyElementDisabled(cy.wrap($element))
|
343
|
+
});
|
344
|
+
});
|
345
|
+
},
|
346
|
+
|
305
347
|
//Specify correct answer section
|
306
348
|
/**
|
307
349
|
* Enter text in the answer input fields of the specify correct answer section.
|
@@ -320,6 +362,18 @@ const steps = {
|
|
320
362
|
});
|
321
363
|
},
|
322
364
|
|
365
|
+
/**
|
366
|
+
* @description Click and drop option from dropzone to option container specify correct answer section
|
367
|
+
* @param {string} optionText Text of the option
|
368
|
+
*/
|
369
|
+
clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection: (optionText) => {
|
370
|
+
matchingPage.dropzoneSpecifyCorrectAnswerSection()
|
371
|
+
.contains(optionText)
|
372
|
+
.click({ force: true });
|
373
|
+
matchingPage.optionsContainerSpecifyCorrectAnswerSection()
|
374
|
+
.click();
|
375
|
+
},
|
376
|
+
|
323
377
|
/**
|
324
378
|
* @param {string} groupTitle group title
|
325
379
|
* @param {string[]} optionArray array of options for a particular group
|
@@ -354,6 +408,11 @@ const steps = {
|
|
354
408
|
matchingPage.steps.addGroupWithTitleAndOptionsInDraggableOptionsSection(groupTitles[3], animals[3]);
|
355
409
|
},
|
356
410
|
|
411
|
+
/**
|
412
|
+
* @description Verifies the text content of a specific preview tab dropzone element.
|
413
|
+
* @param { number } count - The index of the preview tab dropzone element to verify(zero - based).
|
414
|
+
* @param { string } text - The expected text content to match against the inner text of the specified dropzone element.
|
415
|
+
*/
|
357
416
|
verifyOptionContainerOptionSpecifyCorrectAnswerSection: (optionsArray) => {
|
358
417
|
optionsArray.forEach(({ index, optionText }) => {
|
359
418
|
utilities.verifyInnerText(utilities.getNthElement(matchingPage.optionContainerOptionsSpecifyCorrectAnswerSection(), index), optionText);
|
@@ -364,6 +423,22 @@ const steps = {
|
|
364
423
|
utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropzoneSpecifyCorrectAnswerSection(), count), text);
|
365
424
|
},
|
366
425
|
|
426
|
+
verifyOptionContainerOptionSpecifyCorrectAnswerSection: (optionsArray) => {
|
427
|
+
optionsArray.forEach(({ index, optionText }) => {
|
428
|
+
utilities.verifyInnerText(utilities.getNthElement(matchingPage.optionContainerOptionsSpecifyCorrectAnswerSection(), index), optionText);
|
429
|
+
});
|
430
|
+
},
|
431
|
+
|
432
|
+
verifyPromptContainerSpecifyCorrectAnswerSection: (optionsArray) => {
|
433
|
+
optionsArray.forEach(({ index, optionText }) => {
|
434
|
+
utilities.verifyInnerText(utilities.getNthElement(matchingPage.promptSpecifyCorrectAnswerSection(), index), optionText);
|
435
|
+
});
|
436
|
+
},
|
437
|
+
|
438
|
+
getOptionCount: () => {
|
439
|
+
return matchingPage.optionWrapper().its('length')
|
440
|
+
},
|
441
|
+
|
367
442
|
//Preview tab
|
368
443
|
/**
|
369
444
|
* Enter text in the answer input fields of the specify correct answer section.
|
@@ -651,12 +726,32 @@ const steps = {
|
|
651
726
|
|
652
727
|
const tests = {
|
653
728
|
...autoScoredScoringPreviewTab.tests,
|
654
|
-
...draggableOptionsSectionComponent.tests,
|
655
|
-
...optionsWrapperComponent.tests,
|
656
|
-
...draggableOptionContainer.tests,
|
657
729
|
...scoringSectionBaseEditTab.tests,
|
658
730
|
...autoScoredScoringSectionMultiResponseType.tests,
|
731
|
+
...optionsWrapperComponent.tests,
|
732
|
+
...draggableOptionContainer.tests,
|
733
|
+
...autoScoredSpecifyCorrectAnswerSection.tests,
|
734
|
+
...createQuestionBasePage.tests,
|
735
|
+
...commonComponents.tests,
|
736
|
+
...draggableOptionsSectionComponent.tests,
|
659
737
|
|
738
|
+
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
739
|
+
it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
|
740
|
+
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
741
|
+
const dropzoneOptions = ['Elephant', 'Fish', 'Cat'];
|
742
|
+
const optionsArray = ['Bear', 'Eagle', 'Penguin'];
|
743
|
+
promptTextArray.forEach((promptOption, index) => {
|
744
|
+
utilities.verifyInnerText(utilities.getNthElement(matchingPage.promptSpecifyCorrectAnswerSection(), index), promptOption);
|
745
|
+
});
|
746
|
+
dropzoneOptions.forEach((dropzoneOption, index) => {
|
747
|
+
utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropzoneSpecifyCorrectAnswerSection(), index), dropzoneOption);
|
748
|
+
});
|
749
|
+
optionsArray.forEach((dropzoneOption, index) => {
|
750
|
+
utilities.verifyInnerText(utilities.getNthElement(draggableOptionContainer.draggableOption(), index), dropzoneOption);
|
751
|
+
});
|
752
|
+
});
|
753
|
+
},
|
754
|
+
|
660
755
|
//Need to remove when https://redmine.zeuslearning.com/issues/566720 is resolved
|
661
756
|
/**
|
662
757
|
* Verifies the contents and styling of the 'Options' section.
|
@@ -1021,20 +1116,69 @@ const tests = {
|
|
1021
1116
|
})
|
1022
1117
|
},
|
1023
1118
|
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1119
|
+
/**
|
1120
|
+
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
1121
|
+
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
1122
|
+
* @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
1123
|
+
*/
|
1124
|
+
verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
|
1125
|
+
it(`The user should be able to drop option in the dropzone in the ${accordionName} accordion`, () => {
|
1126
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Petals', dropzoneIndex: 0 }]);
|
1127
|
+
});
|
1128
|
+
|
1129
|
+
it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
|
1130
|
+
matchingPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
|
1131
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage().eq(1), 'visible')
|
1132
|
+
utilities.verifyInnerText(commonComponents.errorMessage().eq(1), 'Error: Please set a correct answer.');
|
1133
|
+
if (accordionName == 'Correct') {
|
1134
|
+
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
1135
|
+
.within(() => {
|
1136
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
|
1137
|
+
});
|
1138
|
+
} else {
|
1139
|
+
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
1140
|
+
.within(() => {
|
1141
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
|
1142
|
+
});
|
1143
|
+
};
|
1144
|
+
});
|
1145
|
+
|
1146
|
+
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredCorrectAnswerErrorMessageCSSAndA11y();
|
1147
|
+
|
1148
|
+
it('CSS of the dropzone border', { tags: 'css' }, () => {
|
1149
|
+
utilities.verifyCSS(matchingPage.dropzoneSpecifyCorrectAnswerSection().eq(0), {
|
1150
|
+
'border': `2px dashed ${css.color.activeButtons}`,
|
1151
|
+
'background-color': css.color.optionsBg
|
1031
1152
|
});
|
1032
|
-
|
1033
|
-
|
1153
|
+
});
|
1154
|
+
|
1155
|
+
it('When the user drops an option in the dropzone, the error message should disappear', () => {
|
1156
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Petals', dropzoneIndex: 1 }, { optionText: 'Roots', dropzoneIndex: 2 }]);
|
1157
|
+
});
|
1158
|
+
|
1159
|
+
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
1160
|
+
|
1161
|
+
it('CSS of \'Correct\' accordion contents', { tags: 'css' }, () => {
|
1162
|
+
utilities.verifyCSS(matchingPage.dropzoneSpecifyCorrectAnswerSection().eq(0), {
|
1163
|
+
'border': `2px dashed ${css.color.secondaryBtnActive}`,
|
1164
|
+
'background-color': css.color.optionsBg
|
1034
1165
|
});
|
1035
|
-
|
1036
|
-
|
1166
|
+
utilities.verifyCSS(matchingPage.optionContainerOptionsSpecifyCorrectAnswerSection(), {
|
1167
|
+
'background-color': css.color.secondaryBtnBg,
|
1168
|
+
'border': `1px solid ${css.color.draggableOptionBorder}`
|
1037
1169
|
});
|
1170
|
+
utilities.verifyCSS(matchingPage.optionContainerOptionsSpecifyCorrectAnswerSection().find('.question-text-wrapper'), {
|
1171
|
+
'color': css.color.text,
|
1172
|
+
'font-size': css.fontSize.default,
|
1173
|
+
'font-weight': css.fontWeight.regular
|
1174
|
+
});
|
1175
|
+
utilities.verifyCSS(matchingPage.optionContainerOptionsSpecifyCorrectAnswerSection().find('svg g [data-name*="Path"]').eq(1), {
|
1176
|
+
'color': css.color.secondaryBtn
|
1177
|
+
});
|
1178
|
+
});
|
1179
|
+
|
1180
|
+
it('Accessibility of \'Correct\' accordion contents', { tags: 'a11y' }, () => {
|
1181
|
+
cy.checkAccessibility(matchingPage.dropzoneSpecifyCorrectAnswerSection().eq(0).parents('.correct-answer-accordion'))
|
1038
1182
|
});
|
1039
1183
|
}
|
1040
1184
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import utilities from "../support/helpers/utilities";
|
2
|
-
import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, specifyRowsAndColumnsComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, studentViewSettingsLabelComponent, randomizeOptionsComponent } from "./components";
|
2
|
+
import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, specifyRowsAndColumnsComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, studentViewSettingsLabelComponent, randomizeOptionsComponent, commonComponents } from "./components";
|
3
3
|
const css = Cypress.env('css');
|
4
4
|
|
5
5
|
const selectors = {
|
@@ -119,7 +119,87 @@ const tests = {
|
|
119
119
|
...autoScoredSpecifyCorrectAnswerSection.tests,
|
120
120
|
...autoScoredStudentViewSettings.tests,
|
121
121
|
...studentViewSettingsLabelComponent.tests,
|
122
|
-
...randomizeOptionsComponent.tests
|
122
|
+
...randomizeOptionsComponent.tests,
|
123
|
+
/**
|
124
|
+
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
125
|
+
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
126
|
+
* @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
127
|
+
*/
|
128
|
+
verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
|
129
|
+
it(`The user should be able to check an option in the ${accordionName} accordion`, () => {
|
130
|
+
gridQuestionCommonComponent.steps.setAnswerInSpecifyCorrectAnswerSection({ row: 1, column: 0 });
|
131
|
+
});
|
132
|
+
|
133
|
+
it(`When the user has unchecked all the options in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
|
134
|
+
gridQuestionCommonComponent.steps.uncheckOptionInSpecifyCorrectAnswerSection({ row: 1, column: 0 });
|
135
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible')
|
136
|
+
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
|
137
|
+
if (accordionName == 'Correct') {
|
138
|
+
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
139
|
+
.within(() => {
|
140
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
|
141
|
+
});
|
142
|
+
} else {
|
143
|
+
autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
|
144
|
+
.within(() => {
|
145
|
+
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
|
146
|
+
});
|
147
|
+
};
|
148
|
+
});
|
149
|
+
|
150
|
+
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredCorrectAnswerErrorMessageCSSAndA11y();
|
151
|
+
|
152
|
+
it('When the user checks an option in the question grid, the error message should disappear', () => {
|
153
|
+
gridQuestionCommonComponent.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
154
|
+
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
155
|
+
});
|
156
|
+
|
157
|
+
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
158
|
+
|
159
|
+
it('CSS of \'Correct\' accordion contents', { tags: 'css' }, () => {
|
160
|
+
gridQuestionCommonComponent.gridSpecifyCorrectAnswerSection()
|
161
|
+
.within(() => {
|
162
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell().parent(), 1), {
|
163
|
+
'background-color': css.color.matrixHeadingCellBg,
|
164
|
+
'border-color': `${css.color.matrixCellBorder}`
|
165
|
+
});
|
166
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell().parent(), 6), {
|
167
|
+
'background-color': css.color.matrixSubheadingCellBg,
|
168
|
+
'border-color': `${css.color.matrixCellBorder}`
|
169
|
+
});
|
170
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell().parent(), 9), {
|
171
|
+
'background-color': css.color.defaultBackground,
|
172
|
+
'border-color': `${css.color.matrixCellBorder}`
|
173
|
+
});
|
174
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.optionsButton, 0), {
|
175
|
+
'background-color': css.color.matrixHeadingCellBg,
|
176
|
+
'color': `${css.color.matrixCellBorder}`
|
177
|
+
});
|
178
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.optionsButton, 0).find('svg'), {
|
179
|
+
'color': css.color.activeButtons
|
180
|
+
});
|
181
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell(), 1).find('.question-text-wrapper'), {
|
182
|
+
'color': css.color.text,
|
183
|
+
'font-size': css.fontSize.heading,
|
184
|
+
'font-weight': css.fontWeight.bold
|
185
|
+
});
|
186
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell(), 6).find('.question-text-wrapper'), {
|
187
|
+
'color': css.color.text,
|
188
|
+
'font-size': css.fontSize.default,
|
189
|
+
'font-weight': css.fontWeight.bold
|
190
|
+
});
|
191
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell(), 9).find('.question-text-wrapper'), {
|
192
|
+
'color': css.color.text,
|
193
|
+
'font-size': css.fontSize.default,
|
194
|
+
'font-weight': css.fontWeight.regular
|
195
|
+
});
|
196
|
+
});
|
197
|
+
});
|
198
|
+
|
199
|
+
it('Accessibility of \'Correct\' accordion contents', { tags: 'a11y' }, () => {
|
200
|
+
cy.checkAccessibility(gridQuestionCommonComponent.tableCell().parents('.correct-answer-accordion'));
|
201
|
+
});
|
202
|
+
},
|
123
203
|
}
|
124
204
|
|
125
205
|
export const multipleSelectionGridPage = {
|
@@ -517,6 +517,10 @@ const steps = {
|
|
517
517
|
},
|
518
518
|
|
519
519
|
verifyMinMaxWarningMessage: (warningMessage) => {
|
520
|
+
utilities.verifyInnerText(commonComponents.errorMessage(), warningMessage);
|
521
|
+
},
|
522
|
+
|
523
|
+
verifyMinMaxWarningMessagePreviewTab: (warningMessage) => {
|
520
524
|
utilities.verifyInnerText(multipleSelectionPage.minMaxWarningMessage(), warningMessage);
|
521
525
|
},
|
522
526
|
|
@@ -594,7 +598,7 @@ const tests = {
|
|
594
598
|
|
595
599
|
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
596
600
|
|
597
|
-
it(
|
601
|
+
it(`CSS of ${accordionName} accordion contents`, { tags: 'css' }, () => {
|
598
602
|
utilities.verifyCSS(multipleSelectionPage.optionsText(), {
|
599
603
|
'color': css.color.text,
|
600
604
|
'font-size': css.fontSize.default,
|
@@ -620,7 +624,8 @@ const tests = {
|
|
620
624
|
.verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
|
621
625
|
});
|
622
626
|
|
623
|
-
|
627
|
+
//https://redmine.zeuslearning.com/issues/547754
|
628
|
+
it(`Accessibility of ${accordionName} accordion contents`, { tags: 'a11y' }, () => {
|
624
629
|
cy.checkAccessibility(multipleSelectionPage.optionWrapperSpecifyCorrectAnswerSection().parents('.correct-answer-accordion'))
|
625
630
|
});
|
626
631
|
},
|
@@ -33,13 +33,13 @@ const selectors = {
|
|
33
33
|
return cy.get('[aria-labelledby*="Unit-of-measurement-dropdown-label"][aria-labelledby*="dropdown-label"] li[role="option"]')
|
34
34
|
}
|
35
35
|
},
|
36
|
-
lengthOfRulerLabel: () => cy.get('
|
36
|
+
lengthOfRulerLabel: () => cy.get('[class*="LenghtOfRulerWrapper"] .alternative-text'),
|
37
37
|
lengthOfRulerDropdown: () => cy.get('#Length-of-ruler-select'),
|
38
38
|
lengthOfRulerDropdownListOptions: (ariaLabel = null) => {
|
39
39
|
if (ariaLabel) {
|
40
|
-
return cy.get(`[
|
40
|
+
return cy.get(`[class*="LenghtOfRulerWrapper"] [type="button"][aria-label*="${ariaLabel}"]`)
|
41
41
|
} else {
|
42
|
-
return cy.get('[
|
42
|
+
return cy.get('[class*="LenghtOfRulerWrapper"] [type="button"]')
|
43
43
|
}
|
44
44
|
},
|
45
45
|
displayOnTopLabel: () => cy.get('[class*="Rulerstyles__LabelTextWrapper"]'),
|
@@ -104,11 +104,6 @@ const steps = {
|
|
104
104
|
.click();
|
105
105
|
},
|
106
106
|
|
107
|
-
expandLengthOfRulerDropdown: () => {
|
108
|
-
rulerPage.lengthOfRulerDropdown()
|
109
|
-
.click();
|
110
|
-
},
|
111
|
-
|
112
107
|
/**
|
113
108
|
* @param {string[]} dropdownOptionsArray array containing options of dropdown list
|
114
109
|
* @description this function is used to verify inner text of expanded dropdown list options
|
@@ -174,6 +174,7 @@ const steps = {
|
|
174
174
|
*/
|
175
175
|
enterTextInAnswerInputFieldSpecifyCorrectAnswerSection: (text) => {
|
176
176
|
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
177
|
+
.clear()
|
177
178
|
.type(text);
|
178
179
|
},
|
179
180
|
|
@@ -183,6 +184,12 @@ const steps = {
|
|
183
184
|
.blur();
|
184
185
|
},
|
185
186
|
|
187
|
+
focusOutOfSpecifyCorrectAnswerInputField: () => {
|
188
|
+
shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
|
189
|
+
.clear()
|
190
|
+
.blur();
|
191
|
+
},
|
192
|
+
|
186
193
|
clearAndFocusOutOfResponseInputFieldPreviewTab: () => {
|
187
194
|
shortTextResponsePage.previewTabResponseField()
|
188
195
|
.clear()
|
@@ -210,6 +217,7 @@ const steps = {
|
|
210
217
|
*/
|
211
218
|
enterTextInAnswerInputFieldPreviewTab: (text) => {
|
212
219
|
shortTextResponsePage.previewTabResponseField()
|
220
|
+
.clear()
|
213
221
|
.type(text);
|
214
222
|
},
|
215
223
|
|
@@ -635,6 +643,11 @@ const steps = {
|
|
635
643
|
* @param {string} warningText warning message displayed
|
636
644
|
*/
|
637
645
|
verifyWarningMessage: (warningText) => {
|
646
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
|
647
|
+
utilities.verifyInnerText(commonComponents.errorMessage(), warningText);
|
648
|
+
},
|
649
|
+
|
650
|
+
verifyWarningMessagePreviewTab: (warningText) => {
|
638
651
|
utilities.verifyElementVisibilityState(shortTextResponsePage.warningMessage(), 'visible');
|
639
652
|
utilities.verifyInnerText(shortTextResponsePage.warningMessage(), warningText);
|
640
653
|
},
|
@@ -287,6 +287,14 @@ const steps = {
|
|
287
287
|
});
|
288
288
|
},
|
289
289
|
|
290
|
+
deselectCustomizeCalculatorSettingsParenthesesButton: () => {
|
291
|
+
simpleCalculatorPage.customizeCalculatorSettingsParenthesesButton()
|
292
|
+
.click()
|
293
|
+
.within(() => {
|
294
|
+
utilities.verifyElementVisibilityState(simpleCalculatorPage.tickIcon(), 'notExist');
|
295
|
+
});
|
296
|
+
},
|
297
|
+
|
290
298
|
selectCustomizeCalculatorSettingsPiButton: () => {
|
291
299
|
simpleCalculatorPage.customizeCalculatorSettingsPiButton()
|
292
300
|
.click()
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import utilities from "../support/helpers/utilities";
|
2
|
-
import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, ckEditorToolbar, equationEditorFlyout, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, autoScoredStudentViewSettings, specifyRowsAndColumnsComponent, autoScoredSpecifyCorrectAnswerSection, randomizeOptionsComponent, studentViewSettingsLabelComponent} from "./components";
|
2
|
+
import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, ckEditorToolbar, equationEditorFlyout, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, autoScoredStudentViewSettings, specifyRowsAndColumnsComponent, autoScoredSpecifyCorrectAnswerSection, randomizeOptionsComponent, studentViewSettingsLabelComponent, commonComponents} from "./components";
|
3
3
|
const css = Cypress.env('css');
|
4
4
|
|
5
5
|
const selectors = {
|
@@ -124,7 +124,63 @@ const tests = {
|
|
124
124
|
...autoScoredSpecifyCorrectAnswerSection.tests,
|
125
125
|
...randomizeOptionsComponent.tests,
|
126
126
|
...studentViewSettingsLabelComponent.tests,
|
127
|
-
...autoScoredStudentViewSettings.tests
|
127
|
+
...autoScoredStudentViewSettings.tests,
|
128
|
+
/**
|
129
|
+
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
130
|
+
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
131
|
+
* @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
132
|
+
*/
|
133
|
+
verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
|
134
|
+
it(`The user should be able to check an option in the ${accordionName} accordion`, () => {
|
135
|
+
singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
136
|
+
});
|
137
|
+
|
138
|
+
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
139
|
+
|
140
|
+
it(`CSS of ${accordionName} accordion contents`, { tags: 'css' }, () => {
|
141
|
+
gridQuestionCommonComponent.gridSpecifyCorrectAnswerSection()
|
142
|
+
.within(() => {
|
143
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell().parent(), 1), {
|
144
|
+
'background-color': css.color.matrixHeadingCellBg,
|
145
|
+
'border-color': `${css.color.matrixCellBorder}`
|
146
|
+
});
|
147
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell().parent(), 6), {
|
148
|
+
'background-color': css.color.matrixSubheadingCellBg,
|
149
|
+
'border-color': `${css.color.matrixCellBorder}`
|
150
|
+
});
|
151
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell().parent(), 9), {
|
152
|
+
'background-color': css.color.defaultBackground,
|
153
|
+
'border-color': `${css.color.matrixCellBorder}`
|
154
|
+
});
|
155
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.optionsButton, 0), {
|
156
|
+
'background-color': css.color.matrixHeadingCellBg,
|
157
|
+
'color': `${css.color.matrixCellBorder}`
|
158
|
+
});
|
159
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.optionsButton, 0).find('svg'), {
|
160
|
+
'color': css.color.activeButtons
|
161
|
+
});
|
162
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell(), 1).find('.question-text-wrapper'), {
|
163
|
+
'color': css.color.text,
|
164
|
+
'font-size': css.fontSize.heading,
|
165
|
+
'font-weight': css.fontWeight.bold
|
166
|
+
});
|
167
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell(), 6).find('.question-text-wrapper'), {
|
168
|
+
'color': css.color.text,
|
169
|
+
'font-size': css.fontSize.default,
|
170
|
+
'font-weight': css.fontWeight.bold
|
171
|
+
});
|
172
|
+
utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell(), 9).find('.question-text-wrapper'), {
|
173
|
+
'color': css.color.text,
|
174
|
+
'font-size': css.fontSize.default,
|
175
|
+
'font-weight': css.fontWeight.regular
|
176
|
+
});
|
177
|
+
});
|
178
|
+
});
|
179
|
+
|
180
|
+
it(`Accessibility of ${accordionName} accordion contents`, { tags: 'a11y' }, () => {
|
181
|
+
cy.checkAccessibility(gridQuestionCommonComponent.tableCell().parents('.correct-answer-accordion'));
|
182
|
+
});
|
183
|
+
},
|
128
184
|
}
|
129
185
|
|
130
186
|
export const singleSelectionGridPage = {
|