itemengine-cypress-automation 1.0.128 → 1.0.131-updateILCrepo6March-02c78d1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +210 -0
- package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +91 -0
- package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +392 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +152 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +195 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +288 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +141 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +413 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +218 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +163 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +83 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +653 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +180 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabScoringSection.js +229 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/switchingCasesBetweenOptionsLayout.js +50 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +298 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingPenaltyScoring.js +63 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +111 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsBasic.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +232 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsBasic.js +138 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +186 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +161 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +328 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +144 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabScoringSection.js +250 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +74 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +188 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +4 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -52
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +3 -211
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +39 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -50
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +325 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +1 -146
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +78 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +265 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/responseAnswersAndAcceptedStudentInput.js +56 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +40 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +249 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +64 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +128 -0
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +889 -0
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +168 -0
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +203 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +222 -0
- package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +349 -0
- package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +132 -0
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +35 -7
- package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +213 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +41 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +377 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +161 -0
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +250 -0
- package/cypress/e2e/migration/migration.js +4 -41
- package/cypress/e2e/migration/migration10.js +6 -43
- package/cypress/e2e/migration/migration2.js +6 -43
- package/cypress/e2e/migration/migration3.js +6 -43
- package/cypress/e2e/migration/migration4.js +6 -43
- package/cypress/e2e/migration/migration5.js +6 -43
- package/cypress/e2e/migration/migration6.js +6 -43
- package/cypress/e2e/migration/migration7.js +6 -43
- package/cypress/e2e/migration/migration8.js +6 -43
- package/cypress/e2e/migration/migration9.js +6 -43
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/fixtures/theme/ilc.json +6 -1
- package/cypress/fixtures/uploadResponseFileType.js +5 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -13
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +24 -6
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +42 -4
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +149 -5
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +954 -77
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +2 -1
- package/cypress/pages/contentBlocksPage.js +515 -0
- package/cypress/pages/drawingResponsePage.js +2 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +359 -3
- package/cypress/pages/fillInTheGapsDropdownPage.js +21 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +5 -57
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -24
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -435
- package/cypress/pages/fillInTheGapsTextPage.js +9 -2
- package/cypress/pages/graphingPage.js +484 -0
- package/cypress/pages/index.js +4 -1
- package/cypress/pages/simpleCalculatorPage.js +310 -0
- package/cypress/pages/uploadResponsePage.js +260 -92
- package/cypress/support/commands.js +33 -1
- package/package.json +2 -2
- package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +0 -242
- package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +0 -99
- package/cypress/e2e/ILC/Passage/passageEditTab.js +0 -241
- package/cypress/e2e/ILC/Passage/passageHeaderSection.js +0 -73
- package/cypress/e2e/ILC/Passage/passagePreviewTab.js +0 -246
@@ -0,0 +1,392 @@
|
|
1
|
+
import { contentBlocksPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const groupNavigationOptions = ['Continuous', 'Pagination', 'Sliders', 'Tabs'];
|
7
|
+
const groupDividerStyleOptions = ['Solid', 'Dotted', 'Dashed'];
|
8
|
+
|
9
|
+
describe('Style and layout customization section', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Style and layout customization section - content', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
contentBlocksPage.steps.navigateToCreateResource('content blocks');
|
18
|
+
});
|
19
|
+
|
20
|
+
it('\'Style and layout customization\' label and info icon should be displayed', () => {
|
21
|
+
utilities.verifyInnerText(contentBlocksPage.styleAndLayoutCustomizationLabel(), 'Style and layout customization');
|
22
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.styleAndLayoutCustomizationLabel(), 'visible');
|
23
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.styleAndLayoutCustomizationInfoIcon(), 'visible'); //info
|
24
|
+
});
|
25
|
+
|
26
|
+
it('\'Group navigation\' label should be displayed', () => {
|
27
|
+
utilities.verifyInnerText(contentBlocksPage.groupNavigationLabel(), 'Group navigation');
|
28
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.groupNavigationLabel(), 'visible');
|
29
|
+
});
|
30
|
+
|
31
|
+
it(`4 group navigation options ${groupNavigationOptions} should be displayed`, () => {
|
32
|
+
contentBlocksPage.steps.verifyGroupNavigationOptions(groupNavigationOptions);
|
33
|
+
});
|
34
|
+
|
35
|
+
it('By default \'Continuous\' group navigation should be selected', () => {
|
36
|
+
contentBlocksPage.steps.verifyGroupNavigationOptionSelected(0);
|
37
|
+
});
|
38
|
+
|
39
|
+
it('\'Group divider style\' label should be displayed', () => {
|
40
|
+
utilities.verifyInnerText(contentBlocksPage.groupDividerStyleLabel(), 'Group divider style');
|
41
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.groupDividerStyleLabel(), 'visible');
|
42
|
+
});
|
43
|
+
|
44
|
+
it(`3 group divider style options ${groupDividerStyleOptions} should be displayed`, () => {
|
45
|
+
contentBlocksPage.steps.verifyGroupDividerStyleOptions(groupDividerStyleOptions);
|
46
|
+
});
|
47
|
+
|
48
|
+
it('By default \'Solid\' group divider style should be selected', () => {
|
49
|
+
contentBlocksPage.steps.verifyGroupDividerStyleOptionSelected(0);
|
50
|
+
});
|
51
|
+
|
52
|
+
it('By default group navigation options and group divider style options should be displayed in disabled state', () => {
|
53
|
+
utilities.verifyElementDisabledClass(contentBlocksPage.groupNavigationOptionButton(0));
|
54
|
+
utilities.verifyElementDisabledClass(contentBlocksPage.groupDividerStyleOptionButton(0));
|
55
|
+
});
|
56
|
+
|
57
|
+
it('When user clicks on \'Add group divider\' and adds group divider then group navigation options and group divider style options should be displayed in enabled state', () => {
|
58
|
+
contentBlocksPage.steps.addGroupDivider();
|
59
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.groupDivider(), 'visible');
|
60
|
+
utilities.verifyElementNotDisabled(contentBlocksPage.groupNavigationOptionButton(0));
|
61
|
+
utilities.verifyElementNotDisabled(contentBlocksPage.groupDividerStyleOptionButton(0));
|
62
|
+
});
|
63
|
+
|
64
|
+
it('CSS of style and layout customization section', { tags: 'css' }, () => {
|
65
|
+
utilities.verifyCSS(contentBlocksPage.styleAndLayoutCustomizationLabel(), {
|
66
|
+
'color': css.color.sectionHeading,
|
67
|
+
'font-size': css.fontSize.default,
|
68
|
+
'font-weight': css.fontWeight.semibold
|
69
|
+
});
|
70
|
+
utilities.verifyCSS(contentBlocksPage.groupDividerStyleOptionButton(0).find('.ngie-toggle-button-label'), {
|
71
|
+
'color': css.color.activeButtons,
|
72
|
+
'font-size': css.fontSize.default,
|
73
|
+
'font-weight': css.fontWeight.regular
|
74
|
+
});
|
75
|
+
utilities.verifyCSS(contentBlocksPage.groupDividerStyleOptionButton(0), {
|
76
|
+
'border': `2px solid ${css.color.activeButtons}`
|
77
|
+
});
|
78
|
+
utilities.verifyCSS(contentBlocksPage.groupNavigationOptionButton(0).find('.ngie-toggle-button-label'), {
|
79
|
+
'color': css.color.primaryBtn,
|
80
|
+
'font-size': css.fontSize.normal,
|
81
|
+
'font-weight': css.fontWeight.bold
|
82
|
+
});
|
83
|
+
utilities.verifyCSS(contentBlocksPage.groupNavigationOptionButton(0), {
|
84
|
+
'background-color': css.color.activeButtons
|
85
|
+
});
|
86
|
+
utilities.verifyCSS(contentBlocksPage.groupDividerStyleOptionButton(1).find('.ngie-toggle-button-label'), {
|
87
|
+
'color': css.color.liText,
|
88
|
+
'font-size': css.fontSize.default,
|
89
|
+
'font-weight': css.fontWeight.regular
|
90
|
+
});
|
91
|
+
utilities.verifyCSS(contentBlocksPage.groupNavigationOptionButton(1).find('.ngie-toggle-button-label'), {
|
92
|
+
'color': css.color.liText,
|
93
|
+
'font-size': css.fontSize.normal,
|
94
|
+
'font-weight': css.fontWeight.bold
|
95
|
+
});
|
96
|
+
utilities.verifyCSS(contentBlocksPage.groupNavigationLabel(), {
|
97
|
+
'color': css.color.labels,
|
98
|
+
'font-size': css.fontSize.normal,
|
99
|
+
'font-weight': css.fontWeight.semibold
|
100
|
+
});
|
101
|
+
utilities.verifyCSS(contentBlocksPage.groupDividerStyleLabel(), {
|
102
|
+
'color': css.color.labels,
|
103
|
+
'font-size': css.fontSize.normal,
|
104
|
+
'font-weight': css.fontWeight.semibold
|
105
|
+
});
|
106
|
+
});
|
107
|
+
|
108
|
+
it('Accessibility of style and layout customization section', { tags: 'a11y' }, () => {
|
109
|
+
cy.checkAccessibility(contentBlocksPage.styleAndLayoutCustomizationLabel().parents('[class*="ContentBlocksstyles__StyleLayoutWrapper"]'));
|
110
|
+
});
|
111
|
+
});
|
112
|
+
|
113
|
+
describe('Style and layout customization section - Edit tab', () => {
|
114
|
+
abortEarlySetup();
|
115
|
+
before(() => {
|
116
|
+
contentBlocksPage.steps.navigateToCreateResource('content blocks');
|
117
|
+
contentBlocksPage.steps.addGroupDivider();
|
118
|
+
});
|
119
|
+
|
120
|
+
it(`When \'Continuous\' group navigation is selected, then group divider style label with 3 options ${groupDividerStyleOptions} should be displayed`, () => {
|
121
|
+
contentBlocksPage.steps.verifyGroupNavigationOptionSelected(0);
|
122
|
+
contentBlocksPage.steps.verifyGroupDividerStyleOptions(groupDividerStyleOptions);
|
123
|
+
});
|
124
|
+
|
125
|
+
it('\'Solid\' group divider style should be selected by default', () => {
|
126
|
+
contentBlocksPage.steps.verifyGroupDividerStyleOptionSelected(0);
|
127
|
+
});
|
128
|
+
|
129
|
+
it('When the user selects option from the \'Group divider style\' section then the selected option should change', () => {
|
130
|
+
contentBlocksPage.steps.selectGroupDividerStyleOption(1);
|
131
|
+
contentBlocksPage.steps.verifyGroupDividerStyleOptionSelected(1);
|
132
|
+
contentBlocksPage.steps.verifyGroupDividerStyleOptionUnselected(0);
|
133
|
+
});
|
134
|
+
|
135
|
+
it('User should be able to select \'Pagination\' group navigation', () => {
|
136
|
+
contentBlocksPage.steps.selectGroupNavigationOption(1);
|
137
|
+
contentBlocksPage.steps.verifyGroupNavigationOptionSelected(1);
|
138
|
+
contentBlocksPage.steps.verifyGroupNavigationOptionUnselected(0);
|
139
|
+
});
|
140
|
+
|
141
|
+
it('When \'Pagination\' group navigation is selected, then group divider style label and options should not be displayed', () => {
|
142
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.groupDividerStyleWrapper(), 'notExist');
|
143
|
+
});
|
144
|
+
|
145
|
+
it('User should be able to select \'Sliders\' group navigation', () => {
|
146
|
+
contentBlocksPage.steps.selectGroupNavigationOption(2);
|
147
|
+
contentBlocksPage.steps.verifyGroupNavigationOptionSelected(2);
|
148
|
+
contentBlocksPage.steps.verifyGroupNavigationOptionUnselected(1);
|
149
|
+
});
|
150
|
+
|
151
|
+
it('User should be able to select \'Tabs\' group navigation', () => {
|
152
|
+
contentBlocksPage.steps.selectGroupNavigationOption(3);
|
153
|
+
contentBlocksPage.steps.verifyGroupNavigationOptionSelected(3);
|
154
|
+
contentBlocksPage.steps.verifyGroupNavigationOptionUnselected(2);
|
155
|
+
});
|
156
|
+
|
157
|
+
it('When \'Tabs\' group navigation is selected, \'Tab prefix\' label and input field should be displayed', () => {
|
158
|
+
contentBlocksPage.steps.verifyGroupNavigationOptionSelected(3);
|
159
|
+
utilities.verifyInnerText(contentBlocksPage.tabsPrefixLabel(), 'Tab prefix');
|
160
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.tabsPrefixLabel(), 'visible');
|
161
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.tabsPrefixInputField(), 'visible');
|
162
|
+
});
|
163
|
+
|
164
|
+
it('By default \'Tab prefix\' input field should have \'Page\' text added', () => {
|
165
|
+
contentBlocksPage.steps.verifyTextInTabsPrefixInputField('Page');
|
166
|
+
});
|
167
|
+
|
168
|
+
it('User should be able to update text inside \'Tab prefix\' input field', () => {
|
169
|
+
contentBlocksPage.steps.enterTextInTabsPrefixInputField('Tab');
|
170
|
+
});
|
171
|
+
});
|
172
|
+
|
173
|
+
describe('Style and layout customization section - Preview tab', () => {
|
174
|
+
abortEarlySetup();
|
175
|
+
before(() => {
|
176
|
+
contentBlocksPage.steps.navigateToCreateResource('content blocks');
|
177
|
+
contentBlocksPage.steps.enterTextInTitleInputField('Accelerating Web Development with Efficient Testing Scripts');
|
178
|
+
contentBlocksPage.steps.enterTextInSubTitleInputField('Enhancing Code Quality and Reliability through Automated Testing');
|
179
|
+
contentBlocksPage.steps.enterTextInTextBlockInputField(0, 'By automating the testing process, developers can identify and address issues early in the development cycle, resulting in higher code quality and improved user experiences.');
|
180
|
+
contentBlocksPage.steps.addGroupDivider();
|
181
|
+
contentBlocksPage.steps.addSubTitle();
|
182
|
+
contentBlocksPage.steps.addTextBlock();
|
183
|
+
contentBlocksPage.steps.enterTextInBodySubTitleInputField(0, 'The Importance of Testing Scripts');
|
184
|
+
contentBlocksPage.steps.enterTextInTextBlockInputField(1, 'Testing scripts play a crucial role in the software development lifecycle by providing developers with a systematic approach to validate the functionality, performance, and security of their code.');
|
185
|
+
contentBlocksPage.steps.addGroupDivider();
|
186
|
+
contentBlocksPage.steps.addSubTitle();
|
187
|
+
contentBlocksPage.steps.addTextBlock();
|
188
|
+
contentBlocksPage.steps.enterTextInBodySubTitleInputField(1, 'Choosing the Right Testing Framework');
|
189
|
+
contentBlocksPage.steps.enterTextInTextBlockInputField(2, 'When it comes to selecting a testing framework for your web development projects, there are several factors to consider, including ease of use, compatibility with your technology stack, and community support.');
|
190
|
+
});
|
191
|
+
|
192
|
+
it('When \'Continuous\' group navigation is selected and user has added text to all input field, then added content should be displayed on the same page in preview tab', () => {
|
193
|
+
contentBlocksPage.steps.switchToPreviewTab();
|
194
|
+
contentBlocksPage.steps.verifyTitleTextPreviewTab('Accelerating Web Development with Efficient Testing Scripts');
|
195
|
+
contentBlocksPage.steps.verifySubTitleTextPreviewTab('Enhancing Code Quality and Reliability through Automated Testing');
|
196
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(0, 'By automating the testing process, developers can identify and address issues early in the development cycle, resulting in higher code quality and improved user experiences.');
|
197
|
+
contentBlocksPage.steps.verifyGroupDividerPreviewTab(0);
|
198
|
+
contentBlocksPage.steps.verifyBodySubTitleTextPreviewTab(0, 'The Importance of Testing Scripts');
|
199
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(1, 'Testing scripts play a crucial role in the software development lifecycle by providing developers with a systematic approach to validate the functionality, performance, and security of their code.');
|
200
|
+
contentBlocksPage.steps.verifyGroupDividerPreviewTab(1);
|
201
|
+
contentBlocksPage.steps.verifyBodySubTitleTextPreviewTab(1, 'Choosing the Right Testing Framework');
|
202
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(2, 'When it comes to selecting a testing framework for your web development projects, there are several factors to consider, including ease of use, compatibility with your technology stack, and community support.');
|
203
|
+
});
|
204
|
+
|
205
|
+
it('Pagination text, sliders, tab list, Next button, previous button should not be displayed', () => {
|
206
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.paginationText(), 'notExist');
|
207
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.slidersWrapper(), 'notExist');
|
208
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.tabListBoxWrapper(), 'notExist');
|
209
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.nextPageButton(), 'notExist');
|
210
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.previousPageButton(), 'notExist');
|
211
|
+
});
|
212
|
+
|
213
|
+
it('When \'Solid\' group divider style is selected in edit tab, then solid group divider should be displayed in preview tab', () => {
|
214
|
+
contentBlocksPage.steps.verifyGroupDividerStylePreviewTab(0, 'solid');
|
215
|
+
contentBlocksPage.steps.verifyGroupDividerStylePreviewTab(1, 'solid');
|
216
|
+
});
|
217
|
+
|
218
|
+
it('When user selects \'Dotted\' group divider style in edit tab, then dotted group divider should be displayed in preview tab', () => {
|
219
|
+
contentBlocksPage.steps.switchToEditTab();
|
220
|
+
contentBlocksPage.steps.selectGroupDividerStyleOption(1);
|
221
|
+
contentBlocksPage.steps.switchToPreviewTab();
|
222
|
+
contentBlocksPage.steps.verifyGroupDividerStylePreviewTab(0, 'dotted');
|
223
|
+
contentBlocksPage.steps.verifyGroupDividerStylePreviewTab(1, 'dotted');
|
224
|
+
});
|
225
|
+
|
226
|
+
it('When user selects \'Dashed\' group divider style in edit tab, then dashed group divider should be displayed in preview tab', () => {
|
227
|
+
contentBlocksPage.steps.switchToEditTab();
|
228
|
+
contentBlocksPage.steps.selectGroupDividerStyleOption(2);
|
229
|
+
contentBlocksPage.steps.switchToPreviewTab();
|
230
|
+
contentBlocksPage.steps.verifyGroupDividerStylePreviewTab(0, 'dashed');
|
231
|
+
contentBlocksPage.steps.verifyGroupDividerStylePreviewTab(1, 'dashed');
|
232
|
+
});
|
233
|
+
|
234
|
+
it('When user selects \'Pagination\' group navigation in edit tab, then added content should get divided into pages after every group divider', () => {
|
235
|
+
contentBlocksPage.steps.switchToEditTab();
|
236
|
+
contentBlocksPage.steps.selectGroupNavigationOption(1);
|
237
|
+
contentBlocksPage.steps.switchToPreviewTab();
|
238
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.nextPageButton(), 'visible');
|
239
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.previousPageButton(), 'visible');
|
240
|
+
contentBlocksPage.steps.verifyPaginationTextPreviewTab(1, 3);
|
241
|
+
});
|
242
|
+
|
243
|
+
it('Sliders and tab list button should not be displayed', () => {
|
244
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.slidersWrapper(), 'notExist');
|
245
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.tabListBoxWrapper(), 'notExist');
|
246
|
+
});
|
247
|
+
|
248
|
+
it('When the user is on the first page, the next button should be enabled and the previous button should be disabled', () => {
|
249
|
+
utilities.verifyElementDisabled(contentBlocksPage.previousPageButton());
|
250
|
+
utilities.verifyElementNotDisabled(contentBlocksPage.nextPageButton());
|
251
|
+
});
|
252
|
+
|
253
|
+
it('When user navigates through the pages then Pagination text should change accordingly', () => {
|
254
|
+
contentBlocksPage.steps.verifyTitleTextPreviewTab('Accelerating Web Development with Efficient Testing Scripts');
|
255
|
+
contentBlocksPage.steps.verifySubTitleTextPreviewTab('Enhancing Code Quality and Reliability through Automated Testing');
|
256
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(0, 'By automating the testing process, developers can identify and address issues early in the development cycle, resulting in higher code quality and improved user experiences.');
|
257
|
+
contentBlocksPage.steps.verifyPaginationTextPreviewTab(1, 3);
|
258
|
+
cy.log('Switching to second page');
|
259
|
+
contentBlocksPage.steps.navigateToNextPage();
|
260
|
+
contentBlocksPage.steps.verifyTitleTextPreviewTab('Accelerating Web Development with Efficient Testing Scripts');
|
261
|
+
contentBlocksPage.steps.verifySubTitleTextPreviewTab('Enhancing Code Quality and Reliability through Automated Testing');
|
262
|
+
contentBlocksPage.steps.verifyBodySubTitleTextPreviewTab(0, 'The Importance of Testing Scripts');
|
263
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(0, 'Testing scripts play a crucial role in the software development lifecycle by providing developers with a systematic approach to validate the functionality, performance, and security of their code.');
|
264
|
+
contentBlocksPage.steps.verifyPaginationTextPreviewTab(2, 3);
|
265
|
+
cy.log('Switching to third page');
|
266
|
+
contentBlocksPage.steps.navigateToNextPage();
|
267
|
+
contentBlocksPage.steps.verifyTitleTextPreviewTab('Accelerating Web Development with Efficient Testing Scripts');
|
268
|
+
contentBlocksPage.steps.verifySubTitleTextPreviewTab('Enhancing Code Quality and Reliability through Automated Testing');
|
269
|
+
contentBlocksPage.steps.verifyBodySubTitleTextPreviewTab(0, 'Choosing the Right Testing Framework');
|
270
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(0, 'When it comes to selecting a testing framework for your web development projects, there are several factors to consider, including ease of use, compatibility with your technology stack, and community support.');
|
271
|
+
contentBlocksPage.steps.verifyPaginationTextPreviewTab(3, 3);
|
272
|
+
});
|
273
|
+
|
274
|
+
it('When the user is on the last page, then previous button should be enabled and the next button should be disabled', () => {
|
275
|
+
utilities.verifyElementDisabled(contentBlocksPage.nextPageButton());
|
276
|
+
utilities.verifyElementNotDisabled(contentBlocksPage.previousPageButton());
|
277
|
+
});
|
278
|
+
|
279
|
+
it('When the user is on the intermediate page then the \'Previous\' and \'Next\' button should be in enabled state', () => {
|
280
|
+
contentBlocksPage.steps.navigateToPreviousPage();
|
281
|
+
utilities.verifyElementNotDisabled(contentBlocksPage.nextPageButton());
|
282
|
+
utilities.verifyElementNotDisabled(contentBlocksPage.previousPageButton());
|
283
|
+
});
|
284
|
+
|
285
|
+
it('When the user hovers over the enabled \'Previous\' icon button then, \'Previous page\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Previous\' icon button', () => {
|
286
|
+
contentBlocksPage.previousPageButton()
|
287
|
+
.verifyTooltip('Previous Page');
|
288
|
+
});
|
289
|
+
|
290
|
+
it('When the user hovers over the enabled \'Next\' icon button then, \'Next page\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Next\' icon button', () => {
|
291
|
+
contentBlocksPage.nextPageButton()
|
292
|
+
.verifyTooltip('Next Page');
|
293
|
+
});
|
294
|
+
|
295
|
+
it('When user selects \'Sliders\' group navigation in edit tab, then added content should get divided into slides after every group divider', () => {
|
296
|
+
contentBlocksPage.steps.switchToEditTab();
|
297
|
+
contentBlocksPage.steps.selectGroupNavigationOption(2);
|
298
|
+
contentBlocksPage.steps.switchToPreviewTab();
|
299
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.slidersWrapper(), 'visible');
|
300
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.nextPageButton(), 'visible');
|
301
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.previousPageButton(), 'visible');
|
302
|
+
utilities.verifyElementCount(contentBlocksPage.sliderButtonPreviewTab(), 3);
|
303
|
+
});
|
304
|
+
|
305
|
+
it('Pagination text and tab list should not be displayed', () => {
|
306
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.paginationText(), 'notExist');
|
307
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.tabListBoxWrapper(), 'notExist');
|
308
|
+
});
|
309
|
+
|
310
|
+
it('When the user is on the first page, the next button should be enabled and the previous button should be disabled', () => {
|
311
|
+
utilities.verifyElementDisabled(contentBlocksPage.previousPageButton());
|
312
|
+
utilities.verifyElementNotDisabled(contentBlocksPage.nextPageButton());
|
313
|
+
});
|
314
|
+
|
315
|
+
it('When user navigates through the slides then content should change accordingly', () => {
|
316
|
+
contentBlocksPage.steps.verifyTitleTextPreviewTab('Accelerating Web Development with Efficient Testing Scripts');
|
317
|
+
contentBlocksPage.steps.verifySubTitleTextPreviewTab('Enhancing Code Quality and Reliability through Automated Testing');
|
318
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(0, 'By automating the testing process, developers can identify and address issues early in the development cycle, resulting in higher code quality and improved user experiences.');
|
319
|
+
contentBlocksPage.steps.verifyActiveSlide(0);
|
320
|
+
cy.log('Switching to second page');
|
321
|
+
contentBlocksPage.steps.navigateToSlide(1);
|
322
|
+
contentBlocksPage.steps.verifyTitleTextPreviewTab('Accelerating Web Development with Efficient Testing Scripts');
|
323
|
+
contentBlocksPage.steps.verifySubTitleTextPreviewTab('Enhancing Code Quality and Reliability through Automated Testing');
|
324
|
+
contentBlocksPage.steps.verifyBodySubTitleTextPreviewTab(0, 'The Importance of Testing Scripts');
|
325
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(0, 'Testing scripts play a crucial role in the software development lifecycle by providing developers with a systematic approach to validate the functionality, performance, and security of their code.');
|
326
|
+
contentBlocksPage.steps.verifyActiveSlide(1);
|
327
|
+
cy.log('Switching to third page');
|
328
|
+
contentBlocksPage.steps.navigateToSlide(2);
|
329
|
+
contentBlocksPage.steps.verifyTitleTextPreviewTab('Accelerating Web Development with Efficient Testing Scripts');
|
330
|
+
contentBlocksPage.steps.verifySubTitleTextPreviewTab('Enhancing Code Quality and Reliability through Automated Testing');
|
331
|
+
contentBlocksPage.steps.verifyBodySubTitleTextPreviewTab(0, 'Choosing the Right Testing Framework');
|
332
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(0, 'When it comes to selecting a testing framework for your web development projects, there are several factors to consider, including ease of use, compatibility with your technology stack, and community support.');
|
333
|
+
contentBlocksPage.steps.verifyActiveSlide(2);
|
334
|
+
});
|
335
|
+
|
336
|
+
it('When the user is on the last slide, the previous button should be enabled and the next button should be disabled', () => {
|
337
|
+
utilities.verifyElementDisabled(contentBlocksPage.nextPageButton());
|
338
|
+
utilities.verifyElementNotDisabled(contentBlocksPage.previousPageButton());
|
339
|
+
});
|
340
|
+
|
341
|
+
it('When the user is on the intermediate slide then the \'Previous\' and \'Next\' button should be in enabled state', () => {
|
342
|
+
contentBlocksPage.steps.navigateToSlide(1);
|
343
|
+
utilities.verifyElementNotDisabled(contentBlocksPage.nextPageButton());
|
344
|
+
utilities.verifyElementNotDisabled(contentBlocksPage.previousPageButton());
|
345
|
+
});
|
346
|
+
|
347
|
+
it('When user selects \'Tabs\' group navigation and tab prefix input field has \'Page\' text added in edit tab, then added content should get divided into tabs after every group divider and tab list with 3 labels \'Page 1\', \'Page 2\' and \'Page 3\' in preview tab', () => {
|
348
|
+
contentBlocksPage.steps.switchToEditTab();
|
349
|
+
contentBlocksPage.steps.selectGroupNavigationOption(3);
|
350
|
+
contentBlocksPage.steps.verifyTextInTabsPrefixInputField('Page');
|
351
|
+
contentBlocksPage.steps.switchToPreviewTab();
|
352
|
+
utilities.verifyElementCount(contentBlocksPage.tabListButton(), 3);
|
353
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.tabListBoxWrapper(), 'visible');
|
354
|
+
contentBlocksPage.steps.verifyTabListButtonLabel(3, 'Page');
|
355
|
+
});
|
356
|
+
|
357
|
+
it('Pagination text, sliders, next button, previous button should not be displayed', () => {
|
358
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.paginationText(), 'notExist');
|
359
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.slidersWrapper(), 'notExist');
|
360
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.nextPageButton(), 'notExist');
|
361
|
+
utilities.verifyElementVisibilityState(contentBlocksPage.previousPageButton(), 'notExist');
|
362
|
+
});
|
363
|
+
|
364
|
+
it('When user navigates through the tabs then content should change accordingly', () => {
|
365
|
+
contentBlocksPage.steps.verifyTitleTextPreviewTab('Accelerating Web Development with Efficient Testing Scripts');
|
366
|
+
contentBlocksPage.steps.verifySubTitleTextPreviewTab('Enhancing Code Quality and Reliability through Automated Testing');
|
367
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(0, 'By automating the testing process, developers can identify and address issues early in the development cycle, resulting in higher code quality and improved user experiences.');
|
368
|
+
contentBlocksPage.steps.verifyActiveTab(0);
|
369
|
+
cy.log('Switching to second page');
|
370
|
+
contentBlocksPage.steps.navigateToTab(1);
|
371
|
+
contentBlocksPage.steps.verifyTitleTextPreviewTab('Accelerating Web Development with Efficient Testing Scripts');
|
372
|
+
contentBlocksPage.steps.verifySubTitleTextPreviewTab('Enhancing Code Quality and Reliability through Automated Testing');
|
373
|
+
contentBlocksPage.steps.verifyBodySubTitleTextPreviewTab(0, 'The Importance of Testing Scripts');
|
374
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(0, 'Testing scripts play a crucial role in the software development lifecycle by providing developers with a systematic approach to validate the functionality, performance, and security of their code.');
|
375
|
+
contentBlocksPage.steps.verifyActiveTab(1);
|
376
|
+
cy.log('Switching to third page');
|
377
|
+
contentBlocksPage.steps.navigateToTab(2);
|
378
|
+
contentBlocksPage.steps.verifyTitleTextPreviewTab('Accelerating Web Development with Efficient Testing Scripts');
|
379
|
+
contentBlocksPage.steps.verifySubTitleTextPreviewTab('Enhancing Code Quality and Reliability through Automated Testing');
|
380
|
+
contentBlocksPage.steps.verifyBodySubTitleTextPreviewTab(0, 'Choosing the Right Testing Framework');
|
381
|
+
contentBlocksPage.steps.verifyTextBlockTextPreviewTab(0, 'When it comes to selecting a testing framework for your web development projects, there are several factors to consider, including ease of use, compatibility with your technology stack, and community support.');
|
382
|
+
contentBlocksPage.steps.verifyActiveTab(2);
|
383
|
+
});
|
384
|
+
|
385
|
+
it('When user updates text in Tab prefix input field, then tab list options should be updated in preview tab', () => {
|
386
|
+
contentBlocksPage.steps.switchToEditTab();
|
387
|
+
contentBlocksPage.steps.enterTextInTabsPrefixInputField('Tab');
|
388
|
+
contentBlocksPage.steps.switchToPreviewTab();
|
389
|
+
contentBlocksPage.steps.verifyTabListButtonLabel(3, 'Tab');
|
390
|
+
});
|
391
|
+
});
|
392
|
+
});
|
@@ -213,7 +213,7 @@ describe('Drawing response - Additional settings', () => {
|
|
213
213
|
});
|
214
214
|
|
215
215
|
it('When all line type buttons are selected by default then all the line type options should be displayed in secondary toolbar in the preview tab', () => {
|
216
|
-
drawingResponsePage.steps.selectPreviewTabSecondaryToolbarOption('Line
|
216
|
+
drawingResponsePage.steps.selectPreviewTabSecondaryToolbarOption('Line Type');
|
217
217
|
lineTypeOptionsPreviewTab.forEach((lineType, index) => {
|
218
218
|
drawingResponsePage.steps.verifySecondaryPopupLineType(lineType, index)
|
219
219
|
});
|
@@ -3,7 +3,7 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
|
5
5
|
const css = Cypress.env('css');
|
6
|
-
const defaultToolbarAndControlOptions = ['Select', 'Scribble', 'Line', 'Curved line', 'Capture image', 'Insert image', 'Text', 'Point eraser', '
|
6
|
+
const defaultToolbarAndControlOptions = ['Select', 'Scribble', 'Line', 'Curved line', 'Capture image', 'Insert image', 'Text', 'Point eraser', 'bring to front', 'send to back', 'Duplicate', 'Undo', 'Redo', 'Full screen', 'Clear all'];
|
7
7
|
const patterns = ['Grid', 'Lines', 'Dots', 'Circular', 'Graph', 'Quadrant'];
|
8
8
|
const orientationOptions = ['Portrait', 'Landscape', 'Square'];
|
9
9
|
const imageAlternativeText = ['Grid pattern of evenly spaced horizontal and vertical lines', 'Line pattern of evenly spaced horizontal lines', 'Dot pattern of evenly spaced horizontal and vertical dots', 'Circular pattern of evenly spaced concentric circles', 'Graph pattern of evenly spaced horizontal and vertical lines', 'Quadrant pattern of evenly spaced horizontal and vertical lines'];
|
@@ -24,6 +24,7 @@ describe('Create item page - Drawing response: Customize special characters, Cus
|
|
24
24
|
cy.barsPreLoaderWait();
|
25
25
|
drawingResponsePage.steps.expandCustomizeToolbarOptionsAndControlsAccordion();
|
26
26
|
drawingResponsePage.steps.selectOptionsTiles([`${drawingToolbarOptionsAndAdditionalOptions.additionalOptions[0]}`]);
|
27
|
+
drawingResponsePage.steps.checkCustomizeSpecialCharactersCheckbox();
|
27
28
|
});
|
28
29
|
|
29
30
|
drawingResponsePage.tests.verifyCustomSpecialCharactersEditTabContent();
|
@@ -33,7 +34,7 @@ describe('Create item page - Drawing response: Customize special characters, Cus
|
|
33
34
|
drawingResponsePage.steps.switchToPreviewTab();
|
34
35
|
drawingResponsePage.steps.selectPreviewTabToolbarOption('Text');
|
35
36
|
drawingResponsePage.steps.selectPreviewTabSecondaryToolbarOption('Special characters');
|
36
|
-
|
37
|
+
drawingResponsePage.steps.verifySpecialCharactersPopupCategorySymbols(specialCharacters);
|
37
38
|
//Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
|
38
39
|
cy.log('Post-step: Switching to edit tab');
|
39
40
|
drawingResponsePage.steps.switchToEditTab();
|
@@ -6,7 +6,8 @@ let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view']
|
|
6
6
|
const views = utilities.getViews(gradingAndCorrectAnsView);
|
7
7
|
var itemReferenceID = "";
|
8
8
|
|
9
|
-
|
9
|
+
//TODO- Update https://redmine.zeuslearning.com/issues/563177
|
10
|
+
const defaultToolbarAndControlOptions = ['Select', 'Scribble', 'Line', 'Curved line', 'Capture image', 'Insert image', 'Text', 'Point eraser', 'bring to front', 'send to back', 'Duplicate', 'Undo', 'Redo', 'Full screen', 'Clear all'];
|
10
11
|
|
11
12
|
describe('Create item page - Drawing response: Grading view, Correct answer view contents', () => {
|
12
13
|
before(() => {
|
@@ -119,6 +119,7 @@ describe('Essay response: Customize math characters', () => {
|
|
119
119
|
cy.barsPreLoaderWait();
|
120
120
|
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
121
121
|
essayResponsePage.steps.selectCustomizedFormattingOption(['Special Characters'])
|
122
|
+
essayResponsePage.steps.checkCustomizeSpecialCharactersCheckbox();
|
122
123
|
});
|
123
124
|
|
124
125
|
essayResponsePage.tests.verifyCustomSpecialCharactersEditTabContent();
|
@@ -0,0 +1,152 @@
|
|
1
|
+
import { fillInTheGapsDragAndDropPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
|
5
|
+
describe('Create item page - Fill in the gaps with drag and drop: All or nothing with grouped options layout', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Auto scored - All or nothing scoring for grouped options', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
14
|
+
cy.barsPreLoaderWait();
|
15
|
+
fillInTheGapsDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
|
16
|
+
fillInTheGapsDragAndDropPage.steps.addResponseArea();
|
17
|
+
fillInTheGapsDragAndDropPage.steps.setGroupedOptions();
|
18
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0, 'Leaves': 1, 'Stem': 2 });
|
19
|
+
fillInTheGapsDragAndDropPage.steps.allotPoints(20);
|
20
|
+
fillInTheGapsDragAndDropPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
21
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
22
|
+
});
|
23
|
+
|
24
|
+
it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
|
25
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
26
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
27
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
28
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneNumeration();
|
29
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.correctAnswersLabel(), 'Correct answers');
|
30
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
|
31
|
+
});
|
32
|
+
|
33
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
34
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 0, 'Petals': 1, 'Branch': 2 });
|
35
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
36
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
37
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
38
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
39
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
40
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
41
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
|
42
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
43
|
+
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon should be displayed besides the dropzone, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
44
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
45
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
46
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
47
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
48
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
49
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
50
|
+
});
|
51
|
+
|
52
|
+
it('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
53
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
54
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Branch': 2 });
|
55
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
56
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
57
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
58
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
59
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
60
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
|
61
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
62
|
+
cy.log('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options and clicks on \'Check answer\' button, then incorrect icon should be displayed besides the dropzone incorrect response and correct icon should be displayed beside the correct response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
63
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
64
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
65
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
66
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
67
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
68
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When the user attempts the question partially correct with all the dropzone correctly attempted but one dropzone incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
72
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
73
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 1, 'Stem': 2 })
|
74
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
75
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
76
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
77
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
78
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
79
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
80
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
|
81
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
82
|
+
cy.log('When the user attempts the question partially correct with all the dropzone correctly attempted but one dropzone incomplete and clicks on \'Check answer\' button, then no icon should be displayed besides the incomplete and correct icon should be displayed beside the correct response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
83
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
84
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
85
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
86
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
87
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
88
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
89
|
+
});
|
90
|
+
|
91
|
+
it('When the user attempts the question partially correct with all the dropzone correctly attempted but with an extra option which is not set as correct answer, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed along with numeration', () => {
|
92
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
93
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Leaves': 1, 'Branch': 1, 'Stem': 2 });
|
94
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
95
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
96
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
97
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
98
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
99
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
100
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
|
101
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
102
|
+
cy.log('When the user attempts the question partially correct with all the dropzone correctly attempted but with an extra option which is not set as correct answer and clicks on \'Check answer\' button, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
103
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
104
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
105
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
106
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
107
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
108
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
109
|
+
});
|
110
|
+
|
111
|
+
it('When the user attempts question with the common option from another group then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed along with numeration', () => {
|
112
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
113
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionFromNthGroupInDropzonePreviewTab([{ responseText: 'Petals', groupIndex: 3, dropzoneIndex: 0 }]);
|
114
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 1, 'Stem': 2 });
|
115
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
116
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
117
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
118
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
119
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
120
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
|
121
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
122
|
+
cy.log('When the user attempts the question with the common option from another group then the user should be awarded and clicks on \'Check answer\' button, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
123
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
124
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
125
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
126
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
127
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
128
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
129
|
+
});
|
130
|
+
|
131
|
+
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
132
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
133
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Leaves': 1, 'Stem': 2 });
|
134
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(20, 20);
|
135
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
136
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
137
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
138
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
139
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
140
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
141
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
142
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
143
|
+
cy.log('When user attempts the question correctly and clicks on \'Check answer\' button, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
144
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
145
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
146
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
147
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
148
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
149
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
150
|
+
});
|
151
|
+
});
|
152
|
+
});
|