itemengine-cypress-automation 1.0.165-migrationScripts-e27d6f2.0 → 1.0.166
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +83 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +200 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +56 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +95 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +71 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +72 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +71 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +22 -11
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +161 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +308 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +216 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +336 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +570 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +356 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +299 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +18 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +11 -6
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +355 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +2 -36
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +22 -34
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +8 -24
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +5 -25
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +68 -114
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +67 -111
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +71 -123
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +41 -63
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +21 -25
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +50 -85
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +68 -115
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +54 -98
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +72 -120
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +309 -0
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/Matching/toolSettings.js +72 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1033 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +28 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +236 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +239 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +178 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +407 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +273 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +228 -0
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +120 -0
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +659 -0
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +149 -0
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +151 -0
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +171 -0
- package/cypress/e2e/ILC/NumberLine/headerSection.js +76 -0
- package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +54 -0
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +200 -0
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +67 -0
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +135 -0
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +73 -0
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +372 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1014 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +457 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +155 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +275 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +290 -0
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +137 -0
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
- package/cypress/fixtures/theme/ilc.json +14 -26
- package/cypress/pages/brainingCampManipulativePage.js +122 -0
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +2 -2
- package/cypress/pages/components/defaultToolDropdown.js +77 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +629 -2
- package/cypress/pages/components/index.js +3 -0
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/measuringToolComponent.js +2 -2
- package/cypress/pages/components/resetPopupComponent.js +74 -0
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -4
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +60 -3
- package/cypress/pages/components/toolSettingsComponent.js +80 -12
- package/cypress/pages/components/toolsAndControlsComponent.js +69 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -8
- package/cypress/pages/feedbackScalePage copy.js +716 -0
- package/cypress/pages/feedbackScalePage.js +591 -449
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
- package/cypress/pages/graphingPage.js +9 -145
- package/cypress/pages/gridFillPage.js +135 -120
- package/cypress/pages/highlightPage.js +0 -394
- package/cypress/pages/index.js +5 -2
- package/cypress/pages/matchingPage.js +78 -20
- package/cypress/pages/multipleSelectionGridPage.js +88 -1
- package/cypress/pages/numberLinePage.js +723 -0
- package/cypress/pages/singleSelectionGridPage.js +86 -0
- package/cypress/pages/textSelectionPage.js +582 -0
- package/package.json +2 -2
@@ -0,0 +1,134 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { essayResponsePage } from "../../../pages";
|
3
|
+
import { ckEditorToolbar } from "../../../pages/components";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
let specialCharacters = [':', ')', '`']
|
7
|
+
describe('Create question page - Essay Response: Additional Settings basic', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Additional Settings accordion', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
16
|
+
});
|
17
|
+
|
18
|
+
essayResponsePage.tests.verifyAdditionalSettingsAccordionProperties();
|
19
|
+
});
|
20
|
+
|
21
|
+
describe('\'Student response area and layout\' section', () => {
|
22
|
+
abortEarlySetup();
|
23
|
+
before(() => {
|
24
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
25
|
+
essayResponsePage.steps.expandAdditionalSettings();
|
26
|
+
});
|
27
|
+
|
28
|
+
it('\'Student response area and layout\' label should be displayed', () => {
|
29
|
+
essayResponsePage.studentResponseAndLayoutLabel()
|
30
|
+
.verifyInnerText('Student response area and layout')
|
31
|
+
.should('be.visible');
|
32
|
+
});
|
33
|
+
|
34
|
+
it('CSS of \'Student response area and layout\' section', { tags: 'css' }, () => {
|
35
|
+
essayResponsePage.studentResponseAndLayoutLabel()
|
36
|
+
.verifyCSS(css.color.labels, css.fontSize.default, css.fontWeight.semibold);
|
37
|
+
});
|
38
|
+
|
39
|
+
it('Accessibility of \'Student response area and layout\' section', { tags: 'a11y' }, () => {
|
40
|
+
cy.checkAccessibility(essayResponsePage.studentResponseAndLayoutLabel())
|
41
|
+
});
|
42
|
+
});
|
43
|
+
|
44
|
+
//Failing due to https://redmine.zeuslearning.com/issues/551117
|
45
|
+
describe('Additional Settings: Custom special characters section', () => {
|
46
|
+
abortEarlySetup();
|
47
|
+
before(() => {
|
48
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
49
|
+
essayResponsePage.steps.expandAdditionalSettings();
|
50
|
+
});
|
51
|
+
|
52
|
+
it('\'Custom special characters\' label and \'Custom special characters\' input field should be displayed, by default the input field should be empty and user should be able to enter \'Custom special characters', () => {
|
53
|
+
essayResponsePage.customSpecialCharacterLabel()
|
54
|
+
.verifyInnerText('Custom special characters');
|
55
|
+
essayResponsePage.customSpecialCharacterInputField()
|
56
|
+
.should('have.value', '');
|
57
|
+
essayResponsePage.customSpecialCharacterInputField()
|
58
|
+
.type(':)`')
|
59
|
+
.should('have.value', ':)`');
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user has added the \'Custom special characters\' then in the preview tab, on clicking on the special character toolbar option, only the custom special characters should appear in the dialog box and the user should be able to enter custom special characters in the response field', () => {
|
63
|
+
essayResponsePage.steps.switchToPreviewTab();
|
64
|
+
essayResponsePage.previewTabToolbarOption('Special characters')
|
65
|
+
.click();
|
66
|
+
ckEditorToolbar.ckeDialogbox()
|
67
|
+
.should('be.visible');
|
68
|
+
specialCharacters.forEach((character, count) => {
|
69
|
+
essayResponsePage.specialCharacterFlyoutIcon(count)
|
70
|
+
.should('have.text', character);
|
71
|
+
});
|
72
|
+
});
|
73
|
+
|
74
|
+
it('User should be able to add all special characters in the response field and word count should update accordingly.', () => {
|
75
|
+
for (let index = 0; index < specialCharacters.length; index++) {
|
76
|
+
essayResponsePage.specialCharacterFlyoutIcon(index)
|
77
|
+
.click();
|
78
|
+
};
|
79
|
+
essayResponsePage.responseField()
|
80
|
+
.should('have.text', ':)`');
|
81
|
+
essayResponsePage.responseFieldWordCount()
|
82
|
+
.should('have.text', '1/10000');
|
83
|
+
});
|
84
|
+
});
|
85
|
+
|
86
|
+
describe('Additional Settings: Font Size dropdown', () => {
|
87
|
+
abortEarlySetup();
|
88
|
+
before(() => {
|
89
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
90
|
+
essayResponsePage.steps.expandAdditionalSettings();
|
91
|
+
essayResponsePage.steps.setWordLimit(2);
|
92
|
+
});
|
93
|
+
const fontsizes = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
|
94
|
+
const font = ['16px', '12px', '14px', '17px', '20px', '24px'];
|
95
|
+
|
96
|
+
essayResponsePage.tests.verifyFontSizeSectionContents();
|
97
|
+
|
98
|
+
fontsizes.forEach((option, count) => {
|
99
|
+
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size for the entire question in the student player should be changed to ${option} in the \'Preview\' tab`, () => {
|
100
|
+
essayResponsePage.fontSizeDropdown()
|
101
|
+
.click();
|
102
|
+
essayResponsePage.fontSizeListOptions(count)
|
103
|
+
.click();
|
104
|
+
essayResponsePage.fontSizeDropdown()
|
105
|
+
.verifyInnerText(`${option}`);
|
106
|
+
cy.log('Switching to Preview tab.');
|
107
|
+
essayResponsePage.steps.switchToPreviewTab();
|
108
|
+
essayResponsePage.previewTabToolbarOption('Special characters')
|
109
|
+
.should('have.css', 'font-size', font[count]);
|
110
|
+
essayResponsePage.responseField()
|
111
|
+
.should('have.css', 'font-size', font[count]);
|
112
|
+
essayResponsePage.responseFieldWordCount()
|
113
|
+
.should('have.css', 'font-size', font[count]);
|
114
|
+
cy.log('Reaching word limit to verify font size of warning message');
|
115
|
+
essayResponsePage.responseField()
|
116
|
+
.type('Lorem Ipsum')
|
117
|
+
.should('have.text', 'Lorem Ipsum');
|
118
|
+
essayResponsePage.wordLimitReachedWarningMessage()
|
119
|
+
.should('have.css', 'font-size', font[count]);
|
120
|
+
essayResponsePage.steps.switchToEditTab()
|
121
|
+
});
|
122
|
+
});
|
123
|
+
});
|
124
|
+
|
125
|
+
describe('Additional Settings: Details section', () => {
|
126
|
+
abortEarlySetup();
|
127
|
+
before(() => {
|
128
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
129
|
+
essayResponsePage.steps.expandAdditionalSettings();
|
130
|
+
});
|
131
|
+
|
132
|
+
essayResponsePage.tests.verifyDetailsSection();
|
133
|
+
});
|
134
|
+
});
|
@@ -0,0 +1,161 @@
|
|
1
|
+
describe('Create item page: Feedback scale: Preview tab: \'Button\' and \'Star\' layouts, add, delete option accordion', () => {
|
2
|
+
before(() => {
|
3
|
+
cy.loginAs('admin');
|
4
|
+
});
|
5
|
+
|
6
|
+
describe('Feedback scale - \'Numbers\' layout style in the preview tab', () => {
|
7
|
+
abortEarlySetup();
|
8
|
+
before(() => {
|
9
|
+
});
|
10
|
+
|
11
|
+
it('By default 5 number buttons with text "#"(# being a number from 1 to 5) should be displayed in the preview tab', () => {
|
12
|
+
|
13
|
+
});
|
14
|
+
|
15
|
+
it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
|
16
|
+
|
17
|
+
});
|
18
|
+
|
19
|
+
it('The legend text accordion should display the number button, no legend text should be displayed for the number buttons', () => {
|
20
|
+
});
|
21
|
+
|
22
|
+
it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective number button in the legend text accordion', () => {
|
23
|
+
|
24
|
+
});
|
25
|
+
|
26
|
+
it('CSS of number buttons - unselected state', { tags: 'css' }, () => {
|
27
|
+
});
|
28
|
+
|
29
|
+
it('Accessibility of number buttons - unselected state', { tags: 'a11y' }, () => {
|
30
|
+
});
|
31
|
+
|
32
|
+
it('The user should be able to mark feedback by clicking on any number button', () => {
|
33
|
+
|
34
|
+
});
|
35
|
+
|
36
|
+
it('CSS of number buttons - selected state', { tags: 'css' }, () => {
|
37
|
+
});
|
38
|
+
|
39
|
+
it('Accessibility of number buttons - selected state', { tags: 'a11y' }, () => {
|
40
|
+
});
|
41
|
+
});
|
42
|
+
|
43
|
+
describe('Feedback scale - \'Thumbs\' layout style in the preview tab', () => {
|
44
|
+
abortEarlySetup();
|
45
|
+
before(() => {
|
46
|
+
});
|
47
|
+
|
48
|
+
it('By default two buttons, "Thumbs up" and "Thumbs down" should be displayed in the preview tab', () => {
|
49
|
+
|
50
|
+
});
|
51
|
+
|
52
|
+
it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
|
53
|
+
|
54
|
+
});
|
55
|
+
|
56
|
+
it('The legend text accordion should display the two buttons with button labels - "Thumbs up" and "Thumbs down", no legend text should be displayed for the two buttons', () => {
|
57
|
+
});
|
58
|
+
|
59
|
+
it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective button in the legend text accordion', () => {
|
60
|
+
|
61
|
+
});
|
62
|
+
|
63
|
+
it('CSS of Thumb buttons - unselected state', { tags: 'css' }, () => {
|
64
|
+
});
|
65
|
+
|
66
|
+
it('Accessibility of Thumb buttons - unselected state', { tags: 'a11y' }, () => {
|
67
|
+
});
|
68
|
+
|
69
|
+
it('The user should be able to mark feedback by clicking on any Thumb button', () => {
|
70
|
+
|
71
|
+
});
|
72
|
+
|
73
|
+
it('CSS of Thumb buttons - selected state', { tags: 'css' }, () => {
|
74
|
+
});
|
75
|
+
|
76
|
+
it('Accessibility of Thumb buttons - selected state', { tags: 'a11y' }, () => {
|
77
|
+
});
|
78
|
+
});
|
79
|
+
|
80
|
+
describe('Feedback scale - \'Stars/Hearts\' layout style in the preview tab', () => {
|
81
|
+
abortEarlySetup();
|
82
|
+
before(() => {
|
83
|
+
});
|
84
|
+
|
85
|
+
it('By default 5 star buttons should be displayed in the preview tab', () => {
|
86
|
+
|
87
|
+
});
|
88
|
+
|
89
|
+
it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
|
90
|
+
|
91
|
+
});
|
92
|
+
|
93
|
+
it('The legend text accordion should display the stars in a list with all 5 stars present and the respective number of stars in highlighted state, no legend text should be displayed for the star buttons', () => {
|
94
|
+
});
|
95
|
+
|
96
|
+
it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective star button in the legend text accordion', () => {
|
97
|
+
|
98
|
+
});
|
99
|
+
|
100
|
+
it('CSS of star buttons - unselected state', { tags: 'css' }, () => {
|
101
|
+
});
|
102
|
+
|
103
|
+
it('Accessibility of star buttons - unselected state', { tags: 'a11y' }, () => {
|
104
|
+
});
|
105
|
+
|
106
|
+
it('The user should be able to mark feedback by clicking on any star button', () => {
|
107
|
+
|
108
|
+
});
|
109
|
+
|
110
|
+
it('CSS of star buttons - selected state', { tags: 'css' }, () => {
|
111
|
+
});
|
112
|
+
|
113
|
+
it('Accessibility of star buttons - selected state', { tags: 'a11y' }, () => {
|
114
|
+
});
|
115
|
+
|
116
|
+
it('By default 5 heart buttons should be displayed in the preview tab', () => {
|
117
|
+
// Verify that there are 5 heart buttons by default
|
118
|
+
// You can use assertions to check the presence of heart buttons in the preview tab
|
119
|
+
});
|
120
|
+
|
121
|
+
it('A \'Legend text\' accordion should be present and by default it should be in expanded state', () => {
|
122
|
+
// Verify that a 'Legend text' accordion is present and expanded by default
|
123
|
+
});
|
124
|
+
|
125
|
+
it('The legend text accordion should display the hearts in a list with all 5 hearts present and the respective number of hearts in highlighted state, no legend text should be displayed for the heart buttons', () => {
|
126
|
+
// Verify that the legend text accordion displays hearts in a list with all 5 hearts present
|
127
|
+
// Check that the respective number of hearts is highlighted
|
128
|
+
// Ensure that no legend text is displayed for the heart buttons
|
129
|
+
});
|
130
|
+
|
131
|
+
it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective heart button in the legend text accordion', () => {
|
132
|
+
// Switch to the edit tab
|
133
|
+
// Add legend text for each heart button
|
134
|
+
// Verify that the added legend text is displayed beside the respective heart button in the legend text accordion
|
135
|
+
});
|
136
|
+
|
137
|
+
it('CSS of heart buttons - unselected state', { tags: 'css' }, () => {
|
138
|
+
// Verify the CSS of heart buttons in their unselected state
|
139
|
+
});
|
140
|
+
|
141
|
+
it('Accessibility of heart buttons - unselected state', { tags: 'a11y' }, () => {
|
142
|
+
// Verify the accessibility of heart buttons in their unselected state
|
143
|
+
});
|
144
|
+
|
145
|
+
it('The user should be able to mark feedback by clicking on any heart button', () => {
|
146
|
+
// Verify that the user can mark feedback by clicking on any heart button
|
147
|
+
});
|
148
|
+
|
149
|
+
it('CSS of heart buttons - selected state', { tags: 'css' }, () => {
|
150
|
+
// Verify the CSS of heart buttons in their selected state
|
151
|
+
});
|
152
|
+
|
153
|
+
it('Accessibility of heart buttons - selected state', { tags: 'a11y' }, () => {
|
154
|
+
// Verify the accessibility of heart buttons in their selected state
|
155
|
+
});
|
156
|
+
});
|
157
|
+
});
|
158
|
+
|
159
|
+
//edit tab -
|
160
|
+
//different files for all scale styles
|
161
|
+
//include all possible cases, default, add/delete edit tab and preview
|
@@ -0,0 +1,308 @@
|
|
1
|
+
import { feedbackScalePage } from "../../../pages";
|
2
|
+
import { colorPopupComponent } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const numbersDefaultColor = "rgb(107, 139, 255)";
|
6
|
+
const css = Cypress.env('css');
|
7
|
+
|
8
|
+
describe('Create item page: Feedback scale - Numbers feedback scale style - Edit and preview tab contents and functionality ', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Numbers feedback scale style - Edit tab contents', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
});
|
19
|
+
|
20
|
+
it('The user should be able to select "Numbers" feedback scale style from the feedback scale style dropdown', () => {
|
21
|
+
feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
|
22
|
+
feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
|
23
|
+
});
|
24
|
+
|
25
|
+
it('By default in the options stepper count input field, "5" should be displayed', () => {
|
26
|
+
feedbackScalePage.steps.verifyCountInOptionsStepperInputField(5);
|
27
|
+
});
|
28
|
+
|
29
|
+
it('5 option accordions should be displayed with label "Option #" (# being a number from 1 to 5), Points and "Delete option" icon button, by default all option accordions should be in collapsed state', () => {
|
30
|
+
for (let index = 0; index < 5; index++) {
|
31
|
+
feedbackScalePage.steps.verifyOptionsAccordionProperties(index, { optionLabel: `Option ${index + 1}`, Points: `${index + 1}` });
|
32
|
+
feedbackScalePage.steps.verifyOptionAccordionCollapsedState(index);
|
33
|
+
};
|
34
|
+
});
|
35
|
+
|
36
|
+
it('The user should be able to expand any option accordion, on expanding the option accordion, a "Legend text" label and empty input field with placeholder text, "Enter legend text" should be displayed', () => {
|
37
|
+
feedbackScalePage.steps.expandOptionAccordion(0);
|
38
|
+
utilities.verifyInnerText(utilities.getNthElement(feedbackScalePage.legendTextLabel(), 0), 'Legend text');
|
39
|
+
feedbackScalePage.steps.verifyLegendTextInputFieldPlaceholder(0);
|
40
|
+
});
|
41
|
+
|
42
|
+
it('The user should be able to enter text in the legend text input field, the placeholder text should disappear on entering the text', () => {
|
43
|
+
feedbackScalePage.steps.addLegendText(0, 'I am uncomfortable with the learning target.');
|
44
|
+
feedbackScalePage.steps.verifyLegendTextInputFieldPlaceholderNotExists(0);
|
45
|
+
});
|
46
|
+
|
47
|
+
it('When the user removes the added text from the legend input field, the placeholder text should appear again', () => {
|
48
|
+
feedbackScalePage.steps.clearLegendTextInputField(0);
|
49
|
+
feedbackScalePage.steps.verifyLegendTextInputFieldPlaceholder(0);
|
50
|
+
});
|
51
|
+
|
52
|
+
it('On expanding any other option accordion, the previously expanded accordion should continue to stay in expanded state', () => {
|
53
|
+
feedbackScalePage.steps.expandOptionAccordion(1);
|
54
|
+
feedbackScalePage.steps.verifyOptionAccordionExpandedState(0);
|
55
|
+
feedbackScalePage.steps.verifyOptionAccordionExpandedState(1);
|
56
|
+
});
|
57
|
+
});
|
58
|
+
|
59
|
+
describe('Numbers feedback scale style - Preview tab contents', () => {
|
60
|
+
const legendTexts = ['Poor', 'Okay', 'Can do better', 'Good', 'Excellent'];
|
61
|
+
abortEarlySetup();
|
62
|
+
before(() => {
|
63
|
+
feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
|
64
|
+
cy.barsPreLoaderWait();
|
65
|
+
feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
|
66
|
+
feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
|
67
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
68
|
+
});
|
69
|
+
|
70
|
+
it('By default 5 number buttons with text "#" (# being a number from 1 to 5) should be displayed in the preview tab', () => {
|
71
|
+
utilities.verifyElementCount(feedbackScalePage.feedbackButton(), 5);
|
72
|
+
for (let index = 0; index < 5; index++) {
|
73
|
+
feedbackScalePage.steps.verifyFeedbackButtonInPreviewTab(index, `${index + 1}`)
|
74
|
+
};
|
75
|
+
});
|
76
|
+
|
77
|
+
feedbackScalePage.tests.verifyLegendAccordionDefaultState();
|
78
|
+
|
79
|
+
feedbackScalePage.tests.verifyLegendAccordionCollapsedAndExpandedState();
|
80
|
+
|
81
|
+
it('The legend accordion should display the number button, no legend text should be displayed for the number buttons', () => {
|
82
|
+
for (let index = 0; index < 5; index++) {
|
83
|
+
feedbackScalePage.steps.verifyNumberBlocksInLegendAccordion(index);
|
84
|
+
};
|
85
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.legendTextPreviewTab(), 'notExist');
|
86
|
+
});
|
87
|
+
|
88
|
+
it('When the user switches to edit tab and adds legend text, then the added legend text should be displayed besides the respective number button in the legend accordion', () => {
|
89
|
+
feedbackScalePage.steps.switchToEditTab();
|
90
|
+
legendTexts.forEach((legendText, index) => {
|
91
|
+
feedbackScalePage.steps.expandOptionAccordion(index);
|
92
|
+
feedbackScalePage.steps.addLegendText(index, legendText);
|
93
|
+
});
|
94
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
95
|
+
legendTexts.forEach((legendText, buttonIndex) => {
|
96
|
+
feedbackScalePage.steps.verifyNumberBlockFeedbackButtonLabelLegendTextInLegendAccordion(buttonIndex, legendText);
|
97
|
+
});
|
98
|
+
});
|
99
|
+
|
100
|
+
it('CSS of number buttons - unselected state', { tags: 'css' }, () => {
|
101
|
+
utilities.verifyCSS(feedbackScalePage.feedbackButtonNumberText(), {
|
102
|
+
'color': css.color.text,
|
103
|
+
'font-size': css.fontSize.extraLarge,
|
104
|
+
'font-weight': css.fontWeight.regular,
|
105
|
+
});
|
106
|
+
utilities.verifyCSS(feedbackScalePage.feedbackButton(), {
|
107
|
+
'background-color': css.color.transparent,
|
108
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
109
|
+
});
|
110
|
+
cy.log('Hover state CSS')
|
111
|
+
utilities.hoverOverElement(utilities.getNthElement(feedbackScalePage.feedbackButton(), 0));
|
112
|
+
utilities.verifyCSS(utilities.getNthElement(feedbackScalePage.feedbackButton(), 0), {
|
113
|
+
'background-color': css.color.transparent,
|
114
|
+
'border': `2px solid ${css.color.figDefaultComponentBorder}`
|
115
|
+
});
|
116
|
+
utilities.hoverAwayFromElement();
|
117
|
+
});
|
118
|
+
|
119
|
+
it('Accessibility of number buttons - unselected state', { tags: 'a11y' }, () => {
|
120
|
+
cy.checkAccessibility(feedbackScalePage.feedbackButton().parents('[class*="question-preview-wrapper"]'));
|
121
|
+
});
|
122
|
+
|
123
|
+
it('The user should be able to mark feedback by clicking on any number button', () => {
|
124
|
+
feedbackScalePage.steps.clickOnFeedbackButton(0);
|
125
|
+
feedbackScalePage.steps.verifyFeedbackButtonSelectedState(0);
|
126
|
+
});
|
127
|
+
|
128
|
+
it('The user should be able to update the feedback by selecting other button, previously selected button should get unselected', () => {
|
129
|
+
feedbackScalePage.steps.clickOnFeedbackButton(1);
|
130
|
+
feedbackScalePage.steps.verifyFeedbackButtonSelectedState(1);
|
131
|
+
feedbackScalePage.steps.verifyFeedbackButtonUnselectedState(0);
|
132
|
+
});
|
133
|
+
|
134
|
+
it('CSS of number buttons - selected state', { tags: 'css' }, () => {
|
135
|
+
utilities.verifyCSS(utilities.getNthElement(feedbackScalePage.feedbackButtonNumberText(), 1), {
|
136
|
+
'color': css.color.text,
|
137
|
+
'font-size': css.fontSize.extraLarge,
|
138
|
+
'font-weight': css.fontWeight.bold,
|
139
|
+
});
|
140
|
+
utilities.verifyCSS(utilities.getNthElement(feedbackScalePage.feedbackButton(), 1), {
|
141
|
+
'background-color': "rgba(107, 139, 255, 0.1)",
|
142
|
+
'border': `2px solid ${css.color.figDefaultComponentBorder}`
|
143
|
+
});
|
144
|
+
utilities.verifyCSS(feedbackScalePage.legendAccordion().find('.customize_info_label'), {
|
145
|
+
'color': css.color.activeButtons,
|
146
|
+
'font-size': css.fontSize.normal,
|
147
|
+
'font-weight': css.fontWeight.regular
|
148
|
+
});
|
149
|
+
utilities.verifyCSS(feedbackScalePage.legendTextPreviewTab(), {
|
150
|
+
'color': css.color.text,
|
151
|
+
'font-size': css.fontSize.small,
|
152
|
+
'font-weight': css.fontWeight.regular
|
153
|
+
});
|
154
|
+
});
|
155
|
+
|
156
|
+
it('Accessibility of number buttons - selected state', { tags: 'a11y' }, () => {
|
157
|
+
cy.checkAccessibility(feedbackScalePage.feedbackButton().parents('[class*="question-preview-wrapper"]'));
|
158
|
+
});
|
159
|
+
});
|
160
|
+
|
161
|
+
describe('Numbers feedback scale style - Add and delete options : Edit tab functionality', () => {
|
162
|
+
abortEarlySetup();
|
163
|
+
before(() => {
|
164
|
+
feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
|
165
|
+
cy.barsPreLoaderWait();
|
166
|
+
feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
|
167
|
+
feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
|
168
|
+
});
|
169
|
+
|
170
|
+
it('The user should be able to add a new option by increasing the stepper count in the options input field', () => {
|
171
|
+
feedbackScalePage.steps.increaseOptionsInputStepperCount(1);
|
172
|
+
feedbackScalePage.steps.verifyOptionsAccordionCount(6);
|
173
|
+
});
|
174
|
+
|
175
|
+
it('The newly added option should be displayed with label "Option 6", Points and "Delete option" icon button, by default the accordion should be in collapsed state', () => {
|
176
|
+
feedbackScalePage.steps.verifyOptionsAccordionProperties(5, { optionLabel: 'Option 6', Points: '6' });
|
177
|
+
feedbackScalePage.steps.verifyOptionAccordionCollapsedState(5);
|
178
|
+
});
|
179
|
+
|
180
|
+
it('The user should also be able to add a new option using the "+Add option" button, the count in the options stepper input field should also update accordingly', () => {
|
181
|
+
feedbackScalePage.steps.addOption();
|
182
|
+
feedbackScalePage.steps.verifyCountInOptionsStepperInputField(7);
|
183
|
+
feedbackScalePage.steps.verifyOptionsAccordionCount(7);
|
184
|
+
feedbackScalePage.steps.verifyOptionsAccordionProperties(6, { optionLabel: 'Option 7', Points: '7' });
|
185
|
+
});
|
186
|
+
|
187
|
+
it('When the user deletes an option accordion, then the remaining options should get updated accordingly, the count in the options stepper input field should also update accordingly', () => {
|
188
|
+
feedbackScalePage.steps.deleteOptionAccordion(5);
|
189
|
+
for (let index = 0; index < 6; index++) {
|
190
|
+
feedbackScalePage.steps.verifyOptionsAccordionProperties(index, { optionLabel: `Option ${index + 1}`, Points: `${index + 1}` });
|
191
|
+
};
|
192
|
+
feedbackScalePage.steps.verifyCountInOptionsStepperInputField(6);
|
193
|
+
});
|
194
|
+
|
195
|
+
it('When the user decreases the options stepper count, the last option should get removed and the remaining options should get updated accordingly', () => {
|
196
|
+
feedbackScalePage.steps.decreaseOptionsInputStepperCount(1);
|
197
|
+
feedbackScalePage.steps.verifyCountInOptionsStepperInputField(5);
|
198
|
+
for (let index = 0; index < 5; index++) {
|
199
|
+
feedbackScalePage.steps.verifyOptionsAccordionProperties(index, { optionLabel: `Option ${index + 1}`, Points: `${index + 1}` });
|
200
|
+
};
|
201
|
+
feedbackScalePage.steps.verifyCountInOptionsStepperInputField(5);
|
202
|
+
});
|
203
|
+
});
|
204
|
+
|
205
|
+
describe('Numbers feedback scale style - Add and delete options : Preview tab functionality', () => {
|
206
|
+
abortEarlySetup();
|
207
|
+
before(() => {
|
208
|
+
feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
|
209
|
+
cy.barsPreLoaderWait();
|
210
|
+
feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
|
211
|
+
feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
|
212
|
+
});
|
213
|
+
|
214
|
+
it('When the increases the stepper count in the options input field, the newly added feedback buttons should be displayed in the preview tab', () => {
|
215
|
+
feedbackScalePage.steps.increaseOptionsInputStepperCount(1);
|
216
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
217
|
+
feedbackScalePage.steps.verifyFeedbackButtonInPreviewTab(5, '6');
|
218
|
+
feedbackScalePage.steps.verifyNumberBlocksInLegendAccordion(5);
|
219
|
+
});
|
220
|
+
|
221
|
+
it('When the user adds a new option using the "+Add option" button, the newly added feedback buttons should be displayed in the preview tab', () => {
|
222
|
+
feedbackScalePage.steps.switchToEditTab();
|
223
|
+
feedbackScalePage.steps.addOption();
|
224
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
225
|
+
feedbackScalePage.steps.verifyFeedbackButtonInPreviewTab(6, '7');
|
226
|
+
feedbackScalePage.steps.verifyNumberBlocksInLegendAccordion(6);
|
227
|
+
});
|
228
|
+
|
229
|
+
it('When the user deletes an option accordion, then the remaining feedback buttons should get updated accordingly in the preview tab', () => {
|
230
|
+
feedbackScalePage.steps.switchToEditTab();
|
231
|
+
feedbackScalePage.steps.deleteOptionAccordion(5);
|
232
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
233
|
+
utilities.verifyElementCount(feedbackScalePage.feedbackButton(), 6);
|
234
|
+
for (let index = 0; index < 6; index++) {
|
235
|
+
feedbackScalePage.steps.verifyFeedbackButtonInPreviewTab(index, `${index + 1}`);
|
236
|
+
feedbackScalePage.steps.verifyNumberBlocksInLegendAccordion(index);
|
237
|
+
};
|
238
|
+
});
|
239
|
+
|
240
|
+
it('When the user decreases the options stepper count, then the last feedback button should get removed and the remaining options should get updated accordingly', () => {
|
241
|
+
feedbackScalePage.steps.switchToEditTab();
|
242
|
+
feedbackScalePage.steps.decreaseOptionsInputStepperCount(1);
|
243
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
244
|
+
utilities.verifyElementCount(feedbackScalePage.feedbackButton(), 5);
|
245
|
+
for (let index = 0; index < 5; index++) {
|
246
|
+
feedbackScalePage.steps.verifyFeedbackButtonInPreviewTab(index, `${index + 1}`);
|
247
|
+
feedbackScalePage.steps.verifyNumberBlocksInLegendAccordion(index);
|
248
|
+
};
|
249
|
+
});
|
250
|
+
});
|
251
|
+
|
252
|
+
describe('Numbers feedback scale style - Colors section contents', () => {
|
253
|
+
const modifiedColor = 'rgba(255, 0, 0, 0.7)'
|
254
|
+
abortEarlySetup();
|
255
|
+
before(() => {
|
256
|
+
feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
|
257
|
+
cy.barsPreLoaderWait();
|
258
|
+
feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
|
259
|
+
feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
|
260
|
+
});
|
261
|
+
|
262
|
+
it('For "Numbers" feedback scale style, in the color section, a color block with "rgb(107, 139, 255)" color should be displayed. An edit icon and "Edit color" label should be displayed besides the color block"', () => {
|
263
|
+
feedbackScalePage.steps.verifyColorPickerBlockColor(0, numbersDefaultColor);
|
264
|
+
utilities.verifyInnerText(feedbackScalePage.editColorButton(), 'Edit color');
|
265
|
+
utilities.verifyElementVisibilityState(feedbackScalePage.editColorButton(), 'visible');
|
266
|
+
});
|
267
|
+
|
268
|
+
it('When the user clicks on the "Edit color" button, a "Select color" popup should be displayed and the default selected color block should be in the selected state in the color popup', () => {
|
269
|
+
feedbackScalePage.steps.editColor(0);
|
270
|
+
colorPopupComponent.steps.verifySaturationPaletteColor('rgb(107, 139, 255)');
|
271
|
+
colorPopupComponent.steps.verifyHuePaletteColor('rgb(0, 55, 255)');
|
272
|
+
colorPopupComponent.steps.verifyHexValue('#6B8BFF');
|
273
|
+
colorPopupComponent.steps.verifyOpacityInputFieldValue('100');
|
274
|
+
colorPopupComponent.steps.verifyOpacitySliderValue('100');
|
275
|
+
colorPopupComponent.steps.verifySelectedColorBlock(numbersDefaultColor);
|
276
|
+
colorPopupComponent.steps.verifyRecommendedColorBlockSelectedState(8);
|
277
|
+
});
|
278
|
+
|
279
|
+
it('When the user modifies the selected color, the updated color should be displayed in the color block of the "Colors" section', () => {
|
280
|
+
colorPopupComponent.steps.addInputToHexInputField('#ff0000');
|
281
|
+
colorPopupComponent.steps.addInputToOpacityInputField('70');
|
282
|
+
colorPopupComponent.steps.clickOnOkButton();
|
283
|
+
feedbackScalePage.steps.verifyColorPickerBlockColor(0, modifiedColor);
|
284
|
+
})
|
285
|
+
});
|
286
|
+
|
287
|
+
describe('Numbers feedback scale style - Colors : Preview tab functionality', () => {
|
288
|
+
const modifiedColor = 'rgba(255, 0, 0, 0.1)'
|
289
|
+
abortEarlySetup();
|
290
|
+
before(() => {
|
291
|
+
feedbackScalePage.steps.navigateToCreateQuestion('feedback scale');
|
292
|
+
cy.barsPreLoaderWait();
|
293
|
+
feedbackScalePage.steps.expandFeedbackScaleStyleDropdown();
|
294
|
+
feedbackScalePage.steps.selectOptionFromFeedbackScaleStyleDropdown('Numbers');
|
295
|
+
});
|
296
|
+
|
297
|
+
it('When the user modifies the selected color for number buttons, then on marking the feedback in the preview tab, the feedback button should get highlighted with the modified color', () => {
|
298
|
+
feedbackScalePage.steps.editColor(0);
|
299
|
+
colorPopupComponent.steps.addInputToHexInputField('#ff0000');
|
300
|
+
colorPopupComponent.steps.addInputToOpacityInputField('70');
|
301
|
+
colorPopupComponent.steps.clickOnOkButton();
|
302
|
+
feedbackScalePage.steps.switchToPreviewTab();
|
303
|
+
feedbackScalePage.steps.clickOnFeedbackButton(1);
|
304
|
+
feedbackScalePage.steps.verifyFeedbackButtonSelectedState(1);
|
305
|
+
feedbackScalePage.steps.verifyFeedbackButtonSelectedStateColor(1, modifiedColor);
|
306
|
+
});
|
307
|
+
});
|
308
|
+
});
|