itemengine-cypress-automation 1.0.180-essayResponseLazyLoadingFix-63cd8a3.0 → 1.0.182-repoUpdate22April-92d01da.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +4 -5
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +64 -3
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +251 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
- package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/LayoutSection.js +530 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +119 -0
- package/cypress/e2e/ILC/NumberLine/numberLineSection.js +263 -0
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
- package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
- package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.smoke.js +179 -0
- package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
- package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
- package/cypress/fixtures/constants.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
- package/cypress/fixtures/theme/ilc.json +16 -16
- package/cypress/pages/audioPlayerPage.js +55 -543
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +4 -4
- package/cypress/pages/components/commonComponents.js +1 -0
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/equationEditorFlyout.js +3 -2
- package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
- package/cypress/pages/components/imageCanvasComponent.js +2 -1
- package/cypress/pages/components/index.js +1 -0
- package/cypress/pages/components/optionsWrapperComponent.js +11 -0
- package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
- package/cypress/pages/components/toolSettingsComponent.js +6 -0
- package/cypress/pages/contentBlocksPage.js +2 -2
- package/cypress/pages/createItemPage.js +29 -0
- package/cypress/pages/dialogBoxBase.js +2 -2
- package/cypress/pages/drawingResponsePage.js +23 -4
- package/cypress/pages/feedbackScalePage.js +3 -0
- package/cypress/pages/graphingPage.js +18 -0
- package/cypress/pages/gridFillPage.js +18 -2
- package/cypress/pages/index.js +1 -1
- package/cypress/pages/itemPreviewSettingsPage.js +4 -0
- package/cypress/pages/listOrderingPage.js +122 -647
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +23 -1
- package/cypress/pages/numberLinePage.js +1196 -59
- package/cypress/pages/rulerPage.js +6 -2
- package/cypress/pages/textSelectionPage.js +460 -22
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +2 -1
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +4 -1
- package/package.json +1 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
@@ -0,0 +1,128 @@
|
|
1
|
+
import { listOrderingPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
var itemReferenceID = "";
|
5
|
+
const checkAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
6
|
+
const views = utilities.getViews(checkAnswerViews);
|
7
|
+
const options = ['sprout', 'plant', 'flower', 'seed'];
|
8
|
+
const correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
9
|
+
|
10
|
+
describe('Create item page - list ordering - Check answer functionality', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
views.forEach((view) => {
|
16
|
+
//Note: Remove after https://redmine.zeuslearning.com/issues/549542 is fixed
|
17
|
+
const checkAnswer = (view) => {
|
18
|
+
switch (view) {
|
19
|
+
case 'Question preview':
|
20
|
+
case 'Item preview':
|
21
|
+
listOrderingPage.steps.checkAnswer();
|
22
|
+
break;
|
23
|
+
case 'Student view':
|
24
|
+
studentViewPage.steps.checkAnswer();
|
25
|
+
break;
|
26
|
+
default:
|
27
|
+
throw new Error(`Unsupported page identifier: ${view}`);
|
28
|
+
}
|
29
|
+
};
|
30
|
+
|
31
|
+
describe(`${view} - Check answer functionality`, { tags: 'smoke' }, () => {
|
32
|
+
abortEarlySetup();
|
33
|
+
before(() => {
|
34
|
+
switch (view) {
|
35
|
+
case 'Question preview':
|
36
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
37
|
+
cy.barsPreLoaderWait();
|
38
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
39
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
40
|
+
listOrderingPage.steps.allotPoints(20);
|
41
|
+
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
|
42
|
+
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
|
43
|
+
listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
|
44
|
+
listOrderingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
45
|
+
listOrderingPage.steps.switchToPreviewTab();
|
46
|
+
break;
|
47
|
+
case 'Item preview':
|
48
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
49
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
50
|
+
break;
|
51
|
+
case 'Student view':
|
52
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
53
|
+
break;
|
54
|
+
}
|
55
|
+
});
|
56
|
+
|
57
|
+
beforeEach(() => {
|
58
|
+
switch (view) {
|
59
|
+
case 'Question preview':
|
60
|
+
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
61
|
+
listOrderingPage.steps.resetQuestionPreview();
|
62
|
+
break;
|
63
|
+
case 'Item preview':
|
64
|
+
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
65
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
66
|
+
break;
|
67
|
+
case 'Student view':
|
68
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
69
|
+
break;
|
70
|
+
}
|
71
|
+
});
|
72
|
+
|
73
|
+
if (view === 'Question preview') {
|
74
|
+
after(() => {
|
75
|
+
listOrderingPage.steps.clickOnSaveQuestionButton();
|
76
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
77
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
78
|
+
});
|
79
|
+
};
|
80
|
+
|
81
|
+
it('When the user selects \'Check answer\' button without attempting the question, then incorrect icons should be displayed besides all incorrect options, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
82
|
+
checkAnswer(view);
|
83
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
84
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
85
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
86
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('seed');
|
87
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
88
|
+
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
89
|
+
});
|
90
|
+
|
91
|
+
it('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect options, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
92
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
|
93
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
|
94
|
+
checkAnswer(view);
|
95
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
96
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
97
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
98
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
|
99
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
100
|
+
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
101
|
+
});
|
102
|
+
|
103
|
+
it('When the user attempts the question partially correct and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect options, correct icons should be displayed besides correct options, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
|
104
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 3);
|
105
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 0);
|
106
|
+
checkAnswer(view);
|
107
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
108
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
|
109
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
|
110
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
111
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
112
|
+
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
113
|
+
});
|
114
|
+
|
115
|
+
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 options, 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', () => {
|
116
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
|
117
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
|
118
|
+
checkAnswer(view);
|
119
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('seed');
|
120
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
|
121
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('plant');
|
122
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
123
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
124
|
+
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
125
|
+
});
|
126
|
+
});
|
127
|
+
});
|
128
|
+
});
|
@@ -0,0 +1,176 @@
|
|
1
|
+
import { listOrderingPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
+
import { ckEditorToolbar, equationEditorFlyout } from "../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
6
|
+
const views = utilities.getViews(previewContentViews);
|
7
|
+
var itemReferenceID = "";
|
8
|
+
const css = Cypress.env('css');
|
9
|
+
|
10
|
+
describe('Create item page - List ordering - Preview contents in all views', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
views.forEach((view) => {
|
16
|
+
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
17
|
+
abortEarlySetup();
|
18
|
+
before(() => {
|
19
|
+
switch (view) {
|
20
|
+
case 'Question preview':
|
21
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
22
|
+
cy.barsPreLoaderWait();
|
23
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
24
|
+
listOrderingPage.steps.allotPoints(10);
|
25
|
+
cy.log('Add image to option input field')
|
26
|
+
listOrderingPage.steps.focusInOptionsInputField(0);
|
27
|
+
ckEditorToolbar.steps.selectImageOptionFromCKEditorToolbar();
|
28
|
+
ckEditorToolbar.steps.addImageToInputField();
|
29
|
+
listOrderingPage.steps.enterTextInOptionInputField(0, 'Fox');
|
30
|
+
cy.log('Add bold text to option input field')
|
31
|
+
listOrderingPage.steps.focusInOptionsInputField(1);
|
32
|
+
ckEditorToolbar.steps.selectBoldOptionFromCKEditorToolbar();
|
33
|
+
listOrderingPage.steps.enterTextInOptionInputField(1, 'This is a bold option');
|
34
|
+
cy.log('Add equation to option input field')
|
35
|
+
listOrderingPage.steps.enterTextInOptionInputField(2, 'Solve the following');
|
36
|
+
listOrderingPage.steps.focusInOptionsInputField(2);
|
37
|
+
ckEditorToolbar.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
38
|
+
equationEditorFlyout.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
39
|
+
listOrderingPage.steps.enterTextInOptionInputField(3, 'alpha');
|
40
|
+
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('This is a bold option', 0);
|
41
|
+
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('Solve the following', 1);
|
42
|
+
listOrderingPage.steps.switchToPreviewTab();
|
43
|
+
break;
|
44
|
+
case 'Item view':
|
45
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
46
|
+
break;
|
47
|
+
case 'Item preview':
|
48
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
49
|
+
listOrderingPage.steps.switchToPreviewTab();
|
50
|
+
break;
|
51
|
+
case 'Student view':
|
52
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
53
|
+
break;
|
54
|
+
case 'Grading view':
|
55
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
56
|
+
break;
|
57
|
+
case 'Correct answer view':
|
58
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
59
|
+
break;
|
60
|
+
default:
|
61
|
+
throw new Error('Invalid view');
|
62
|
+
}
|
63
|
+
});
|
64
|
+
|
65
|
+
after(() => {
|
66
|
+
if (view === 'Question preview') {
|
67
|
+
listOrderingPage.steps.clickOnSaveQuestionButton();
|
68
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
69
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
70
|
+
}
|
71
|
+
if (view === 'Student view') {
|
72
|
+
studentViewPage.steps.submitResponse();
|
73
|
+
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
74
|
+
}
|
75
|
+
});
|
76
|
+
|
77
|
+
it('Question instructions should be visible', () => {
|
78
|
+
utilities.verifyInnerText(listOrderingPage.questionInstructionsText(), 'Arrange options in correct order.');
|
79
|
+
utilities.verifyElementVisibilityState(listOrderingPage.questionInstructionsText(), 'visible');
|
80
|
+
});
|
81
|
+
|
82
|
+
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
83
|
+
it(`When the user has added image, equation, bold text to the options input fields, then they should be displayed in the options container in ${view}`, () => {
|
84
|
+
listOrderingPage.steps.verifyOptionWithImageInPreviewTab(0);
|
85
|
+
listOrderingPage.steps.verifyOptionWithBoldTextInPreviewTab(1);
|
86
|
+
listOrderingPage.steps.verifyOptionWithEquationTextInPreviewTab(2);
|
87
|
+
});
|
88
|
+
|
89
|
+
it('User should be able to reorder options containing image, bold text and equation options in the list', () => {
|
90
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('This is a bold option', 0);
|
91
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('Solve the following', 1);
|
92
|
+
listOrderingPage.steps.verifyTextContentOfOptionInPreviewTab('This is a bold option', 0);
|
93
|
+
listOrderingPage.steps.verifyOptionWithBoldTextInPreviewTab(0);
|
94
|
+
listOrderingPage.steps.verifyOptionWithEquationTextInPreviewTab(1);
|
95
|
+
listOrderingPage.steps.verifyOptionWithImageInPreviewTab(2);
|
96
|
+
listOrderingPage.steps.verifyTextContentOfOptionInPreviewTab('alpha', 3);
|
97
|
+
});
|
98
|
+
} else if (view === 'Grading view') {
|
99
|
+
it(`The order of the responses should be as per the submitted response`, () => {
|
100
|
+
listOrderingPage.steps.verifyOptionWithBoldTextInGradingView(0);
|
101
|
+
listOrderingPage.steps.verifyOptionWithEquationTextInGradingView(1);
|
102
|
+
listOrderingPage.steps.verifyOptionWithImageInGradingView(2);
|
103
|
+
listOrderingPage.steps.verifyTextContentOfOptionInGradingView('alpha', 3);
|
104
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('This is a bold option');
|
105
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('Solve the following');
|
106
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('Fox');
|
107
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('alpha');
|
108
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
109
|
+
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
110
|
+
});
|
111
|
+
|
112
|
+
it('The order of the responses should not be editable', () => {
|
113
|
+
listOrderingPage.steps.clickAndReorderOptionInGradingView('This is a bold option', 2);
|
114
|
+
listOrderingPage.steps.verifyOptionWithBoldTextInGradingView(0);
|
115
|
+
listOrderingPage.steps.verifyOptionWithEquationTextInGradingView(1);
|
116
|
+
listOrderingPage.steps.verifyOptionWithImageInGradingView(2);
|
117
|
+
listOrderingPage.steps.verifyTextContentOfOptionInGradingView('alpha', 3);
|
118
|
+
});
|
119
|
+
} else {
|
120
|
+
it('The order of the options should be as per the correct answer order', () => {
|
121
|
+
listOrderingPage.steps.verifyOptionWithBoldTextInGradingView(0);
|
122
|
+
listOrderingPage.steps.verifyOptionWithEquationTextInGradingView(1);
|
123
|
+
listOrderingPage.steps.verifyOptionWithImageInGradingView(2);
|
124
|
+
listOrderingPage.steps.verifyTextContentOfOptionInGradingView('alpha', 3);
|
125
|
+
});
|
126
|
+
}
|
127
|
+
|
128
|
+
it('CSS of preview contents', { tags: 'css' }, () => {
|
129
|
+
switch (view) {
|
130
|
+
case 'Question preview':
|
131
|
+
case 'Item preview':
|
132
|
+
case 'Item view':
|
133
|
+
case 'Item preview':
|
134
|
+
case 'Student view':
|
135
|
+
utilities.verifyCSS(listOrderingPage.optionPreviewTab(), {
|
136
|
+
'background-color': css.color.defaultBackground,
|
137
|
+
'border': `1px solid ${css.color.draggableOptionBorder}`
|
138
|
+
});
|
139
|
+
utilities.verifyCSS(listOrderingPage.optionPreviewTab().find('.question-text-wrapper'), {
|
140
|
+
'color': css.color.text,
|
141
|
+
'font-size': css.fontSize.default,
|
142
|
+
'font-weight': css.fontWeight.regular
|
143
|
+
});
|
144
|
+
utilities.verifyCSS(listOrderingPage.optionPreviewTab().find('.question-text-wrapper'), {
|
145
|
+
'color': css.color.text,
|
146
|
+
'font-size': css.fontSize.default,
|
147
|
+
'font-weight': css.fontWeight.regular
|
148
|
+
});
|
149
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingPage.optionPreviewTab(), 1).find('.drag-icon-button path').eq(1), {
|
150
|
+
'color': css.color.secondaryBtn
|
151
|
+
});
|
152
|
+
break;
|
153
|
+
case 'Grading view':
|
154
|
+
utilities.verifyCSS(listOrderingPage.optionWrapperGradingView(), {
|
155
|
+
'background-color': css.color.defaultBackground,
|
156
|
+
'border': `1px solid ${css.color.draggableOptionBorder}`
|
157
|
+
});
|
158
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingPage.optionGradingView(), 3).find('.question-text-wrapper'), {
|
159
|
+
'color': css.color.text,
|
160
|
+
'font-size': css.fontSize.default,
|
161
|
+
'font-weight': css.fontWeight.regular
|
162
|
+
});
|
163
|
+
utilities.verifyCSS(listOrderingPage.optionWrapperGradingView().find('[class*="IndexWrapper"]'), {
|
164
|
+
'color': css.color.text,
|
165
|
+
'font-size': css.fontSize.default,
|
166
|
+
'font-weight': css.fontWeight.regular
|
167
|
+
});
|
168
|
+
}
|
169
|
+
});
|
170
|
+
|
171
|
+
it('Accessibility of preview contents', { tags: 'a11y' }, () => {
|
172
|
+
cy.checkAccessibility(listOrderingPage.optionWrapperPreviewTab().parents('[class*="question-preview-wrapper"]'));
|
173
|
+
});
|
174
|
+
});
|
175
|
+
});
|
176
|
+
});
|
@@ -361,7 +361,7 @@ describe('Create Item page - Matching : Student view settings', () => {
|
|
361
361
|
it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
|
362
362
|
matchingPage.steps.switchToEditTab();
|
363
363
|
matchingPage.steps.expandMaxCheckAnswerAttemptsDropdown();
|
364
|
-
matchingPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('
|
364
|
+
matchingPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
|
365
365
|
matchingPage.steps.switchToPreviewTab();
|
366
366
|
matchingPage.steps.verifyCheckAnswerButtonEnabled();
|
367
367
|
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Petals', dropzoneIndex: 0 }]);
|
@@ -7,6 +7,7 @@ describe('Create item page - Multiple selection: All or nothing with alternative
|
|
7
7
|
cy.loginAs('admin');
|
8
8
|
});
|
9
9
|
|
10
|
+
//Need to update once - https://redmine.zeuslearning.com/issues/553666 is resolved
|
10
11
|
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
|
11
12
|
abortEarlySetup();
|
12
13
|
before(() => {
|
@@ -172,7 +172,7 @@ describe('Create item page - Multiple selection grid: Student view settings', ()
|
|
172
172
|
it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
|
173
173
|
multipleSelectionGridPage.steps.switchToEditTab();
|
174
174
|
multipleSelectionGridPage.steps.expandMaxCheckAnswerAttemptsDropdown();
|
175
|
-
multipleSelectionGridPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('
|
175
|
+
multipleSelectionGridPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
|
176
176
|
multipleSelectionGridPage.steps.switchToPreviewTab();
|
177
177
|
multipleSelectionGridPage.steps.verifyCheckAnswerButtonEnabled();
|
178
178
|
multipleSelectionGridPage.steps.selectOptionsInPreviewTab({ row: 1, column: 0 });
|