itemengine-cypress-automation 1.0.129 → 1.0.131-smokeTestFixes6March-aa053ff.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +2 -4
- package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +2 -4
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +3 -7
- 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/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
- 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/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/fixtures/theme/ilc.json +6 -1
- package/cypress/fixtures/uploadResponseFileType.js +5 -0
- package/cypress/pages/audioResponsePage.js +1 -1
- 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/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,249 @@
|
|
1
|
+
import { specialCharacters } from "../../../fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters";
|
2
|
+
import { dialogBoxBase, fillInTheGapsTextPage } from "../../../pages";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
|
7
|
+
const specialCharactersCategories = Object.values(specialCharacters.map((icon) => icon.categoryName));
|
8
|
+
const customSpecialCharacters = ['A', '1', '#'];
|
9
|
+
|
10
|
+
describe('Create item page - Fill in the gaps with text - Special characters section', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
describe('Special characters section - edit tab', () => {
|
16
|
+
const newSelectedCategoryList = specialCharacters.slice(1);
|
17
|
+
abortEarlySetup();
|
18
|
+
before(() => {
|
19
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
20
|
+
cy.barsPreLoaderWait();
|
21
|
+
});
|
22
|
+
|
23
|
+
fillInTheGapsTextPage.tests.verifyEnableSpecialCharactersCheckboxDefaultState();
|
24
|
+
|
25
|
+
it('The user should be able to check the enable special characters checkbox', () => {
|
26
|
+
fillInTheGapsTextPage.steps.checkEnableSpecialCharactersCheckbox();
|
27
|
+
})
|
28
|
+
|
29
|
+
fillInTheGapsTextPage.tests.verifyCustomSpecialCharactersEditTabContent();
|
30
|
+
|
31
|
+
fillInTheGapsTextPage.tests.verifyShowOnlyCustomSpecialCharactersEditTabContent();
|
32
|
+
|
33
|
+
it('When the user specifies custom special characters, then on clicking on the \'Preview\' hyperlink, only the specified custom special characters should be displayed in the popup', () => {
|
34
|
+
fillInTheGapsTextPage.steps.addInputToCustomSpecialCharactersInputField(`${customSpecialCharacters.join('')}`);
|
35
|
+
fillInTheGapsTextPage.steps.clickOnCustomizeSpecialCharactersPreviewButton();
|
36
|
+
fillInTheGapsTextPage.steps.verifyCustomSpecialCharactersDisplayedInPreviewPopupEditTab(customSpecialCharacters);
|
37
|
+
cy.log('Post-step: Closing preview popup')
|
38
|
+
dialogBoxBase.steps.closeWarningPopup();
|
39
|
+
});
|
40
|
+
|
41
|
+
it('CSS of special characters section', { tags: 'css' }, () => {
|
42
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharactersLabel(), {
|
43
|
+
'color': css.color.labels,
|
44
|
+
'font-size': css.fontSize.default,
|
45
|
+
'font-weight': css.fontWeight.semibold
|
46
|
+
});
|
47
|
+
//checked state of enable special characters checkbox
|
48
|
+
utilities.verifyCSS(fillInTheGapsTextPage.enableSpecialCharactersCheckbox().find('rect').eq(1), {
|
49
|
+
'fill': css.color.activeButtons
|
50
|
+
});
|
51
|
+
utilities.verifyCSS(fillInTheGapsTextPage.groupByLanguageLabel(), {
|
52
|
+
'color': css.color.labels,
|
53
|
+
'font-size': css.fontSize.normal,
|
54
|
+
'font-weight': css.fontWeight.regular
|
55
|
+
});
|
56
|
+
//selected state of radio button
|
57
|
+
utilities.verifyCSS(fillInTheGapsTextPage.showOnlyCustomSpecialCharactersRadioButton().find('svg'), {
|
58
|
+
'fill': css.color.activeButtons
|
59
|
+
});
|
60
|
+
utilities.verifyCSS(fillInTheGapsTextPage.customSpecialCharactersLabel(), {
|
61
|
+
'color': css.color.labels,
|
62
|
+
'font-size': css.fontSize.normal,
|
63
|
+
'font-weight': css.fontWeight.semibold
|
64
|
+
});
|
65
|
+
utilities.verifyCSS(fillInTheGapsTextPage.customSpecialCharactersInputField(), {
|
66
|
+
'color': css.color.text,
|
67
|
+
'font-size': css.fontSize.default,
|
68
|
+
'font-weight': css.fontWeight.regular
|
69
|
+
});
|
70
|
+
utilities.verifyCSS(fillInTheGapsTextPage.customSpecialCharactersInputField().find('fieldset'), {
|
71
|
+
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
72
|
+
});
|
73
|
+
utilities.verifyCSS(fillInTheGapsTextPage.customizeSpecialCharactersPreviewButton(), {
|
74
|
+
'color': css.color.activeButtons,
|
75
|
+
'font-size': css.fontSize.normal,
|
76
|
+
'font-weight': css.fontWeight.regular
|
77
|
+
});
|
78
|
+
cy.log('Selecting group by language radio button');
|
79
|
+
fillInTheGapsTextPage.steps.selectGroupByLanguageRadioButton();
|
80
|
+
utilities.verifyCSS(fillInTheGapsTextPage.selectSpecialCharacterLanguagesLabel(), {
|
81
|
+
'color': css.color.labels,
|
82
|
+
'font-size': css.fontSize.normal,
|
83
|
+
'font-weight': css.fontWeight.semibold
|
84
|
+
});
|
85
|
+
//Category tiles in selected state
|
86
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharacterTileIcon().eq(1).find('svg'), {
|
87
|
+
'fill': css.color.defaultBackground
|
88
|
+
});
|
89
|
+
utilities.verifyCSS(fillInTheGapsTextPage.TickIcon().last().find('path[data-name*="Rectangle"]'), {
|
90
|
+
'fill': css.color.defaultBackground
|
91
|
+
});
|
92
|
+
utilities.verifyCSS(fillInTheGapsTextPage.TickIcon().last().find('path[data-name*="feather-check"]'), {
|
93
|
+
'fill': css.color.activeButtons
|
94
|
+
});
|
95
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(1).find('path'), {
|
96
|
+
'fill': css.color.activeButtons
|
97
|
+
});
|
98
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(1).parent(), {
|
99
|
+
'background-color': css.color.defaultBackground
|
100
|
+
});
|
101
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharacterTileCategoryName().eq(1), {
|
102
|
+
'color': css.color.whiteText,
|
103
|
+
'font-size': css.fontSize.small,
|
104
|
+
'font-weight': css.fontWeight.regular
|
105
|
+
});
|
106
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharacterTiles().eq(1), {
|
107
|
+
'background-color': css.color.primaryBtnBg
|
108
|
+
});
|
109
|
+
//Category tiles in de-selected state
|
110
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharacterTileIcon().eq(0).find('svg'), {
|
111
|
+
'fill': css.color.secondaryBtn
|
112
|
+
});
|
113
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).parent(), {
|
114
|
+
'fill': css.color.secondaryBtn
|
115
|
+
});
|
116
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).parent(), {
|
117
|
+
'fill': css.color.defaultBackground
|
118
|
+
});
|
119
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharacterTileCategoryName().eq(0), {
|
120
|
+
'color': css.color.secondaryBtn,
|
121
|
+
'font-size': css.fontSize.small,
|
122
|
+
'font-weight': css.fontWeight.regular
|
123
|
+
});
|
124
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharacterTiles().eq(0), {
|
125
|
+
'background-color': css.color.defaultBackground
|
126
|
+
});
|
127
|
+
cy.log('Opening preview popup and expanding one category accordion');
|
128
|
+
fillInTheGapsTextPage.steps.clickOnCustomizeSpecialCharactersPreviewButton();
|
129
|
+
fillInTheGapsTextPage.steps.clickOnSpecialCharactersPreviewPopupCategoryAccordionExpandIcon(0);
|
130
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
131
|
+
'color': css.color.flyoutTitle,
|
132
|
+
'font-size': css.fontSize.heading,
|
133
|
+
'font-weight': css.fontWeight.bold
|
134
|
+
});
|
135
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharactersPreviewPopupCategoryLabel().eq(0), {
|
136
|
+
'color': css.color.accordionLabel,
|
137
|
+
'font-size': css.fontSize.normal,
|
138
|
+
'font-weight': css.fontWeight.semibold
|
139
|
+
});
|
140
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharactersPreviewPopupCategoryAccordionExpandIcon().last().find('svg'), {
|
141
|
+
'fill': css.color.activeButtons
|
142
|
+
});
|
143
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharactersPreviewPopupSymbol().eq(0).find('svg'), {
|
144
|
+
'fill': css.color.defaultBackground
|
145
|
+
});
|
146
|
+
});
|
147
|
+
|
148
|
+
it('Accessibility of Customize special characters', { tags: 'a11y' }, () => {
|
149
|
+
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
150
|
+
cy.log('Closing preview popup');
|
151
|
+
dialogBoxBase.steps.closeWarningPopup();
|
152
|
+
cy.checkAccessibility(fillInTheGapsTextPage.specialCharactersLabel().parent());
|
153
|
+
cy.log('Selecting show only custom special characters radio button');
|
154
|
+
fillInTheGapsTextPage.steps.selectShowOnlyCustomSpecialCharactersRadioButton();
|
155
|
+
cy.checkAccessibility(fillInTheGapsTextPage.specialCharactersLabel().parent());
|
156
|
+
});
|
157
|
+
});
|
158
|
+
|
159
|
+
describe('Special characters section - preview tab', () => {
|
160
|
+
const newSelectedCategoryList = specialCharacters.slice(1);
|
161
|
+
abortEarlySetup();
|
162
|
+
before(() => {
|
163
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
164
|
+
cy.barsPreLoaderWait();
|
165
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
166
|
+
});
|
167
|
+
|
168
|
+
it('When \'Enable special characters\' checkbox is unchecked and user focuses on the preview tab response field, then \'Special characters\' button should not be displayed', () => {
|
169
|
+
fillInTheGapsTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
170
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.specialCharactersButtonPreviewTab(), 'notExist');
|
171
|
+
});
|
172
|
+
|
173
|
+
it('When \'Enable special characters\' checkbox is checked and user focuses on the preview tab response field, then \'Special characters\' button should be displayed', () => {
|
174
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
175
|
+
fillInTheGapsTextPage.steps.checkEnableSpecialCharactersCheckbox();
|
176
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
177
|
+
fillInTheGapsTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
178
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.specialCharactersButtonPreviewTab(), 'visible');
|
179
|
+
utilities.verifyInnerText(fillInTheGapsTextPage.specialCharactersButtonPreviewTab(), 'é');
|
180
|
+
utilities.verifyElementCount(fillInTheGapsTextPage.specialCharactersButtonPreviewTab(), '1');
|
181
|
+
});
|
182
|
+
|
183
|
+
it('When user clicks on response area special characters button, then special characters popup should be displayed with its default contents and all category accordions should be in collapsed state', () => {
|
184
|
+
fillInTheGapsTextPage.steps.openSpecialCharactersPopupPreviewTab();
|
185
|
+
//Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
|
186
|
+
//fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersPopupCategorySymbols(specialCharacters);
|
187
|
+
});
|
188
|
+
|
189
|
+
it('When user clicks on the \'Close\' button then the \'Special characters\' popup should be closed', () => {
|
190
|
+
fillInTheGapsTextPage.steps.closeSpecialCharactersPopupPreviewTab();
|
191
|
+
utilities.verifyElementVisibilityState(fillInTheGapsTextPage.specialCharactersPopupTitlePreviewTab(), 'notExist');
|
192
|
+
});
|
193
|
+
|
194
|
+
it('When the user has deselected any language option and opens the special characters popup in the preview tab, then the popup contents should get updated accordingly', () => {
|
195
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
196
|
+
fillInTheGapsTextPage.steps.clickOnSpecialCharactersCategoryTile(specialCharacters[0].categoryName);
|
197
|
+
fillInTheGapsTextPage.steps.verifySpecialCharacterCategoryTileIsNotSelected(specialCharacters[0].categoryName);
|
198
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
199
|
+
fillInTheGapsTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
200
|
+
fillInTheGapsTextPage.steps.openSpecialCharactersPopupPreviewTab();
|
201
|
+
//Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
|
202
|
+
//fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersPopupCategorySymbols(specialCharacters);
|
203
|
+
});
|
204
|
+
|
205
|
+
it('When the user has specified custom special characters and opens the special characters popup in the preview tab, then only the specified custom special characters should be displayed in the popup', () => {
|
206
|
+
fillInTheGapsTextPage.steps.closeSpecialCharactersPopupPreviewTab();
|
207
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
208
|
+
fillInTheGapsTextPage.steps.selectShowOnlyCustomSpecialCharactersRadioButton();
|
209
|
+
fillInTheGapsTextPage.steps.addInputToCustomSpecialCharactersInputField(`${customSpecialCharacters.join('')}`);
|
210
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
211
|
+
fillInTheGapsTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
212
|
+
fillInTheGapsTextPage.steps.openSpecialCharactersPopupPreviewTab();
|
213
|
+
//Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
|
214
|
+
//fillInTheGapsOverImageTextPage.steps.verifySpecialCharactersPopupCategorySymbols(specialCharacters);
|
215
|
+
});
|
216
|
+
|
217
|
+
it('When user clicks on a special character symbol in special characters popup in the preview tab, then the that symbol should be displayed in the response area input field', () => {
|
218
|
+
fillInTheGapsTextPage.steps.clickOnCustomSpecialCharacterSymbolInSpecialCharactersPopupPreviewTab(customSpecialCharacters[0]);
|
219
|
+
fillInTheGapsTextPage.steps.closeSpecialCharactersPopupPreviewTab();
|
220
|
+
fillInTheGapsTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: `${customSpecialCharacters[0]}` }])
|
221
|
+
});
|
222
|
+
|
223
|
+
it('CSS of \'Special characters\' popup', { tags: 'css' }, () => {
|
224
|
+
cy.log('Pre-step: Switching to edit tab and selecting group by language radio button');
|
225
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
226
|
+
fillInTheGapsTextPage.steps.selectGroupByLanguageRadioButton();
|
227
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
228
|
+
fillInTheGapsTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
229
|
+
fillInTheGapsTextPage.steps.openSpecialCharactersPopupPreviewTab();
|
230
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharactersPopupTitlePreviewTab(), {
|
231
|
+
'color': css.color.flyoutTitle,
|
232
|
+
'font-size': css.fontSize.heading,
|
233
|
+
'font-weight': css.fontWeight.bold,
|
234
|
+
});
|
235
|
+
|
236
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharactersPopupCategoryAccordionLabelPreviewTab().last(), {
|
237
|
+
'color': css.color.accordionLabel,
|
238
|
+
'font-size': css.fontSize.default,
|
239
|
+
'font-weight': css.fontWeight.bold,
|
240
|
+
});
|
241
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharactersPopupCategoryAccordionChevronButtonPreviewTab().last().find('svg'), {
|
242
|
+
'fill': css.color.activeButtons
|
243
|
+
});
|
244
|
+
utilities.verifyCSS(fillInTheGapsTextPage.specialCharactersPopupSymbolPreviewTab().last().find('path'), {
|
245
|
+
'fill': css.color.activeButtons
|
246
|
+
});
|
247
|
+
});
|
248
|
+
});
|
249
|
+
});
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { fillInTheGapsTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create Item page - Fill in the gaps with text: Specify correct answer, Alternative correct answer', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
//https://redmine.zeuslearning.com/issues/562785
|
10
|
+
describe('Specify correct answer section - Header and \'Correct\' accordion', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
14
|
+
cy.barsPreLoaderWait();
|
15
|
+
});
|
16
|
+
|
17
|
+
fillInTheGapsTextPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('fill in the gaps with text');
|
18
|
+
|
19
|
+
fillInTheGapsTextPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
20
|
+
});
|
21
|
+
|
22
|
+
describe('Specify correct answer section - \'Alternative\' accordion', () => {
|
23
|
+
abortEarlySetup();
|
24
|
+
before(() => {
|
25
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
26
|
+
cy.barsPreLoaderWait();
|
27
|
+
});
|
28
|
+
|
29
|
+
fillInTheGapsTextPage.tests.verifyAutoScoredAddAlternativeAnswerButtonAndValidation('fill in the gaps text');
|
30
|
+
|
31
|
+
it('When user has added points and given input in response accordion answer input field in the \'Correct\' accordion, then the user should be able to add alternative answer for the question using \'Add alternative answer\' button', () => {
|
32
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Petals' }, { responseIndex: 1, responseText: 'Flower' }]);
|
33
|
+
fillInTheGapsTextPage.steps.allotPoints(10);
|
34
|
+
fillInTheGapsTextPage.steps.addAlternativeAnswerAccordion(1);
|
35
|
+
});
|
36
|
+
|
37
|
+
it('When user has added an alternative answer accordion, then the newly added alternative answer accordion should be in expanded state and the correct answer accordion should be in collapsed state', () => {
|
38
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerAccordionIsCollapsed();
|
39
|
+
fillInTheGapsTextPage.steps.verifyAlternateAnswerAccordionIsExpanded(1);
|
40
|
+
});
|
41
|
+
|
42
|
+
fillInTheGapsTextPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Alternative');
|
43
|
+
|
44
|
+
it('User should be able to add another alternative answer for the question using \'Add alternative answer\' button and the name for this new accordion should be \'Alternative 2\'', () => {
|
45
|
+
fillInTheGapsTextPage.steps.addAlternativeAnswerAccordion(2);
|
46
|
+
});
|
47
|
+
|
48
|
+
fillInTheGapsTextPage.tests.verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion();
|
49
|
+
|
50
|
+
it('User should be able to remove alternative correct answer by clicking on the \'Delete\' icon button alongside alternative answer accordion and the name of the alternative answer accordions should get updated accordingly', () => {
|
51
|
+
cy.log('Set correct answer and points in alternative 2 accordion, then switch to alternative 1 accordion and click delete icon button');
|
52
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Petals' }, { responseIndex: 1, responseText: 'Flower' }]);
|
53
|
+
fillInTheGapsTextPage.steps.allotPoints(5);
|
54
|
+
fillInTheGapsTextPage.steps.deleteAlternativeAnswerAccordion(1);
|
55
|
+
fillInTheGapsTextPage.steps.verifyAlternativeAnswerAccordionNotExists(2);
|
56
|
+
fillInTheGapsTextPage.steps.verifyAlternativeAnswerAccordionLabel(1);
|
57
|
+
});
|
58
|
+
|
59
|
+
it('When correct answers and points are set in alternative answer and user clicks on correct answer accordion, then correct answer accordion should be expanded and the alternative answer accordion should be collapsed', () => {
|
60
|
+
fillInTheGapsTextPage.steps.expandCorrectAnswerAccordion();
|
61
|
+
fillInTheGapsTextPage.steps.verifyAlternateAnswerAccordionIsCollapsed(1);
|
62
|
+
});
|
63
|
+
});
|
64
|
+
});
|
@@ -0,0 +1,128 @@
|
|
1
|
+
import { fillInTheGapsTextPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create Item page - Fill in the gaps with text: Student view settings', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Student view settings : Spell check - Edit tab functionality', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigating to drawing response question type');
|
15
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
});
|
18
|
+
|
19
|
+
fillInTheGapsTextPage.tests.verifySpellCheckEditTabContents();
|
20
|
+
});
|
21
|
+
|
22
|
+
describe('Student view settings : Spell check - Preview tab functionality', () => {
|
23
|
+
abortEarlySetup();
|
24
|
+
before(() => {
|
25
|
+
cy.log('Navigating to drawing response question type');
|
26
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
27
|
+
cy.barsPreLoaderWait();
|
28
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
29
|
+
});
|
30
|
+
|
31
|
+
fillInTheGapsTextPage.tests.verifySpellCheckFunctionalityPreviewTab();
|
32
|
+
});
|
33
|
+
|
34
|
+
describe('Allow students to check answer: Edit tab', () => {
|
35
|
+
abortEarlySetup();
|
36
|
+
before(() => {
|
37
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
38
|
+
cy.barsPreLoaderWait();
|
39
|
+
});
|
40
|
+
|
41
|
+
fillInTheGapsTextPage.tests.verifyAllowStudentsToCheckAnswerLabelAndCheckboxCSS();
|
42
|
+
|
43
|
+
fillInTheGapsTextPage.tests.verifyMaximumAttemptsDropdownDisplayedWhenAllowStudentsToCheckAnswerIsChecked();
|
44
|
+
|
45
|
+
fillInTheGapsTextPage.tests.verifyMaxCheckAnswerAttemptsDropdown();
|
46
|
+
|
47
|
+
fillInTheGapsTextPage.tests.verifyAllowStudentsToCheckAnswerContentsCSSAndA11y();
|
48
|
+
});
|
49
|
+
|
50
|
+
describe('Allow students to check answer: Preview tab', () => {
|
51
|
+
abortEarlySetup();
|
52
|
+
before(() => {
|
53
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
54
|
+
cy.barsPreLoaderWait();
|
55
|
+
fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
56
|
+
fillInTheGapsTextPage.steps.addResponseArea();
|
57
|
+
fillInTheGapsTextPage.steps.allotPoints(10);
|
58
|
+
fillInTheGapsTextPage.steps.selectAcceptedStudentInputType(1, 'Number');
|
59
|
+
fillInTheGapsTextPage.steps.selectAcceptedStudentInputType(2, 'Integer');
|
60
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: '20.00' }, { responseIndex: 2, responseText: '7' }]);
|
61
|
+
});
|
62
|
+
|
63
|
+
it('When the user has added options and specified correct answer and points then on checking the \'Allow students to check answer\' checkbox the Check answer button should be displayed in the preview tab', () => {
|
64
|
+
fillInTheGapsTextPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
65
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
66
|
+
utilities.verifyInnerText(fillInTheGapsTextPage.checkAnswerButton(), 'Check answer');
|
67
|
+
});
|
68
|
+
|
69
|
+
it('When the user enters answer in the response area and checks the answer then an icon should be displayed beside the selected option and the check answer button should be in enabled state', () => {
|
70
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
71
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
72
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
73
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
74
|
+
fillInTheGapsTextPage.steps.verifyCheckAnswerButtonEnabled();
|
75
|
+
});
|
76
|
+
|
77
|
+
it('When the user selects an option from the Maximum check answer attempts dropdown then the user should be able to check answer only those many times in the preview tab', () => {
|
78
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
79
|
+
fillInTheGapsTextPage.steps.expandMaxCheckAnswerAttemptsDropdown();
|
80
|
+
fillInTheGapsTextPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('1');
|
81
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
82
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
83
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
84
|
+
fillInTheGapsTextPage.steps.verifyCheckAnswerButtonDisabled();
|
85
|
+
});
|
86
|
+
|
87
|
+
it('When the user reaches maximum check answer attempts, then the \'Check Answer\' button should become disabled', () => {
|
88
|
+
utilities.verifyElementDisabled(fillInTheGapsTextPage.checkAnswerButton());
|
89
|
+
});
|
90
|
+
|
91
|
+
it('CSS of disabled \'Check Answer\' button', { tags: 'css' }, () => {
|
92
|
+
utilities.verifyCSS(fillInTheGapsTextPage.checkAnswerButton(), {
|
93
|
+
'color': css.color.primaryBtnDisabled,
|
94
|
+
'font-size': css.fontSize.default,
|
95
|
+
'font-weight': css.fontWeight.semibold
|
96
|
+
});
|
97
|
+
});
|
98
|
+
|
99
|
+
it('Accessibility of disabled Check Answer button', { tags: 'a11y' }, () => {
|
100
|
+
cy.checkAccessibility(fillInTheGapsTextPage.checkAnswerButton().parents('.check-answer-and-status-wrapper'));
|
101
|
+
});
|
102
|
+
|
103
|
+
it('When the user updates the value of \'Maximum check answer attempts\' dropdown, it should get reflected on the Preview tab', () => {
|
104
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
105
|
+
fillInTheGapsTextPage.steps.expandMaxCheckAnswerAttemptsDropdown();
|
106
|
+
fillInTheGapsTextPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('3');
|
107
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
108
|
+
fillInTheGapsTextPage.steps.verifyCheckAnswerButtonEnabled();
|
109
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
110
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
111
|
+
fillInTheGapsTextPage.steps.verifyCheckAnswerButtonEnabled();
|
112
|
+
});
|
113
|
+
|
114
|
+
it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
|
115
|
+
fillInTheGapsTextPage.steps.switchToEditTab();
|
116
|
+
fillInTheGapsTextPage.steps.expandMaxCheckAnswerAttemptsDropdown();
|
117
|
+
fillInTheGapsTextPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
|
118
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
119
|
+
fillInTheGapsTextPage.steps.verifyCheckAnswerButtonEnabled();
|
120
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
121
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
122
|
+
fillInTheGapsTextPage.steps.verifyCheckAnswerButtonEnabled();
|
123
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: '20.00' }]);
|
124
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
125
|
+
fillInTheGapsTextPage.steps.verifyCheckAnswerButtonEnabled();
|
126
|
+
});
|
127
|
+
});
|
128
|
+
});
|