itemengine-cypress-automation 1.0.182-repoUpdate22April-92d01da.0 → 1.0.182

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  2. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +5 -4
  3. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +3 -64
  4. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  5. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  6. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  7. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +1 -29
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  10. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  19. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -3
  20. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +0 -1
  22. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  23. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  24. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  25. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  26. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  27. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  28. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  29. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  30. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  31. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +0 -1
  32. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  33. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  34. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  35. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  36. package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -2
  37. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  38. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -49
  39. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  40. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  41. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  42. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +1 -0
  43. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -0
  44. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +1 -0
  45. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
  46. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
  47. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +1 -0
  48. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +4 -5
  49. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +2 -2
  50. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  51. package/cypress/fixtures/constants.js +1 -1
  52. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  53. package/cypress/fixtures/theme/ilc.json +16 -16
  54. package/cypress/pages/audioPlayerPage.js +543 -55
  55. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  56. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  57. package/cypress/pages/components/autoScoredStudentViewSettings.js +4 -4
  58. package/cypress/pages/components/commonComponents.js +0 -1
  59. package/cypress/pages/components/draggableOptionContainer.js +0 -1
  60. package/cypress/pages/components/equationEditorFlyout.js +2 -3
  61. package/cypress/pages/components/essayResponseCommonComponents.js +2 -8
  62. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -1
  63. package/cypress/pages/components/imageCanvasComponent.js +1 -2
  64. package/cypress/pages/components/index.js +0 -1
  65. package/cypress/pages/components/optionsWrapperComponent.js +0 -11
  66. package/cypress/pages/components/toolSettingsComponent.js +0 -6
  67. package/cypress/pages/contentBlocksPage.js +2 -2
  68. package/cypress/pages/createItemPage.js +0 -29
  69. package/cypress/pages/dialogBoxBase.js +2 -2
  70. package/cypress/pages/drawingResponsePage.js +4 -23
  71. package/cypress/pages/feedbackScalePage.js +0 -3
  72. package/cypress/pages/graphingPage.js +0 -18
  73. package/cypress/pages/gridFillPage.js +2 -18
  74. package/cypress/pages/index.js +1 -1
  75. package/cypress/pages/itemPreviewSettingsPage.js +0 -4
  76. package/cypress/pages/listOrderingPage.js +647 -122
  77. package/cypress/pages/matchingPage.js +1 -1
  78. package/cypress/pages/multipleSelectionPage.js +1 -23
  79. package/cypress/pages/numberLinePage.js +59 -1196
  80. package/cypress/pages/rulerPage.js +2 -6
  81. package/cypress/pages/textSelectionPage.js +22 -460
  82. package/package.json +1 -1
  83. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +0 -162
  84. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -216
  85. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -214
  86. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -251
  87. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +0 -52
  88. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +0 -243
  89. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -128
  90. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +0 -176
  91. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +0 -530
  92. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +0 -119
  93. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +0 -263
  94. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +0 -125
  95. package/cypress/e2e/ILC/TextSelection/headerSection.js +0 -73
  96. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.smoke.js +0 -179
  97. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +0 -89
  98. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +0 -436
  99. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +0 -277
  100. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +0 -222
  101. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +0 -260
  102. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +0 -380
  103. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +0 -46
@@ -1,128 +0,0 @@
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
- });
@@ -1,176 +0,0 @@
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
- });