itemengine-cypress-automation 1.0.553-IEI-7000-main-8cb7c78.0 → 1.0.554-IEI-5835-LIVE-30c8e27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +1 -120
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +1 -27
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +5 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +21 -29
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -140
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/pagination.js +14 -16
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +3 -71
- package/cypress/e2e/LiveStudentView/MultipleSelection/liveStudentView.js +123 -0
- package/cypress/pages/components/additionalSettingsPanel.js +0 -18
- package/cypress/pages/components/draggableOptionsSectionComponent.js +1 -1
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/optionsWrapperComponent.js +2 -2
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +81 -197
- package/cypress/pages/liveStudentViewBase.js +183 -0
- package/cypress/pages/liveStudentViewPage.js +227 -0
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +22 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationAllViews.js +0 -230
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { multipleSelectionPage } from "../../../pages/multipleSelectionPage";
|
|
2
|
+
import { itemPreviewPage } from "../../../pages/itemPreviewPage";
|
|
3
|
+
import { liveStudentViewPage } from "../../../pages/liveStudentViewPage";
|
|
4
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
5
|
+
import utilities from "../../../support/helpers/utilities";
|
|
6
|
+
const css = Cypress.env('css');
|
|
7
|
+
var itemReferenceID = "";
|
|
8
|
+
const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
|
|
9
|
+
|
|
10
|
+
describe('Live Student View - Multiple Selection', () => {
|
|
11
|
+
before(() => {
|
|
12
|
+
cy.loginAs('admin');
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
cy.startApplitools();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
cy.eyesClose();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
describe('Multiple Selection Question in Live Student View', { tags: 'smoke' }, () => {
|
|
24
|
+
abortEarlySetup();
|
|
25
|
+
|
|
26
|
+
before(() => {
|
|
27
|
+
// Create the multiple selection question first
|
|
28
|
+
multipleSelectionPage.steps.navigateToCreateQuestion('multiple selection');
|
|
29
|
+
cy.barsPreLoaderWait();
|
|
30
|
+
multipleSelectionPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
|
31
|
+
|
|
32
|
+
multipleSelectionPage.steps.focusInOptionsInputField(0);
|
|
33
|
+
multipleSelectionPage.steps.selectImageOptionFromCKEditorToolbar()
|
|
34
|
+
multipleSelectionPage.steps.addImageToInputField();
|
|
35
|
+
|
|
36
|
+
multipleSelectionPage.steps.focusInOptionsInputField(1);
|
|
37
|
+
multipleSelectionPage.steps.selectBoldOptionFromCKEditorToolbar();
|
|
38
|
+
multipleSelectionPage.steps.enterTextInOptionInputField(1, 'This is a bold option');
|
|
39
|
+
|
|
40
|
+
multipleSelectionPage.steps.focusInOptionsInputField(2);
|
|
41
|
+
multipleSelectionPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
|
42
|
+
multipleSelectionPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
|
43
|
+
multipleSelectionPage.steps.enterTextInOptionInputField(3, 'option 4');
|
|
44
|
+
|
|
45
|
+
multipleSelectionPage.steps.allotPoints(10);
|
|
46
|
+
multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(0);
|
|
47
|
+
multipleSelectionPage.steps.checkOptionsCheckboxInSpecifyCorrectAnswerSection(1);
|
|
48
|
+
|
|
49
|
+
// Save the question to get itemReferenceID
|
|
50
|
+
multipleSelectionPage.steps.clickOnSaveQuestionButton();
|
|
51
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
52
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
53
|
+
|
|
54
|
+
// Navigate to live student view using page object
|
|
55
|
+
cy.then(() => {
|
|
56
|
+
liveStudentViewPage.steps.navigateToLiveStudentView(itemReferenceID);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// Multiple Selection Question functionality tests - use multipleSelectionPage.tests
|
|
61
|
+
it('Question instructions should be visible in Live Student View', () => {
|
|
62
|
+
// Use multipleSelectionPage method directly since it's already in Live Student View
|
|
63
|
+
utilities.verifyInnerText(multipleSelectionPage.questionInstructionsText(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
|
64
|
+
utilities.verifyElementVisibilityState(multipleSelectionPage.questionInstructionsText(), 'visible');
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('Multiple selection - When the user has added image, bold text and equation to the options input they should be displayed', () => {
|
|
68
|
+
// Use multipleSelectionPage methods directly - they work in Live Student View
|
|
69
|
+
multipleSelectionPage.steps.verifyImageInPreviewTab(0);
|
|
70
|
+
multipleSelectionPage.steps.verifyBoldTextInPreviewTab(1);
|
|
71
|
+
multipleSelectionPage.steps.verifyEquationTextInPreviewTab(2);
|
|
72
|
+
cy.eyesCheckWindow('Multiple selection - Live Student View - Image, Bold Text, and Equation Display');
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it('All the options should be in unchecked state initially', () => {
|
|
76
|
+
// Use multipleSelectionPage method directly
|
|
77
|
+
for (let index = 0; index < 4; index++) {
|
|
78
|
+
multipleSelectionPage.steps.verifyOptionsCheckboxInPreviewTabUncheckedState(index);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('CSS of Multiple Selection options', { tags: 'css' }, () => {
|
|
83
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionPage.optionsText(), 2), {
|
|
84
|
+
'color': css.color.text,
|
|
85
|
+
'font-size': css.fontSize.default,
|
|
86
|
+
'font-weight': css.fontWeight.regular
|
|
87
|
+
});
|
|
88
|
+
utilities.verifyCSS(multipleSelectionPage.optionsCheckbox().parent().find('svg'), {
|
|
89
|
+
'fill': css.color.secondaryBtn
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Check a box to verify selected CSS
|
|
93
|
+
multipleSelectionPage.steps.checkOptionsCheckboxInPreviewTab(1);
|
|
94
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionPage.optionsCheckboxWrapperPreviewTab(), 1), {
|
|
95
|
+
'background-color': css.color.defaultBackground,
|
|
96
|
+
'color': css.color.activeButtons,
|
|
97
|
+
'border': `2px solid ${css.color.activeComponentBorder}`
|
|
98
|
+
});
|
|
99
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionPage.optionsText(), 1).find('.question-text-wrapper'), {
|
|
100
|
+
'color': css.color.optionsSelectedText,
|
|
101
|
+
'font-size': css.fontSize.default,
|
|
102
|
+
'font-weight': css.fontWeight.regular
|
|
103
|
+
});
|
|
104
|
+
multipleSelectionPage.optionsCheckbox()
|
|
105
|
+
.eq(1)
|
|
106
|
+
.parent()
|
|
107
|
+
.verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('Accessibility of Multiple Selection question', { tags: 'a11y' }, () => {
|
|
111
|
+
cy.checkAccessibility(multipleSelectionPage.questionInstructionsText().parents('[class*="ContentWrapper"]'));
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// Live Student View specific functionality tests - use common base tests
|
|
115
|
+
liveStudentViewPage.tests.verifyLiveStudentViewInterface();
|
|
116
|
+
|
|
117
|
+
// Multiple Selection specific Live Student View interactions - test on current page first
|
|
118
|
+
liveStudentViewPage.tests.verifyMultipleSelectionLiveStudentViewInteractions();
|
|
119
|
+
|
|
120
|
+
// Then navigate to multiple session page and test those controls
|
|
121
|
+
liveStudentViewPage.tests.verifyMultipleSessionLiveStudentView();
|
|
122
|
+
});
|
|
123
|
+
});
|
|
@@ -25,8 +25,6 @@ const selectors = {
|
|
|
25
25
|
},
|
|
26
26
|
fontSizeListOptionLabels: () => cy.get('[aria-labelledby*="Font-Size-dropdown-label"] li[role="option"] .dropdown-label-text'),
|
|
27
27
|
fontSizesLabels: () => cy.get('[aria-labelledby*="Font-Size-dropdown-label"] li[role="option"] .dropdown-post-label-text'),
|
|
28
|
-
teacherGuidelinesLabelInGradingView: () => cy.get('[class*="GradingViewstyles__GuidelineTitle"]'),
|
|
29
|
-
teacherGuidelinesDescriptionInGradingView: () => cy.get('[class*="GradingViewstyles__GuideLineDescription"] [data-testid*="question-instruction-element"]'),
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
const steps = {
|
|
@@ -73,22 +71,6 @@ const steps = {
|
|
|
73
71
|
additionalSettingsPanel.fontSizeDropdown()
|
|
74
72
|
.trigger('mouseover')
|
|
75
73
|
.click();
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* This function verifies 'Teacher guidelines' label
|
|
80
|
-
* @param {string} expectedText expected text for the label
|
|
81
|
-
*/
|
|
82
|
-
verifyTeacherGuidelinesLabelInGradingView: (expectedText) => {
|
|
83
|
-
utilities.verifyInnerText(additionalSettingsPanel.teacherGuidelinesLabelInGradingView(), expectedText);
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* This function verifies 'Teacher guidelines' description text
|
|
88
|
-
* @param {string} expectedText expected text for the description
|
|
89
|
-
*/
|
|
90
|
-
verifyTeacherGuidelinesDescriptionInGradingView: (expectedText) => {
|
|
91
|
-
utilities.verifyInnerText(additionalSettingsPanel.teacherGuidelinesDescriptionInGradingView(), expectedText);
|
|
92
74
|
}
|
|
93
75
|
}
|
|
94
76
|
|
|
@@ -245,7 +245,7 @@ const tests = {
|
|
|
245
245
|
utilities.verifyCSS(draggableOptionsSectionComponent.addGroupButton(), {
|
|
246
246
|
'color': css.color.secondaryBtnActive,
|
|
247
247
|
'font-size': css.fontSize.default,
|
|
248
|
-
'font-weight': css.fontWeight.
|
|
248
|
+
'font-weight': css.fontWeight.medium
|
|
249
249
|
});
|
|
250
250
|
});
|
|
251
251
|
|
|
@@ -5,7 +5,7 @@ const selectors = {
|
|
|
5
5
|
maxCapacityPerDropzoneDropdown: () => cy.get('#Maximum-capacity-per-dropzone-select'),
|
|
6
6
|
maxCapacityPerDropzoneDropdownListOptions: (ariaLabel = null) => {
|
|
7
7
|
if (ariaLabel) {
|
|
8
|
-
return cy.get(`[aria-labelledby*="Maximum-capacity-per-dropzone-dropdown-label"] [role="option"][aria-label
|
|
8
|
+
return cy.get(`[aria-labelledby*="Maximum-capacity-per-dropzone-dropdown-label"] [role="option"][aria-label="${ariaLabel}"]`)
|
|
9
9
|
} else {
|
|
10
10
|
return cy.get('[aria-labelledby*="Maximum-capacity-per-dropzone-dropdown-label"] [role="option"]')
|
|
11
11
|
}
|
|
@@ -343,7 +343,7 @@ const tests = {
|
|
|
343
343
|
utilities.verifyCSS(optionsWrapperComponent.addOptionButton(), {
|
|
344
344
|
'color': css.color.secondaryBtnActive,
|
|
345
345
|
'font-size': css.fontSize.default,
|
|
346
|
-
'font-weight': css.fontWeight.
|
|
346
|
+
'font-weight': css.fontWeight.medium
|
|
347
347
|
});
|
|
348
348
|
});
|
|
349
349
|
},
|
|
@@ -477,7 +477,7 @@ const tests = {
|
|
|
477
477
|
utilities.verifyElementVisibilityState(commonComponents.tooltipText(), 'visible')
|
|
478
478
|
utilities.verifyCSS(commonComponents.tooltipText(), {
|
|
479
479
|
'color': css.color.whiteText,
|
|
480
|
-
'font-size': css.fontSize.
|
|
480
|
+
'font-size': css.fontSize.normal,
|
|
481
481
|
'font-weight': css.fontWeight.regular
|
|
482
482
|
});
|
|
483
483
|
utilities.getNthElement(optionsWrapperComponent.deleteOptionButton(), 0)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { optionsWrapperComponent, createQuestionBasePage, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, questionInstructionsComponent, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, commonComponents, ckEditorToolbar, equationEditorFlyout, randomizeOptionsComponent, allowMultipleInstancesOfSameDraggableOptionComponent, studentViewSettingsLabelComponent, additionalSettingsPanel, draggableOptionContainer, draggableOptionsSectionComponent, maximumCapacityPerDropzoneComponent, enableOuterBorderComponent, specifyRowsAndColumnsComponent, additionalSettingsAccessibilitySectionComponent, styleAndLayoutCustomizationAccordionComponent, gradingViewEnumerationComponent, ariaLabelSectionComponent
|
|
1
|
+
import { optionsWrapperComponent, createQuestionBasePage, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, questionInstructionsComponent, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, commonComponents, ckEditorToolbar, equationEditorFlyout, randomizeOptionsComponent, allowMultipleInstancesOfSameDraggableOptionComponent, studentViewSettingsLabelComponent, additionalSettingsPanel, draggableOptionContainer, draggableOptionsSectionComponent, maximumCapacityPerDropzoneComponent, enableOuterBorderComponent, specifyRowsAndColumnsComponent, additionalSettingsAccessibilitySectionComponent, styleAndLayoutCustomizationAccordionComponent, gradingViewEnumerationComponent, ariaLabelSectionComponent } from "./components";
|
|
2
2
|
import utilities from "../support/helpers/utilities";
|
|
3
3
|
import constants from "../fixtures/constants";
|
|
4
4
|
import { createItemPage } from "./createItemPage";
|
|
@@ -25,7 +25,6 @@ const selectors = {
|
|
|
25
25
|
...gradingViewEnumerationComponent,
|
|
26
26
|
...ariaLabelSectionComponent,
|
|
27
27
|
...scoringSectionBaseEditTab,
|
|
28
|
-
...printPreviewComponent,
|
|
29
28
|
|
|
30
29
|
editCellPropertyButton: () => cy.get('.action-menu button'),
|
|
31
30
|
editCellPropertyList: () => cy.get('.ngie-action-cell-container [role="menu"]'),
|
|
@@ -71,7 +70,7 @@ const selectors = {
|
|
|
71
70
|
dropzoneAriaLabelInputField: () => cy.get('[type="text"][aria-label*="Enter ARIA label"]'),
|
|
72
71
|
|
|
73
72
|
//Preview tab table
|
|
74
|
-
tableRowContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="Matrixstyles__RowContainer"]
|
|
73
|
+
tableRowContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="Matrixstyles__RowContainer"]'),
|
|
75
74
|
leftArrowNavigationButtonPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [aria-label="Left Pagination Button"][class*="Matrixstyles__PaginationControl"]'),
|
|
76
75
|
rightArrowNavigationButtonPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [aria-label="Right Pagination Button"][class*="Matrixstyles__PaginationControl"]'),
|
|
77
76
|
cellContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="CellDropZonestyles__CellContainer"],[class*="question-preview-wrapper"] [class*="Cellstyles__StyledCell"]'),
|
|
@@ -92,7 +91,7 @@ const selectors = {
|
|
|
92
91
|
penaltyPointsForIncorrectOptionInputField: () => cy.get('input[aria-label*="enalty points for each incorrect option"]'),
|
|
93
92
|
penaltyPointsForEachIncorrectOptionOrDropzoneLabel: () => cy.get('[class*="PenaltyScoreForEachIncorrectstyles__PointsLabel"]'),
|
|
94
93
|
tableOuterBorder: () => cy.get('.table-border'),
|
|
95
|
-
maxLimitInEachDropzoneHelpText: () => cy.get('[class*="Matrixstyles__MaxLimitWrapper"]
|
|
94
|
+
maxLimitInEachDropzoneHelpText: () => cy.get('[class*="Matrixstyles__MaxLimitWrapper"]'),
|
|
96
95
|
dropzoneGridSpecifyCorrectAnswerSection: () => cy.get('[class*="Matrixstyles__TableWrapper"]'),
|
|
97
96
|
dropzoneGridPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="Matrixstyles__TableWrapper"]'),
|
|
98
97
|
|
|
@@ -155,17 +154,12 @@ const selectors = {
|
|
|
155
154
|
panelPlacementOptions: (placementOption) => cy.get(`.panel-placement-style button[aria-label*="panel placement ${placementOption}"]`),
|
|
156
155
|
optionAlignmentInPanelOptions: (alignmentOption) => cy.get(`.option-alignment button[aria-label*="option alignment in panel ${alignmentOption}"]`),
|
|
157
156
|
optionsWrapper: () => cy.get('[class*="StandardDropZonestyles__DraggableItemsGrid"]'),
|
|
158
|
-
optionsWrapperPreviewTab: () => cy.get('[class*="StandardDropZonestyles__DraggableItemsGrid"]
|
|
157
|
+
optionsWrapperPreviewTab: () => cy.get('.edit-question-preview-wrapper [class*="StandardDropZonestyles__DraggableItemsGrid"]'),
|
|
159
158
|
optionsPreviewTab: () => cy.get('[class*="CellDropZonestyles__DraggableItemWrapper"]'),
|
|
160
159
|
iconWrapperInPreviewTab: () => cy.get('[class*="DragAndDropMatrixstyles__TickIconWrapper"]'),
|
|
161
160
|
gridBoxInPreviewTab: () => cy.get('[class*="CellDropZonestyles__DraggableWrapper"]'),
|
|
162
|
-
optionPanelWrapper: () => cy.get('.option-drag-and-drop
|
|
163
|
-
optionsInputFieldInQuestionPreviewTab: () => cy.get('.draggable-items-flex-wrapper .question-text-wrapper,.options-flex-wrapper .question-text-wrapper')
|
|
164
|
-
fitAllColumnsInOnePageLabel: () => cy.get('label[aria-label*="Fit all columns in one page"]'),
|
|
165
|
-
fitAllColumnsInOnePageCheckbox: () => cy.get('[aria-label*="Fit all columns in one page"] input'),
|
|
166
|
-
dropzoneHeightInputField: () => cy.get('input[id*="Dropzone height (px)"]'),
|
|
167
|
-
dropzoneHeightLabel: () => cy.get('label[for*="Dropzone height (px)"]'),
|
|
168
|
-
tableRowContainerStudentView: () => cy.get('[class*="Matrixstyles__MatrixContainer"]'),
|
|
161
|
+
optionPanelWrapper: () => cy.get('.option-drag-and-drop'),
|
|
162
|
+
optionsInputFieldInQuestionPreviewTab: () => cy.get('.draggable-items-flex-wrapper .question-text-wrapper,.options-flex-wrapper .question-text-wrapper')
|
|
169
163
|
}
|
|
170
164
|
|
|
171
165
|
const steps = {
|
|
@@ -193,7 +187,6 @@ const steps = {
|
|
|
193
187
|
...gradingViewEnumerationComponent.steps,
|
|
194
188
|
...ariaLabelSectionComponent.steps,
|
|
195
189
|
...createItemPage.steps,
|
|
196
|
-
...printPreviewComponent.steps,
|
|
197
190
|
|
|
198
191
|
/**
|
|
199
192
|
* @description Modifies the dropzone property based on the specified list option.
|
|
@@ -1523,21 +1516,21 @@ const steps = {
|
|
|
1523
1516
|
dragAndDropIntoCategoriesPage.tableRowContainerPreviewTab()
|
|
1524
1517
|
.each(($el) => {
|
|
1525
1518
|
cy.wrap($el)
|
|
1526
|
-
.should('have.css', '
|
|
1519
|
+
.should('have.css', 'row-gap', '0px');
|
|
1527
1520
|
});
|
|
1528
1521
|
break;
|
|
1529
1522
|
case 'Small':
|
|
1530
1523
|
dragAndDropIntoCategoriesPage.tableRowContainerPreviewTab()
|
|
1531
1524
|
.each(($el) => {
|
|
1532
1525
|
cy.wrap($el)
|
|
1533
|
-
.should('have.css', '
|
|
1526
|
+
.should('have.css', 'row-gap', '8px');
|
|
1534
1527
|
});
|
|
1535
1528
|
break;
|
|
1536
1529
|
case 'Wide':
|
|
1537
1530
|
dragAndDropIntoCategoriesPage.tableRowContainerPreviewTab()
|
|
1538
1531
|
.each(($el) => {
|
|
1539
1532
|
cy.wrap($el)
|
|
1540
|
-
.should('have.css', '
|
|
1533
|
+
.should('have.css', 'row-gap', '24px');
|
|
1541
1534
|
});
|
|
1542
1535
|
break;
|
|
1543
1536
|
default:
|
|
@@ -2022,16 +2015,25 @@ const steps = {
|
|
|
2022
2015
|
verifyDragHandleIconPreviewTab: (dragHandleOption) => {
|
|
2023
2016
|
switch (dragHandleOption) {
|
|
2024
2017
|
case 'drag icon':
|
|
2025
|
-
dragAndDropIntoCategoriesPage.
|
|
2026
|
-
.
|
|
2018
|
+
dragAndDropIntoCategoriesPage.previewTabQuestionWrapper()
|
|
2019
|
+
.within(() => {
|
|
2020
|
+
dragAndDropIntoCategoriesPage.dragHandle()
|
|
2021
|
+
.should('have.class', 'drag-icon-button');
|
|
2022
|
+
});
|
|
2027
2023
|
break;
|
|
2028
2024
|
case 'arrow icon':
|
|
2029
|
-
dragAndDropIntoCategoriesPage.
|
|
2030
|
-
.
|
|
2025
|
+
dragAndDropIntoCategoriesPage.previewTabQuestionWrapper()
|
|
2026
|
+
.within(() => {
|
|
2027
|
+
dragAndDropIntoCategoriesPage.dragHandle()
|
|
2028
|
+
.should('have.class', 'drag-arrows-icon');
|
|
2029
|
+
});
|
|
2031
2030
|
break;
|
|
2032
2031
|
case 'none':
|
|
2033
|
-
dragAndDropIntoCategoriesPage.
|
|
2034
|
-
.
|
|
2032
|
+
dragAndDropIntoCategoriesPage.previewTabQuestionWrapper()
|
|
2033
|
+
.within(() => {
|
|
2034
|
+
dragAndDropIntoCategoriesPage.dragHandle()
|
|
2035
|
+
.should('not.be.visible');
|
|
2036
|
+
});
|
|
2035
2037
|
break;
|
|
2036
2038
|
}
|
|
2037
2039
|
},
|
|
@@ -2051,9 +2053,12 @@ const steps = {
|
|
|
2051
2053
|
* @param {string} colorValue - The expected background color value.
|
|
2052
2054
|
*/
|
|
2053
2055
|
verifyDraggableOptionsFillColorPreviewTab: (colorValue) => {
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2056
|
+
dragAndDropIntoCategoriesPage.previewTabQuestionWrapper()
|
|
2057
|
+
.within(() => {
|
|
2058
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.draggableOption(), {
|
|
2059
|
+
'background-color': colorValue
|
|
2060
|
+
});
|
|
2061
|
+
});
|
|
2057
2062
|
},
|
|
2058
2063
|
|
|
2059
2064
|
/**
|
|
@@ -2071,19 +2076,12 @@ const steps = {
|
|
|
2071
2076
|
* @param {string} colorValue - The expected border color value.
|
|
2072
2077
|
*/
|
|
2073
2078
|
verifyDraggableOptionsBorderColorPreviewTab: (colorValue) => {
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
* Verifies the border color of grid
|
|
2081
|
-
* @param {string} colorValue - The expected border color value.
|
|
2082
|
-
*/
|
|
2083
|
-
verifyDraggableOptionsBorderColorAllView: (colorValue) => {
|
|
2084
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.draggableOption(), {
|
|
2085
|
-
'border': `1px dotted ${colorValue}`
|
|
2086
|
-
});
|
|
2079
|
+
dragAndDropIntoCategoriesPage.previewTabQuestionWrapper()
|
|
2080
|
+
.within(() => {
|
|
2081
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.draggableOption(), {
|
|
2082
|
+
'border': `1px solid ${colorValue}`
|
|
2083
|
+
});
|
|
2084
|
+
});
|
|
2087
2085
|
},
|
|
2088
2086
|
|
|
2089
2087
|
/**
|
|
@@ -2160,32 +2158,35 @@ const steps = {
|
|
|
2160
2158
|
* @param {string} placementOption - The panel placement option to verify.
|
|
2161
2159
|
*/
|
|
2162
2160
|
verifyPanelPlacementPreviewTab: (placementOption) => {
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2161
|
+
dragAndDropIntoCategoriesPage.previewTabQuestionWrapper()
|
|
2162
|
+
.within(() => {
|
|
2163
|
+
switch (placementOption) {
|
|
2164
|
+
case 'Bottom':
|
|
2165
|
+
dragAndDropIntoCategoriesPage.optionPanelWrapper()
|
|
2166
|
+
.should('have.css', 'width', '844px')
|
|
2167
|
+
.and('have.css', 'padding-top', '32px')
|
|
2168
|
+
.and('have.css', 'padding-bottom', '16px')
|
|
2169
|
+
break;
|
|
2170
|
+
case 'Top':
|
|
2171
|
+
dragAndDropIntoCategoriesPage.optionPanelWrapper()
|
|
2172
|
+
.should('have.css', 'width', '844px')
|
|
2173
|
+
.and('have.css', 'padding-top', '16px')
|
|
2174
|
+
.and('have.css', 'padding-bottom', '32px')
|
|
2175
|
+
break;
|
|
2176
|
+
case 'Left':
|
|
2177
|
+
dragAndDropIntoCategoriesPage.optionPanelWrapper()
|
|
2178
|
+
.should('have.css', 'width', '200px')
|
|
2179
|
+
.and('have.css', 'padding-right', '24px')
|
|
2180
|
+
.and('have.css', 'padding-left', '8px')
|
|
2181
|
+
break;
|
|
2182
|
+
case 'Right':
|
|
2183
|
+
dragAndDropIntoCategoriesPage.optionPanelWrapper()
|
|
2184
|
+
.should('have.css', 'width', '200px')
|
|
2185
|
+
.and('have.css', 'padding-right', '8px')
|
|
2186
|
+
.and('have.css', 'padding-left', '24px')
|
|
2187
|
+
break;
|
|
2188
|
+
}
|
|
2189
|
+
});
|
|
2189
2190
|
},
|
|
2190
2191
|
|
|
2191
2192
|
/**
|
|
@@ -2315,67 +2316,6 @@ const steps = {
|
|
|
2315
2316
|
.should('not.exist');
|
|
2316
2317
|
},
|
|
2317
2318
|
|
|
2318
|
-
verifyFitAllColumnsInOnePageCheckboxUnchecked: () => {
|
|
2319
|
-
dragAndDropIntoCategoriesPage.fitAllColumnsInOnePageCheckbox()
|
|
2320
|
-
.should('not.be.checked');
|
|
2321
|
-
},
|
|
2322
|
-
|
|
2323
|
-
verifyFitAllColumnsInOnePageCheckboxChecked: () => {
|
|
2324
|
-
dragAndDropIntoCategoriesPage.fitAllColumnsInOnePageCheckbox()
|
|
2325
|
-
.should('be.checked');
|
|
2326
|
-
},
|
|
2327
|
-
|
|
2328
|
-
checkFitAllColumnsInOnePageCheckbox: () => {
|
|
2329
|
-
dragAndDropIntoCategoriesPage.fitAllColumnsInOnePageCheckbox()
|
|
2330
|
-
.click()
|
|
2331
|
-
steps.verifyFitAllColumnsInOnePageCheckboxChecked();
|
|
2332
|
-
},
|
|
2333
|
-
|
|
2334
|
-
uncheckFitAllColumnsInOnePageCheckbox: () => {
|
|
2335
|
-
dragAndDropIntoCategoriesPage.fitAllColumnsInOnePageCheckbox()
|
|
2336
|
-
.click();
|
|
2337
|
-
steps.verifyFitAllColumnsInOnePageCheckboxUnchecked();
|
|
2338
|
-
},
|
|
2339
|
-
|
|
2340
|
-
/**
|
|
2341
|
-
* This function verifies text in cell height input field
|
|
2342
|
-
* @param {number} cellHeight of the rows
|
|
2343
|
-
*/
|
|
2344
|
-
verifyDropzoneHeightInputField: (cellHeight) => {
|
|
2345
|
-
dragAndDropIntoCategoriesPage.dropzoneHeightInputField()
|
|
2346
|
-
.should('have.value', cellHeight);
|
|
2347
|
-
},
|
|
2348
|
-
|
|
2349
|
-
/**
|
|
2350
|
-
* This function verifies the row spacing
|
|
2351
|
-
* @param {("No spacing"|"Small"|"Wide")} spacing of the rows
|
|
2352
|
-
*/
|
|
2353
|
-
verifyRowSpacingStudentView: (spacing) => {
|
|
2354
|
-
switch (spacing) {
|
|
2355
|
-
case 'No spacing':
|
|
2356
|
-
dragAndDropIntoCategoriesPage.tableRowContainerStudentView()
|
|
2357
|
-
.eq(0)
|
|
2358
|
-
.should('have.css', 'row-gap', '0px');
|
|
2359
|
-
break;
|
|
2360
|
-
case 'Small':
|
|
2361
|
-
dragAndDropIntoCategoriesPage.tableRowContainerStudentView()
|
|
2362
|
-
.eq(0)
|
|
2363
|
-
.should('have.css', 'row-gap', '8px');
|
|
2364
|
-
break;
|
|
2365
|
-
case 'Wide':
|
|
2366
|
-
dragAndDropIntoCategoriesPage.tableRowContainerStudentView()
|
|
2367
|
-
.eq(0)
|
|
2368
|
-
.should('have.css', 'row-gap', '24px');
|
|
2369
|
-
break;
|
|
2370
|
-
default:
|
|
2371
|
-
throw new Error(`Unsupported spacing option: ${spacing}`);
|
|
2372
|
-
}
|
|
2373
|
-
},
|
|
2374
|
-
|
|
2375
|
-
verifyOptionAlignmentInPanelInStudentView: () => {
|
|
2376
|
-
dragAndDropIntoCategoriesPage.optionsWrapperPreviewTab()
|
|
2377
|
-
.should('have.css', 'align-content', 'flex-start');
|
|
2378
|
-
},
|
|
2379
2319
|
}
|
|
2380
2320
|
|
|
2381
2321
|
const tests = {
|
|
@@ -2399,7 +2339,6 @@ const tests = {
|
|
|
2399
2339
|
...styleAndLayoutCustomizationAccordionComponent.tests,
|
|
2400
2340
|
...gradingViewEnumerationComponent.tests,
|
|
2401
2341
|
...ariaLabelSectionComponent.tests,
|
|
2402
|
-
...printPreviewComponent.tests,
|
|
2403
2342
|
verifyContentsOfSpecifyCorrectAnswerSection: (scoringType) => {
|
|
2404
2343
|
it(`When the user selects ${scoringType} from scoring type dropdown then the specify correct answer sections should be displayed`, () => {
|
|
2405
2344
|
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertySpecifyCorrectAnswer(0, 'None');
|
|
@@ -2443,17 +2382,21 @@ const tests = {
|
|
|
2443
2382
|
};
|
|
2444
2383
|
});
|
|
2445
2384
|
|
|
2385
|
+
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredCorrectAnswerErrorMessageCSSAndA11y();
|
|
2386
|
+
|
|
2446
2387
|
it('When the user drops an option in the dropzone, the error message should disappear', () => {
|
|
2447
2388
|
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Eagle': 1 });
|
|
2448
2389
|
});
|
|
2449
2390
|
|
|
2391
|
+
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
|
2392
|
+
|
|
2450
2393
|
it('CSS of \'Correct\' accordion contents', { tags: 'css' }, () => {
|
|
2451
2394
|
//Navigation button
|
|
2452
2395
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.leftArrowNavigationButtonSpecifyCorrectAnswerSection().find('path'), {
|
|
2453
|
-
'fill': css.color.
|
|
2396
|
+
'fill': css.color.nextPreviousButtonFill
|
|
2454
2397
|
});
|
|
2455
2398
|
utilities.verifyCSS(utilities.getNthElement(dragAndDropIntoCategoriesPage.tableCellContainerSpecifyCorrectAnswerSection(), 15), {
|
|
2456
|
-
'background-color': css.color.
|
|
2399
|
+
'background-color': css.color.defaultBackground,
|
|
2457
2400
|
'border-color': css.color.matrixCellBorder
|
|
2458
2401
|
});
|
|
2459
2402
|
utilities.verifyCSS(utilities.getNthElement(dragAndDropIntoCategoriesPage.tableCellContainerSpecifyCorrectAnswerSection(), 15), {
|
|
@@ -2462,7 +2405,7 @@ const tests = {
|
|
|
2462
2405
|
});
|
|
2463
2406
|
utilities.verifyCSS(utilities.getNthElement(dragAndDropIntoCategoriesPage.tableCellContainerSpecifyCorrectAnswerSection(), 16), {
|
|
2464
2407
|
'background-color': css.color.matrixDropzoneCellBg,
|
|
2465
|
-
'border': `
|
|
2408
|
+
'border': `1px dashed ${css.color.matrixCellBorder}`
|
|
2466
2409
|
});
|
|
2467
2410
|
utilities.verifyCSS(utilities.getNthElement(dragAndDropIntoCategoriesPage.tableCellContainerSpecifyCorrectAnswerSection(), 30), {
|
|
2468
2411
|
'background-color': css.color.matrixSubheadingCellBg,
|
|
@@ -2473,83 +2416,24 @@ const tests = {
|
|
|
2473
2416
|
'border-color': css.color.matrixCellBorder
|
|
2474
2417
|
});
|
|
2475
2418
|
utilities.verifyCSS(utilities.getNthElement(dragAndDropIntoCategoriesPage.tableCellLabel(), 16), {
|
|
2476
|
-
'color': css.color.text,
|
|
2477
|
-
'font-size': css.fontSize.default,
|
|
2478
|
-
'font-weight': css.fontWeight.regular
|
|
2479
|
-
});
|
|
2480
|
-
utilities.verifyCSS(utilities.getNthElement(dragAndDropIntoCategoriesPage.tableCellLabel(), 0), {
|
|
2481
2419
|
'color': css.color.text,
|
|
2482
2420
|
'font-size': css.fontSize.heading,
|
|
2483
2421
|
'font-weight': css.fontWeight.bold
|
|
2484
2422
|
});
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
cy.checkAccessibility(dragAndDropIntoCategoriesPage.tableCellContainerSpecifyCorrectAnswerSection());
|
|
2489
|
-
});
|
|
2490
|
-
},
|
|
2491
|
-
|
|
2492
|
-
verifyPrintLayoutSettingsAccordionAdditionalContents: () => {
|
|
2493
|
-
it('\'Fit all columns in one page\' label should be displayed', () => {
|
|
2494
|
-
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.fitAllColumnsInOnePageLabel(), 'Fit all columns in one page');
|
|
2495
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.fitAllColumnsInOnePageLabel(), 'visible');
|
|
2496
|
-
});
|
|
2497
|
-
|
|
2498
|
-
it('Fit all columns in one page checkbox should be displayed and in checked state by default', () => {
|
|
2499
|
-
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.fitAllColumnsInOnePageCheckbox(), 'exist');
|
|
2500
|
-
steps.verifyFitAllColumnsInOnePageCheckboxChecked();
|
|
2501
|
-
});
|
|
2502
|
-
|
|
2503
|
-
it('CSS of \'Fit all columns in one page\' section', { tags: 'css' }, () => {
|
|
2504
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.fitAllColumnsInOnePageLabel(), {
|
|
2505
|
-
'color': css.color.labelText,
|
|
2506
|
-
'font-size': css.fontSize.normal,
|
|
2507
|
-
'font-weight': css.fontWeight.regular
|
|
2508
|
-
});
|
|
2509
|
-
});
|
|
2510
|
-
|
|
2511
|
-
it('Accessibility of \'Fit all columns in one page\' section', { tags: 'a11y' }, () => {
|
|
2512
|
-
cy.checkAccessibility(dragAndDropIntoCategoriesPage.fitAllColumnsInOnePageCheckbox().parents('.print-layout-settings-container'));
|
|
2513
|
-
});
|
|
2514
|
-
|
|
2515
|
-
it('User should be able to check and uncheck the \'Fit all columns in one page\' checkbox', () => {
|
|
2516
|
-
steps.uncheckFitAllColumnsInOnePageCheckbox();
|
|
2517
|
-
steps.checkFitAllColumnsInOnePageCheckbox();
|
|
2518
|
-
});
|
|
2519
|
-
|
|
2520
|
-
it('\'Dropzone height (px)\' label and input field should be displayed and input field should be prefilled with 58px by default', () => {
|
|
2521
|
-
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.dropzoneHeightLabel(), 'Dropzone height (px)');
|
|
2522
|
-
dragAndDropIntoCategoriesPage.steps.verifyDropzoneHeightInputField('58');
|
|
2523
|
-
});
|
|
2524
|
-
|
|
2525
|
-
it('CSS of \'Dropzone height (px)\' label', { tags: 'css' }, () => {
|
|
2526
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.dropzoneHeightLabel(), {
|
|
2527
|
-
'color': css.color.labels,
|
|
2528
|
-
'font-size': css.fontSize.normal,
|
|
2423
|
+
utilities.verifyCSS(utilities.getNthElement(dragAndDropIntoCategoriesPage.tableCellLabel(), 17), {
|
|
2424
|
+
'color': css.color.text,
|
|
2425
|
+
'font-size': css.fontSize.default,
|
|
2529
2426
|
'font-weight': css.fontWeight.semibold
|
|
2530
2427
|
});
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
});
|
|
2536
|
-
|
|
2537
|
-
it('When the user unchecked Fit all columns in one page checkbox,Dropzone width (px) label and input field should be visible and by default it should be 156px', () => {
|
|
2538
|
-
steps.uncheckFitAllColumnsInOnePageCheckbox();
|
|
2539
|
-
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.dropzoneWidthLabel(), 'Dropzone width (px)');
|
|
2540
|
-
dragAndDropIntoCategoriesPage.steps.verifyDropzoneWidthInputField(0, '156');
|
|
2541
|
-
});
|
|
2542
|
-
|
|
2543
|
-
it('CSS of \'Dropzone width (px)\' label', { tags: 'css' }, () => {
|
|
2544
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.dropzoneWidthLabel(), {
|
|
2545
|
-
'color': css.color.labels,
|
|
2546
|
-
'font-size': css.fontSize.normal,
|
|
2547
|
-
'font-weight': css.fontWeight.semibold
|
|
2428
|
+
utilities.verifyCSS(utilities.getNthElement(dragAndDropIntoCategoriesPage.tableCellLabel(), 18), {
|
|
2429
|
+
'color': css.color.text,
|
|
2430
|
+
'font-size': css.fontSize.default,
|
|
2431
|
+
'font-weight': css.fontWeight.regular
|
|
2548
2432
|
});
|
|
2549
2433
|
});
|
|
2550
2434
|
|
|
2551
|
-
it('Accessibility of \'
|
|
2552
|
-
cy.checkAccessibility(dragAndDropIntoCategoriesPage.
|
|
2435
|
+
it('Accessibility of \'Correct\' accordion contents', { tags: 'a11y' }, () => {
|
|
2436
|
+
cy.checkAccessibility(dragAndDropIntoCategoriesPage.tableCellContainerSpecifyCorrectAnswerSection().parents('.correct-answer-accordion'))
|
|
2553
2437
|
});
|
|
2554
2438
|
},
|
|
2555
2439
|
}
|