itemengine-cypress-automation 1.0.247-06SeptUpdates-b1623d7.0 → 1.0.247
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +349 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +348 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +415 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingPenaltyScoring.js +54 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightBasic.js +254 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightBasic.js +255 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +3 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +2 -0
- package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +2 -0
- package/cypress/e2e/ILC/ImageHighlight/toolsFunctionalityEditTab.js +2 -2
- package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +270 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsBasic.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +236 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialEqualWeightsBasic.js +150 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/setPointsPopup.js +88 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +97 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/studentViewSettings.js +134 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/additionalSettings.js +131 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabBasicSection.js +167 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +202 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/headerSection.js +76 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/manuallyAndNonScoredEditTab.js +72 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/minimumScoringPenaltyPointsAndRoundingDropdown.js +197 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/optionsOrientationSection.js +180 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/studentViewSettings.js +130 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionsPanel.js +121 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneConnectorStyle.js +68 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionAlignment.js +71 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionPlacement.js +64 -0
- package/cypress/e2e/ILC/MatchingDropdown/styleAndLayoutCustomization.js +270 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +272 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +6 -6
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/pages/audioPlayerPage.js +4 -4
- package/cypress/pages/audioResponsePage.js +9 -1
- package/cypress/pages/chartsBarPage.js +3 -3
- package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +51 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/pages/components/index.js +1 -10
- package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +604 -0
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -6
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
- package/cypress/pages/essayResponseBasicPage.js +4 -4
- package/cypress/pages/essayResponseMathPage.js +4 -4
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
- package/cypress/pages/index.js +0 -1
- package/cypress/pages/itemPreviewPage.js +1 -2
- package/cypress/pages/itemPreviewSettingsPage.js +3 -3
- package/cypress/pages/listOrderingPage.js +384 -10
- package/cypress/pages/matchingPage.js +512 -13
- package/cypress/pages/multipleSelectionPage.js +2 -2
- package/cypress/pages/numberLineLabelPage.js +3 -3
- package/cypress/pages/shortTextResponsePage.js +0 -37
- package/cypress/pages/singleSelectionPage.js +2 -2
- package/cypress/pages/textEntryMathPage.js +41 -9
- package/cypress/pages/textSelectionPage.js +2 -2
- package/cypress/pages/uploadResponsePage.js +2 -3
- package/cypress/pages/videoResponsePage.js +9 -2
- package/package.json +1 -1
- package/cypress/fixtures/specialAndMathCharacters.js +0 -120
- package/cypress/pages/components/autoScoredAdditionalSettings.js +0 -183
- package/cypress/pages/components/autoScoredPreviewBase.js +0 -92
- package/cypress/pages/components/autoScoredScoringSection.js +0 -199
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +0 -377
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +0 -297
- package/cypress/pages/components/autoScoredStudentViewSettingsForPredefinedOptions.js +0 -84
- package/cypress/pages/components/listSortingAndOrderingBase.js +0 -401
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +0 -91
- package/cypress/pages/components/scoringSectionBase.js +0 -354
- package/cypress/pages/components/specialAndCustomSpecialCharactersComponent.js +0 -80
- package/cypress/pages/components/specialCharactersFlyoutComponent.js +0 -59
- package/cypress/pages/listSortingPage.js +0 -1198
@@ -0,0 +1,150 @@
|
|
1
|
+
import { listOrderingPage } from "../../../../pages/listOrderingPage";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
const options = ['sprout', 'plant', 'flower', 'seed'];
|
4
|
+
const correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
5
|
+
|
6
|
+
describe('Create Item page - List ordering: Partial equal weights', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question Preview: AutoScored - Partial equal weights for "Horizontal" option orientation', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
17
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
18
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
19
|
+
listOrderingPage.steps.allotPoints(20);
|
20
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
21
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
22
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
23
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
24
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
25
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
26
|
+
listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
|
27
|
+
listOrderingPage.steps.switchToPreviewTab();
|
28
|
+
});
|
29
|
+
|
30
|
+
it('When the user switches to the \'Grading view\' without attempting the question, then correct/incorrect icons should not be displayed for the default list order, correct/incorrect status message should not be displayed and correct answers section should be displayed with correct answers from the correct accordion', () => {
|
31
|
+
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
32
|
+
listOrderingPage.steps.switchToGradingView();
|
33
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
34
|
+
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
35
|
+
listOrderingPage.steps.verifyCorrectOptionIconsCorrectAnswerSection();
|
36
|
+
});
|
37
|
+
|
38
|
+
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, correct/incorrect status message should not be displayed and correct answers section should be displayed with correct answers from the correct accordion', () => {
|
39
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
40
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
41
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
42
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
43
|
+
listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['flower', 'plant', 'seed', 'sprout']);
|
44
|
+
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
45
|
+
listOrderingPage.steps.switchToGradingView();
|
46
|
+
listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
|
47
|
+
listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
|
48
|
+
listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
|
49
|
+
listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
|
50
|
+
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
51
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
52
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
53
|
+
});
|
54
|
+
|
55
|
+
it('When the user attempts the question partially correct, then the user should be awarded points of the correctly attempted responses 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, correct/incorrect status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
|
56
|
+
listOrderingPage.steps.resetQuestionPreview();
|
57
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
58
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
59
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
60
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
61
|
+
listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['plant', 'sprout', 'seed', 'flower']);
|
62
|
+
listOrderingPage.steps.switchToGradingView();
|
63
|
+
listOrderingPage.steps.verifyPreviewScore(10, 20);
|
64
|
+
listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
|
65
|
+
listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
|
66
|
+
listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
|
67
|
+
listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
|
68
|
+
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
69
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
70
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
71
|
+
});
|
72
|
+
|
73
|
+
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/incorrect status message and correct answer section should not be displayed', () => {
|
74
|
+
listOrderingPage.steps.resetQuestionPreview();
|
75
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
76
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
77
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
78
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
79
|
+
listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
|
80
|
+
listOrderingPage.steps.verifyPreviewScore(20, 20);
|
81
|
+
listOrderingPage.steps.switchToGradingView()
|
82
|
+
listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
|
83
|
+
listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
|
84
|
+
listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
|
85
|
+
listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
|
86
|
+
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
87
|
+
listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
88
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
89
|
+
});
|
90
|
+
});
|
91
|
+
|
92
|
+
describe('Question preview: Auto scored - Partial equal weights: Minimum scoring for "Horizontal" option orientation', () => {
|
93
|
+
abortEarlySetup();
|
94
|
+
before(() => {
|
95
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
96
|
+
cy.barsPreLoaderWait();
|
97
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
98
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
99
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
100
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
101
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
102
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
103
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
104
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
105
|
+
listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
|
106
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
107
|
+
listOrderingPage.steps.allotPoints(20);
|
108
|
+
});
|
109
|
+
|
110
|
+
it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
|
111
|
+
listOrderingPage.steps.expandMinimumScoringDropdown();
|
112
|
+
listOrderingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
|
113
|
+
listOrderingPage.steps.allotMinimumPoints(2);
|
114
|
+
listOrderingPage.steps.switchToPreviewTab();
|
115
|
+
listOrderingPage.steps.switchToGradingView();
|
116
|
+
listOrderingPage.steps.verifyPreviewScore(2, 20);
|
117
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
118
|
+
});
|
119
|
+
|
120
|
+
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
121
|
+
listOrderingPage.steps.resetQuestionPreview();
|
122
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
123
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
124
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
125
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
126
|
+
listOrderingPage.steps.verifyPreviewScore(2, 20);
|
127
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
128
|
+
});
|
129
|
+
|
130
|
+
it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then considering the default list order as an incorrect attempt the user should be awarded with minimum points', () => {
|
131
|
+
listOrderingPage.steps.switchToEditTab();
|
132
|
+
listOrderingPage.steps.expandMinimumScoringDropdown();
|
133
|
+
listOrderingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
134
|
+
listOrderingPage.steps.allotMinimumPoints(2);
|
135
|
+
listOrderingPage.steps.switchToPreviewTab();
|
136
|
+
listOrderingPage.steps.switchToGradingView();
|
137
|
+
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
138
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
139
|
+
});
|
140
|
+
|
141
|
+
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
142
|
+
listOrderingPage.steps.resetQuestionPreview();
|
143
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
144
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
145
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
146
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
147
|
+
listOrderingPage.steps.verifyPreviewScore(2, 20);
|
148
|
+
});
|
149
|
+
})
|
150
|
+
});
|
package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/setPointsPopup.js
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
import { ckEditorToolbar, equationEditorFlyout } from "../../../../pages/components";
|
2
|
+
import { setPointsPopupBase } from "../../../../pages/components/setPointsPopupBase";
|
3
|
+
import { listOrderingPage } from "../../../../pages/listOrderingPage";
|
4
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
5
|
+
import utilities from "../../../../support/helpers/utilities";
|
6
|
+
const css = Cypress.env('css');
|
7
|
+
|
8
|
+
let options = ['plant', 'flower', 'sprout', 'seed'];
|
9
|
+
let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
10
|
+
|
11
|
+
describe('Create item page - List ordering: "Horizontal orientation" - Set points popup edit tab functionality', () => {
|
12
|
+
before(() => {
|
13
|
+
cy.loginAs('admin');
|
14
|
+
});
|
15
|
+
|
16
|
+
//Failing due to - https://redmine.zeuslearning.com/issues/571827
|
17
|
+
describe('Set points - Edit tab functionality', () => {
|
18
|
+
abortEarlySetup();
|
19
|
+
before(() => {
|
20
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
21
|
+
cy.barsPreLoaderWait();
|
22
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
23
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
24
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
25
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
26
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
27
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
28
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
29
|
+
listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
|
30
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
31
|
+
listOrderingPage.steps.clickOnSetPointsButton();
|
32
|
+
});
|
33
|
+
|
34
|
+
it('When user has opened "Set points" popup and focuses in and out of the points input field then no error message should be displayed', () => {
|
35
|
+
listOrderingPage.steps.focusInAndFocusOutOfPointsInputField(0);
|
36
|
+
listOrderingPage.steps.verifyErrorMessageIsNotDisplayed();
|
37
|
+
});
|
38
|
+
|
39
|
+
it('The user should be able to set points in the Set points popup points input field', () => {
|
40
|
+
setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField([10]);
|
41
|
+
});
|
42
|
+
|
43
|
+
it('When user clicks on Cancel button then the popup should close and the on opening the popup again empty points fields should be displayed', () => {
|
44
|
+
setPointsPopupBase.steps.cancelSetPointsPopup();
|
45
|
+
listOrderingPage.steps.clickOnSetPointsButton();
|
46
|
+
utilities.verifyInnerText(listOrderingPage.pointsInputField(), '');
|
47
|
+
cy.log('Close the Set points popup')
|
48
|
+
setPointsPopupBase.steps.cancelSetPointsPopup();
|
49
|
+
});
|
50
|
+
|
51
|
+
it('When user deletes an option from the "Option" section then it should not be displayed in the "Set points" popup', () => {
|
52
|
+
listOrderingPage.steps.deleteOption(0);
|
53
|
+
listOrderingPage.steps.clickOnSetPointsButton();
|
54
|
+
utilities.verifyElementCount(listOrderingPage.optionWrapperSetPointsPopup(), 3);
|
55
|
+
cy.log('Close the Set points popup')
|
56
|
+
setPointsPopupBase.steps.cancelSetPointsPopup();
|
57
|
+
});
|
58
|
+
|
59
|
+
it('When user adds an option in the "Option" section then it should be displayed in the "Set points" popup with an empty points field', () => {
|
60
|
+
listOrderingPage.steps.addOption();
|
61
|
+
listOrderingPage.steps.editOptionInputField(3, options[0]);
|
62
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
63
|
+
listOrderingPage.steps.clickOnSetPointsButton();
|
64
|
+
utilities.verifyElementCount(listOrderingPage.optionWrapperSetPointsPopup(), 4);
|
65
|
+
utilities.verifyInnerText(listOrderingPage.pointsInputField(), '');
|
66
|
+
});
|
67
|
+
|
68
|
+
it('When user adds points to the options and clicks on "Save" button then the popup should close and opening the popup again the points should be prefilled', () => {
|
69
|
+
setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField([4.8, 3, 2.2]);
|
70
|
+
setPointsPopupBase.steps.saveSetPointsPopup();
|
71
|
+
listOrderingPage.steps.clickOnSetPointsButton();
|
72
|
+
setPointsPopupBase.steps.verifyPointsAllotedInSetPointsPopup([4.8, 3, 2.2]);
|
73
|
+
cy.log('Close the Set points popup')
|
74
|
+
setPointsPopupBase.steps.cancelSetPointsPopup();
|
75
|
+
});
|
76
|
+
|
77
|
+
//need to remove skip after https://redmine.zeuslearning.com/issues/571827 is resolved
|
78
|
+
it.skip('When user tries to add alternative accordion without adding points to all options field, then an alternative accordion should get added. The added alternative accordion should be in expanded state', () => {
|
79
|
+
listOrderingPage.steps.addAlternativeAnswerAccordion(1);
|
80
|
+
listOrderingPage.steps.verifyAlternateAnswerAccordionIsExpanded(0);
|
81
|
+
});
|
82
|
+
|
83
|
+
it('When user clicks on the "Set points" button of the alternative accordion then options should be displayed with empty points field', () => {
|
84
|
+
listOrderingPage.steps.clickOnSetPointsButton();
|
85
|
+
utilities.verifyInnerText(listOrderingPage.pointsInputField(), '');
|
86
|
+
});
|
87
|
+
});
|
88
|
+
});
|
@@ -0,0 +1,97 @@
|
|
1
|
+
import { dialogBoxBase, listOrderingPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const options = ['sprout', 'plant', 'flower', 'seed'];
|
5
|
+
|
6
|
+
describe('Create item page - List ordering: Specify correct answer, Alternative correct answer', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Specify correct answer section - Header and \'Correct\' accordion', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
17
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
18
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
19
|
+
});
|
20
|
+
|
21
|
+
listOrderingPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('list ordering');
|
22
|
+
|
23
|
+
it('By default, 4 options should be displayed with Drag handle in the correct accordion', () => {
|
24
|
+
utilities.verifyElementCount(listOrderingPage.optionsSeperateList(), 4);
|
25
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
26
|
+
});
|
27
|
+
|
28
|
+
listOrderingPage.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty('Correct');
|
29
|
+
});
|
30
|
+
|
31
|
+
describe('Specify correct answer section - \'Alternative\' accordion', () => {
|
32
|
+
abortEarlySetup();
|
33
|
+
before(() => {
|
34
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
35
|
+
cy.barsPreLoaderWait();
|
36
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
37
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
38
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
39
|
+
});
|
40
|
+
|
41
|
+
it('The Specify answer section should contain 4 options and a dropzone with a title \'My list\', the user should be able to drop the options in the dropzone', () => {
|
42
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
43
|
+
utilities.verifyInnerText(listOrderingPage.specifyCorrectAnswerSectionMyListLabel(), 'My list');
|
44
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
45
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
46
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('sprout');
|
47
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('seed');
|
48
|
+
});
|
49
|
+
|
50
|
+
it('When the user has allotted points to the \'Correct accordion\' and has dropped the options in the dropzone, then the user should be able to add alternative answer for the question using \'Add alternative answer\' button', () => {
|
51
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
52
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
53
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
54
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
55
|
+
listOrderingPage.steps.addAlternativeAnswerAccordion(1);
|
56
|
+
});
|
57
|
+
|
58
|
+
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', () => {
|
59
|
+
listOrderingPage.steps.verifyCorrectAnswerAccordionIsCollapsed();
|
60
|
+
listOrderingPage.steps.verifyAlternateAnswerAccordionIsExpanded(0);
|
61
|
+
});
|
62
|
+
|
63
|
+
it('By default, 4 options should be displayed with Drag handle in the correct accordion', () => {
|
64
|
+
utilities.verifyElementCount(listOrderingPage.optionsSeperateList(), 4);
|
65
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
66
|
+
});
|
67
|
+
|
68
|
+
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\'', () => {
|
69
|
+
cy.log('Set correct answer and points in alternative 1 accordion');
|
70
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
71
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
72
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
73
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
74
|
+
listOrderingPage.steps.allotPoints(5);
|
75
|
+
listOrderingPage.steps.addAlternativeAnswerAccordion(2);
|
76
|
+
});
|
77
|
+
|
78
|
+
listOrderingPage.tests.verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordionSeparateList();
|
79
|
+
|
80
|
+
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', () => {
|
81
|
+
cy.log('Set correct answer and points in alternative 2 accordion, then switch to alternative 1 accordion and click delete icon button');
|
82
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
83
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
84
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
85
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
86
|
+
listOrderingPage.steps.allotPoints(5);
|
87
|
+
listOrderingPage.steps.deleteAlternativeAnswerAccordion(1);
|
88
|
+
listOrderingPage.steps.verifyAlternativeAnswerAccordionNotExists(2);
|
89
|
+
listOrderingPage.steps.verifyAlternativeAnswerAccordionLabel(0);
|
90
|
+
});
|
91
|
+
|
92
|
+
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', () => {
|
93
|
+
listOrderingPage.steps.expandCorrectAnswerAccordion();
|
94
|
+
listOrderingPage.steps.verifyAlternateAnswerAccordionIsCollapsed(0);
|
95
|
+
});
|
96
|
+
});
|
97
|
+
});
|
@@ -0,0 +1,134 @@
|
|
1
|
+
|
2
|
+
import { listOrderingPage } from "../../../../pages";
|
3
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../../support/helpers/utilities";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
const options = ['sprout', 'plant', 'flower', 'seed'];
|
7
|
+
|
8
|
+
describe('Create Item page - List ordering : Student view settings', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Randomize options : Edit tab', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
19
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('list ordering');
|
20
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
21
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
22
|
+
listOrderingPage.steps.allotPoints(5);
|
23
|
+
});
|
24
|
+
|
25
|
+
listOrderingPage.tests.verifyStudentViewSettingsLabelAndCSS();
|
26
|
+
|
27
|
+
listOrderingPage.tests.verifyAllowStudentsToCheckAnswerNotExist();
|
28
|
+
|
29
|
+
it('\'Randomize options\' checkbox and label should be displayed and by default it should be unchecked', () => {
|
30
|
+
utilities.verifyInnerText(listOrderingPage.randomizeOptionsLabel(), 'Randomize options');
|
31
|
+
utilities.verifyElementVisibilityState(listOrderingPage.randomizeOptionsCheckbox(), 'exist');
|
32
|
+
listOrderingPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
|
33
|
+
});
|
34
|
+
|
35
|
+
listOrderingPage.tests.verifyRandomizeOptionsCheckboxAndLabelUncheckedCSS();
|
36
|
+
|
37
|
+
it('When the \'Randomize options\' functionality is disabled, the options in the specify correct answer section should be displayed in the order in which the user has set them in the \'Options\' section', () => {
|
38
|
+
listOrderingPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
|
39
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
40
|
+
});
|
41
|
+
|
42
|
+
it('When the user enables the \'Randomize options\' functionality, then the options in the specify correct answer section should be in the order in which the user has set them in the \'Options\' section', () => {
|
43
|
+
listOrderingPage.steps.checkRandomizeOptionsCheckbox();
|
44
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
45
|
+
});
|
46
|
+
|
47
|
+
listOrderingPage.tests.verifyRandomizeOptionsCheckboxCheckedCSSAndA11y();
|
48
|
+
});
|
49
|
+
|
50
|
+
describe('Randomize options : Preview tab', () => {
|
51
|
+
let optionsArray = [];
|
52
|
+
abortEarlySetup();
|
53
|
+
before(() => {
|
54
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
55
|
+
cy.barsPreLoaderWait();
|
56
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
57
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
58
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
59
|
+
listOrderingPage.steps.allotPoints(5);
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the \'Randomize options\' functionality is disabled, options in the preview tab should be displayed in the order in which the user has set them in the \'Draggable options\' section', () => {
|
63
|
+
listOrderingPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
|
64
|
+
listOrderingPage.steps.switchToPreviewTab();
|
65
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
66
|
+
});
|
67
|
+
|
68
|
+
it('When the user enables the \'Randomize options\' functionality, then options in preview tab should be displayed in a random order', () => {
|
69
|
+
listOrderingPage.steps.switchToEditTab();
|
70
|
+
listOrderingPage.steps.checkRandomizeOptionsCheckbox();
|
71
|
+
listOrderingPage.steps.switchToPreviewTab();
|
72
|
+
listOrderingPage.steps.verifyRandomizeOptionOrderSeparateList(options);
|
73
|
+
optionsArray = listOrderingPage.steps.getOptionsArraySeparateList();
|
74
|
+
});
|
75
|
+
|
76
|
+
it('When the user switches to \'Edit tab\' and modifies any of question properties, then the order of the options should change from the previous random order', () => {
|
77
|
+
listOrderingPage.steps.switchToEditTab();
|
78
|
+
listOrderingPage.steps.allotPoints(12);
|
79
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Question');
|
80
|
+
listOrderingPage.steps.switchToPreviewTab();
|
81
|
+
listOrderingPage.steps.verifyRandomizeOptionOrderSeparateList(options);
|
82
|
+
listOrderingPage.steps.verifyOptionsAreReRandomizedSeparateList(optionsArray);
|
83
|
+
});
|
84
|
+
|
85
|
+
it('When the user disables the \'Randomize options\' functionality, then the options in the preview tab should be displayed in the order in which the user has set them in the edit tab', () => {
|
86
|
+
listOrderingPage.steps.switchToEditTab()
|
87
|
+
listOrderingPage.steps.uncheckRandomizeOptionsCheckbox();
|
88
|
+
listOrderingPage.steps.switchToPreviewTab();
|
89
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
90
|
+
});
|
91
|
+
});
|
92
|
+
|
93
|
+
describe('Enable outer border for question: Edit tab', () => {
|
94
|
+
abortEarlySetup();
|
95
|
+
before(() => {
|
96
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
97
|
+
cy.barsPreLoaderWait();
|
98
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
99
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
100
|
+
});
|
101
|
+
|
102
|
+
listOrderingPage.tests.verifyEnableOuterBorderContents();
|
103
|
+
});
|
104
|
+
|
105
|
+
describe('Enable outer border for question: Preview tab', () => {
|
106
|
+
abortEarlySetup();
|
107
|
+
before(() => {
|
108
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
109
|
+
cy.barsPreLoaderWait();
|
110
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
111
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal')
|
112
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('list ordering');
|
113
|
+
listOrderingPage.steps.switchToPreviewTab();
|
114
|
+
});
|
115
|
+
|
116
|
+
//need to remove skip after https://redmine.zeuslearning.com/issues/571731 is resolved
|
117
|
+
it.skip('When the \'Enable outer border for question\' checkbox is in checked state, an outer border over the question preview should be visible', () => {
|
118
|
+
listOrderingPage.steps.verifyOuterBorderOfQuestionPreview();
|
119
|
+
});
|
120
|
+
|
121
|
+
it('CSS of the outer border', { tags: 'css' }, () => {
|
122
|
+
utilities.verifyCSS(listOrderingPage.questionBorderPreviewTab(), {
|
123
|
+
'border': `1px solid ${css.color.draggableOptionsContainerBorder}`
|
124
|
+
});
|
125
|
+
});
|
126
|
+
|
127
|
+
it('When the user unchecks the \'Enable outer border for question\' checkbox, then the outer border over the question preview should not be displayed', () => {
|
128
|
+
listOrderingPage.steps.switchToEditTab();
|
129
|
+
listOrderingPage.steps.uncheckEnableOuterBorderCheckbox();
|
130
|
+
listOrderingPage.steps.switchToPreviewTab()
|
131
|
+
listOrderingPage.steps.verifyOuterBorderOfQuestionPreviewNotExistsSeparateList();
|
132
|
+
});
|
133
|
+
});
|
134
|
+
});
|
@@ -0,0 +1,131 @@
|
|
1
|
+
import { listOrderingPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const options = ['sprout', 'plant', 'flower', 'seed'];
|
6
|
+
const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
|
7
|
+
|
8
|
+
describe('Create Item page - matching : Additional settings', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Additional Settings accordion', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
19
|
+
});
|
20
|
+
|
21
|
+
listOrderingPage.tests.verifyAdditionalSettingsAccordionProperties();
|
22
|
+
});
|
23
|
+
|
24
|
+
describe('Additional settings: Font size contents', () => {
|
25
|
+
abortEarlySetup();
|
26
|
+
before(() => {
|
27
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
28
|
+
cy.barsPreLoaderWait();
|
29
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
30
|
+
listOrderingPage.steps.expandAdditionalSettings();
|
31
|
+
});
|
32
|
+
|
33
|
+
listOrderingPage.tests.verifyFontSizeSectionContents();
|
34
|
+
});
|
35
|
+
|
36
|
+
describe('Additional settings: Font size - Specify correct answer section', () => {
|
37
|
+
abortEarlySetup();
|
38
|
+
before(() => {
|
39
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
40
|
+
cy.barsPreLoaderWait();
|
41
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
42
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('question instruction');
|
43
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
44
|
+
listOrderingPage.steps.allotPoints(10);
|
45
|
+
listOrderingPage.steps.expandAdditionalSettings();
|
46
|
+
});
|
47
|
+
|
48
|
+
Object.keys(fontSizes).forEach((option) => {
|
49
|
+
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the specify correct answer section should change to ${fontSizes[option]} accordingly`, () => {
|
50
|
+
utilities.verifyElementVisibilityState(listOrderingPage.fontSizeDropdown(), 'visible');
|
51
|
+
listOrderingPage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
|
52
|
+
utilities.verifyInnerText(listOrderingPage.fontSizeDropdown(), `${option}`);
|
53
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingPage.optionsSeperateList(), 0), {
|
54
|
+
'font-size': fontSizes[option]
|
55
|
+
});
|
56
|
+
});
|
57
|
+
});
|
58
|
+
});
|
59
|
+
|
60
|
+
describe('Additional settings: Font size - preview tab', () => {
|
61
|
+
abortEarlySetup();
|
62
|
+
before(() => {
|
63
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
64
|
+
cy.barsPreLoaderWait();
|
65
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
66
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('question instruction');
|
67
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
68
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
69
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
70
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
71
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
72
|
+
listOrderingPage.steps.allotPoints(10);
|
73
|
+
listOrderingPage.steps.expandAdditionalSettings();
|
74
|
+
});
|
75
|
+
|
76
|
+
Object.keys(fontSizes).forEach((option) => {
|
77
|
+
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${fontSizes[option]} accordingly`, () => {
|
78
|
+
listOrderingPage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
|
79
|
+
utilities.verifyInnerText(listOrderingPage.fontSizeDropdown(), `${option}`);
|
80
|
+
listOrderingPage.steps.switchToPreviewTab();
|
81
|
+
utilities.verifyCSS(listOrderingPage.questionInstructionsText(), {
|
82
|
+
'font-size': fontSizes[option]
|
83
|
+
});
|
84
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingPage.optionsSeperateList(), 0), {
|
85
|
+
'font-size': fontSizes[option]
|
86
|
+
});
|
87
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
88
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
89
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
90
|
+
listOrderingPage.steps.switchToGradingView();
|
91
|
+
utilities.verifyCSS(listOrderingPage.correctAnswersLabel(), {
|
92
|
+
'font-size': fontSizes[option]
|
93
|
+
});
|
94
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingPage.correctAnswerSectionAnswerWrapper(), 0), {
|
95
|
+
'font-size': fontSizes[option]
|
96
|
+
});
|
97
|
+
|
98
|
+
utilities.verifyCSS(listOrderingPage.correctIncorrectStatusMessageText(), {
|
99
|
+
'font-size': fontSizes[option]
|
100
|
+
});
|
101
|
+
listOrderingPage.steps.switchToStudentView();
|
102
|
+
listOrderingPage.steps.switchToEditTab();
|
103
|
+
});
|
104
|
+
});
|
105
|
+
});
|
106
|
+
|
107
|
+
describe('Additional settings: Accessibility section', () => {
|
108
|
+
abortEarlySetup();
|
109
|
+
before(() => {
|
110
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
111
|
+
cy.barsPreLoaderWait();
|
112
|
+
|
113
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
114
|
+
listOrderingPage.steps.expandAdditionalSettings();
|
115
|
+
});
|
116
|
+
|
117
|
+
listOrderingPage.tests.verifyAdditionalSettingsAccessibilitySection();
|
118
|
+
});
|
119
|
+
|
120
|
+
describe('Additional Settings: Details section', () => {
|
121
|
+
abortEarlySetup();
|
122
|
+
before(() => {
|
123
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
124
|
+
cy.barsPreLoaderWait();
|
125
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
126
|
+
listOrderingPage.steps.expandAdditionalSettings();
|
127
|
+
});
|
128
|
+
|
129
|
+
listOrderingPage.tests.verifyDetailsSection();
|
130
|
+
});
|
131
|
+
});
|