itemengine-cypress-automation 1.0.185-repoUpdate26April-b17eb46.0 → 1.0.185

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  3. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +8 -5
  6. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +28 -417
  7. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  8. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +1 -29
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  11. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  19. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  20. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -3
  21. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +0 -1
  23. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  24. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  25. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  26. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  27. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  28. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  29. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  30. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -11
  31. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  32. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  33. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  34. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +0 -1
  35. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  36. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  37. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +1 -57
  38. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  39. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  40. package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -2
  41. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  42. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -49
  43. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  44. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  45. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  46. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +1 -0
  47. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -0
  48. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +1 -0
  49. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
  50. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
  51. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +2 -1
  52. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +4 -5
  53. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +7 -6
  54. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  55. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  56. package/cypress/fixtures/constants.js +1 -1
  57. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  58. package/cypress/fixtures/theme/ilc.json +18 -20
  59. package/cypress/pages/audioPlayerPage.js +504 -274
  60. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  61. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  62. package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
  63. package/cypress/pages/components/commonComponents.js +0 -1
  64. package/cypress/pages/components/draggableOptionContainer.js +0 -1
  65. package/cypress/pages/components/equationEditorFlyout.js +2 -3
  66. package/cypress/pages/components/essayResponseCommonComponents.js +2 -8
  67. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -1
  68. package/cypress/pages/components/imageCanvasComponent.js +1 -2
  69. package/cypress/pages/components/index.js +0 -3
  70. package/cypress/pages/components/optionsWrapperComponent.js +2 -13
  71. package/cypress/pages/components/playbackControlsBaseComponent.js +13 -20
  72. package/cypress/pages/components/toolSettingsComponent.js +0 -6
  73. package/cypress/pages/contentBlocksPage.js +2 -18
  74. package/cypress/pages/createItemPage.js +8 -75
  75. package/cypress/pages/dialogBoxBase.js +2 -2
  76. package/cypress/pages/drawingResponsePage.js +4 -24
  77. package/cypress/pages/feedbackScalePage.js +0 -3
  78. package/cypress/pages/graphingPage.js +1 -19
  79. package/cypress/pages/gridFillPage.js +8 -25
  80. package/cypress/pages/index.js +1 -2
  81. package/cypress/pages/itemPreviewSettingsPage.js +0 -4
  82. package/cypress/pages/listOrderingPage.js +557 -435
  83. package/cypress/pages/matchingPage.js +1 -1
  84. package/cypress/pages/multipleSelectionPage.js +1 -23
  85. package/cypress/pages/numberLinePage.js +132 -1370
  86. package/cypress/pages/rulerPage.js +2 -6
  87. package/cypress/pages/textSelectionPage.js +23 -461
  88. package/package.json +1 -1
  89. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +0 -79
  90. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +0 -345
  91. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +0 -429
  92. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +0 -162
  93. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +0 -489
  94. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +0 -313
  95. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +0 -230
  96. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +0 -124
  97. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +0 -201
  98. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -216
  99. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -214
  100. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -251
  101. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +0 -52
  102. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +0 -128
  103. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -279
  104. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +0 -109
  105. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -278
  106. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -278
  107. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +0 -335
  108. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -250
  109. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +0 -161
  110. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -216
  111. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -252
  112. package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +0 -118
  113. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +0 -243
  114. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -128
  115. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +0 -155
  116. package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +0 -195
  117. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +0 -78
  118. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -194
  119. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +0 -176
  120. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +0 -112
  121. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +0 -244
  122. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +0 -181
  123. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +0 -33
  124. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +0 -46
  125. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +0 -696
  126. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -173
  127. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +0 -183
  128. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +0 -73
  129. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +0 -204
  130. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +0 -288
  131. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +0 -153
  132. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +0 -164
  133. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +0 -120
  134. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +0 -125
  135. package/cypress/e2e/ILC/TextSelection/headerSection.js +0 -73
  136. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +0 -179
  137. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +0 -89
  138. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +0 -436
  139. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +0 -277
  140. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +0 -222
  141. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +0 -260
  142. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +0 -380
  143. package/cypress/pages/components/layoutSectionComponent.js +0 -1191
  144. package/cypress/pages/components/numberLineCommonComponent.js +0 -36
  145. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +0 -46
  146. package/cypress/pages/numberLineLabelPage.js +0 -333
@@ -1,120 +0,0 @@
1
- import { itemPreviewPage, numberLineLabelPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view'];
5
- const views = utilities.getViews(previewContentViews);
6
- const css = Cypress.env('css');
7
- var itemReferenceID = "";
8
- const range = 20.75;
9
-
10
- describe('Create item page: Number line label - 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
- numberLineLabelPage.steps.navigateToCreateQuestion('Number line');
22
- cy.barsPreLoaderWait();
23
- numberLineLabelPage.steps.navigateToLabelNumberLineTab();
24
- numberLineLabelPage.steps.addTextInQuestionInstructionsInputField('Label the number line');
25
- numberLineLabelPage.steps.addLabel();
26
- cy.log('Add image to label input field')
27
- numberLineLabelPage.steps.focusInLabelInputField(0);
28
- numberLineLabelPage.steps.selectImageOptionFromCKEditorToolbar()
29
- numberLineLabelPage.steps.addImageToInputField();
30
- numberLineLabelPage.steps.enterTextInLabelInputField(0, 'Fox image');
31
- cy.log('Add bold text to label input field')
32
- numberLineLabelPage.steps.focusInLabelInputField(1);
33
- numberLineLabelPage.steps.selectBoldOptionFromCKEditorToolbar();
34
- numberLineLabelPage.steps.enterTextInLabelInputField(1, 'This is a bold option');
35
- cy.log('Add equation to label input field')
36
- numberLineLabelPage.steps.enterTextInLabelInputField(2, 'Solve the following');
37
- numberLineLabelPage.steps.focusInLabelInputField(2);
38
- numberLineLabelPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
39
- numberLineLabelPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
40
- numberLineLabelPage.steps.enterTextInLabelInputField(3, 'This is a normal text');
41
- numberLineLabelPage.steps.allotPoints(10);
42
- numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Fox image', 'horizontal', range, 0);
43
- numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [0]);
44
- numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Solve the following', 'horizontal', range, 9);
45
- numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [9]);
46
- numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('This is a bold option', 'horizontal', range, -9);
47
- numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [-9]);
48
- numberLineLabelPage.steps.switchToPreviewTab();
49
- break;
50
- case 'Item view':
51
- cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
52
- break;
53
- case 'Item preview':
54
- cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
55
- numberLineLabelPage.steps.switchToPreviewTab();
56
- break;
57
- case 'Student view':
58
- cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
59
- cy.log('Adding wait because number line wasn\'t loaded properly')
60
- cy.wait(4000);
61
- break;
62
- default:
63
- throw new Error('Invalid view');
64
- }
65
- });
66
-
67
- after(() => {
68
- if (view === 'Question preview') {
69
- numberLineLabelPage.steps.clickOnSaveQuestionButton();
70
- utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
71
- itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
72
- }
73
- });
74
-
75
- it('Question instructions should be visible and number line should be displayed', () => {
76
- utilities.verifyInnerText(numberLineLabelPage.questionInstructionsText(), 'Label the number line');
77
- utilities.verifyElementVisibilityState(numberLineLabelPage.questionInstructionsText(), 'visible');
78
- utilities.verifyElementVisibilityState(numberLineLabelPage.numberLinePreviewTab(), 'visible');
79
- });
80
-
81
- it(`When the user has added image, bold text and equation to the label input they should be displayed in the ${view}`, () => {
82
- numberLineLabelPage.steps.verifyImageInPreviewTab(0);
83
- numberLineLabelPage.steps.verifyBoldTextInPreviewTab(1);
84
- numberLineLabelPage.steps.verifyEquationTextInPreviewTab(2);
85
- numberLineLabelPage.steps.verifyLabelTextContentPreviewTab(3, 'This is a normal text');
86
- });
87
-
88
- it('User should be able to drag and drop image, bold text and equation options on the number line', () => {
89
- numberLineLabelPage.steps.clickAndDropLabelOnNumberLinePreviewTab('Fox image', 'horizontal', range, 0);
90
- numberLineLabelPage.steps.clickAndDropLabelOnNumberLinePreviewTab('Solve the following', 'horizontal', range, 9);
91
- numberLineLabelPage.steps.clickAndDropLabelOnNumberLinePreviewTab('This is a bold option', 'horizontal', range, -9);
92
- });
93
-
94
- it('The labels on the plotted points should be displayed on the number line', () => {
95
- numberLineLabelPage.steps.verifyPointsPlottedOnNumberLinePreviewTab(range, [0]);
96
- numberLineLabelPage.steps.verifyPointsPlottedOnNumberLinePreviewTab(range, [9]);
97
- numberLineLabelPage.steps.verifyPointsPlottedOnNumberLinePreviewTab(range, [-9]);
98
- });
99
-
100
- it('The user should be able to change the plotted label on the number line', () => {
101
- numberLineLabelPage.steps.clickAndDropLabelOnNumberLinePreviewTab('Solve the following', 'horizontal', range, 7);
102
- numberLineLabelPage.steps.verifyPointsPlottedOnNumberLinePreviewTab(range, [7]);
103
- numberLineLabelPage.steps.verifyPointsNotExistOnNumberLinePreviewTab(range, [9]);
104
- });
105
-
106
- it('CSS of number line label', { tags: 'css' }, () => {
107
- utilities.verifyCSS(numberLineLabelPage.draggableLabelsPreviewTab(), {
108
- 'color': css.color.primaryBtn,
109
- 'background-color': css.color.primaryBtnBg,
110
- 'font-size': css.fontSize.default,
111
- 'font-weight': css.fontWeight.regular
112
- });
113
- });
114
-
115
- it('Accessibility of number line label', { tags: 'a11y' }, () => {
116
- cy.checkAccessibility(numberLineLabelPage.numberLinePreviewTab().parents('.ngie-jxgbox'));
117
- });
118
- });
119
- });
120
- });
@@ -1,125 +0,0 @@
1
- import { textSelectionPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
-
5
- const fontSizeDropdownOptions = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
6
- const fontSizes = ['12px', '14px', '16px', '18px', '22px', '26px'];
7
- const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.'];
8
-
9
- describe('Create Item page - Text selection : Additional settings', () => {
10
- before(() => {
11
- cy.loginAs('admin');
12
- });
13
-
14
- describe('Additional Settings accordion', () => {
15
- abortEarlySetup();
16
- before(() => {
17
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
18
- cy.barsPreLoaderWait();
19
- });
20
-
21
- textSelectionPage.tests.verifyAdditionalSettingsAccordionProperties();
22
- });
23
-
24
- describe('Additional settings: Font size contents', () => {
25
- abortEarlySetup();
26
- before(() => {
27
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
28
- cy.barsPreLoaderWait();
29
- textSelectionPage.steps.expandAdditionalSettings();
30
- });
31
-
32
- textSelectionPage.tests.verifyFontSizeSectionContents();
33
- });
34
-
35
- describe('Additional settings: Font size functionality edit tab', () => {
36
- abortEarlySetup();
37
- before(() => {
38
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
39
- cy.barsPreLoaderWait();
40
- textSelectionPage.steps.expandAdditionalSettings();
41
- textSelectionPage.steps.clearQuestionInputField();
42
- paragraphTextArray.forEach((paragraphText) => {
43
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
44
- });
45
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
46
- });
47
-
48
- fontSizeDropdownOptions.forEach((option, fontsIndex) => {
49
- it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the edit tab should change to ${option} accordingly`, () => {
50
- textSelectionPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontSizeDropdownOptions[fontsIndex]);
51
- utilities.verifyInnerText(textSelectionPage.fontSizeDropdown(), `${option}`);
52
- utilities.verifyCSS(textSelectionPage.specifyCorrectAnswerTextParagraphs(), {
53
- 'font-size': fontSizes[fontsIndex]
54
- });
55
- });
56
- });
57
- });
58
-
59
- describe('Additional settings: Font size functionality preview tab', () => {
60
- abortEarlySetup();
61
- before(() => {
62
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
63
- cy.barsPreLoaderWait();
64
- textSelectionPage.steps.expandAdditionalSettings();
65
- textSelectionPage.steps.clearQuestionInputField();
66
- paragraphTextArray.forEach((paragraphText) => {
67
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
68
- });
69
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
70
- textSelectionPage.steps.switchTextSelectionMode('Paragraph');
71
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
72
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
73
- textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
74
- textSelectionPage.steps.allotPoints(5);
75
- });
76
-
77
- fontSizeDropdownOptions.forEach((option, fontsIndex) => {
78
- it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${option} accordingly`, () => {
79
- textSelectionPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontSizeDropdownOptions[fontsIndex]);
80
- utilities.verifyInnerText(textSelectionPage.fontSizeDropdown(), `${option}`);
81
- textSelectionPage.steps.switchToPreviewTab();
82
- utilities.verifyCSS(textSelectionPage.questionInstructionsText(), {
83
- 'font-size': fontSizes[fontsIndex]
84
- });
85
- utilities.verifyCSS(textSelectionPage.previewTabQuestionTextParagraphs(), {
86
- 'font-size': fontSizes[fontsIndex]
87
- });
88
- textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
89
- textSelectionPage.steps.switchToGradingView();
90
- utilities.verifyCSS(textSelectionPage.correctAnswersLabel(), {
91
- 'font-size': fontSizes[fontsIndex]
92
- });
93
- utilities.verifyCSS(textSelectionPage.optionCorrectAnswerSection(), {
94
- 'font-size': fontSizes[fontsIndex]
95
- });
96
- utilities.verifyCSS(textSelectionPage.correctIncorrectAnswerLabel(), {
97
- 'font-size': fontSizes[fontsIndex]
98
- });
99
- textSelectionPage.steps.switchToEditTab();
100
- });
101
- });
102
- });
103
-
104
- describe('Additional settings: Accessibility section', () => {
105
- abortEarlySetup();
106
- before(() => {
107
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
108
- cy.barsPreLoaderWait();
109
- textSelectionPage.steps.expandAdditionalSettings();
110
- });
111
-
112
- textSelectionPage.tests.verifyAdditionalSettingsAccessibilitySection();
113
- });
114
-
115
- describe('Additional Settings: Details section', () => {
116
- abortEarlySetup();
117
- before(() => {
118
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
119
- cy.barsPreLoaderWait();
120
- textSelectionPage.steps.expandAdditionalSettings();
121
- });
122
-
123
- textSelectionPage.tests.verifyDetailsSection();
124
- });
125
- });
@@ -1,73 +0,0 @@
1
- import abortEarlySetup from "../../../support/helpers/abortEarly";
2
- import { dialogBoxBase, textSelectionPage } from "../../../pages";
3
- const options = ['Bat', 'Eagle'];
4
-
5
- describe('Create item page - Text selection: Header section and Saving question', () => {
6
- before(() => {
7
- cy.loginAs('admin');
8
- });
9
-
10
- describe('Header section contents', () => {
11
- abortEarlySetup();
12
- before(() => {
13
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
14
- });
15
-
16
- textSelectionPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Text selection');
17
- });
18
-
19
- describe('Tabs section', () => {
20
- abortEarlySetup();
21
- before(() => {
22
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
23
- });
24
-
25
- textSelectionPage.tests.verifyTabsSection();
26
- });
27
-
28
- describe('Cancel button', () => {
29
- abortEarlySetup();
30
- before(() => {
31
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
32
- });
33
-
34
- textSelectionPage.tests.verifyCancelButton('text selection')
35
- });
36
-
37
- describe('Save Question button', () => {
38
- abortEarlySetup();
39
- before(() => {
40
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
41
- cy.barsPreLoaderWait();
42
- });
43
-
44
- describe('Validation error messages', () => {
45
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
46
-
47
- it('Validation error messages should be displayed below required input fields', () => {
48
- textSelectionPage.steps.verifyQuestionInstructionsErrorMessage();
49
- textSelectionPage.steps.verifyPointsFieldErrorMessage();
50
- textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
51
- textSelectionPage.steps.verifySpecifyCorrectAnswerErrorMessage();
52
- });
53
-
54
- it('Validation error messages should disappear when required input fields are filled', () => {
55
- textSelectionPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
56
- textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Custom', 'Lorem');
57
- textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection('Lorem');
58
- textSelectionPage.steps.allotPoints(10);
59
- textSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
60
- textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
61
- });
62
-
63
- textSelectionPage.tests.verifyCreateItemWrapperContentsA11y();
64
- });
65
-
66
- describe('Saving a question', () => {
67
- it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
68
- textSelectionPage.steps.saveAQuestionAndVerifySnackbar();
69
- });
70
- textSelectionPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
71
- });
72
- });
73
- });
@@ -1,179 +0,0 @@
1
- import { textSelectionPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
- const grepTags = Cypress.env('grepTags');
6
-
7
- describe('Create Item page - Text selection: Question Instructions and Question section', () => {
8
- before(() => {
9
- cy.loginAs('admin');
10
- });
11
-
12
- describe('Question Instructions input field - Edit tab', () => {
13
- abortEarlySetup();
14
- before(() => {
15
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
16
- cy.barsPreLoaderWait();
17
- });
18
-
19
- textSelectionPage.tests.verifyQuestionInstructionsInputFieldEditTab();
20
- });
21
-
22
- describe('Question Instructions input field - Preview tab', () => {
23
- abortEarlySetup();
24
- before(() => {
25
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
26
- cy.barsPreLoaderWait();
27
- });
28
-
29
- textSelectionPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
30
- });
31
-
32
- describe('Question input field - Edit tab', () => {
33
- abortEarlySetup();
34
- before(() => {
35
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
36
- cy.barsPreLoaderWait();
37
- });
38
-
39
- it('\'Question\' label and input field should be displayed and by default in the question input field, sample \'Lorem Ipsum\' text should be present', () => {
40
- utilities.verifyInnerText(textSelectionPage.questionLabel(), 'Question');
41
- utilities.verifyInnerText(textSelectionPage.questionInputField(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n\n\n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n\n\n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
42
- });
43
-
44
- it('The default sample \'Lorem Ipsum\' text in the question input field should also be displayed in specify possible options section and specify correct answer section in the edit tab.', () => {
45
- utilities.verifyInnerText(textSelectionPage.specifyPossibleOptionsTextFieldWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
46
- utilities.verifyInnerText(textSelectionPage.specifyCorrectAnswerTextWrapper(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
47
- });
48
-
49
- it('When the user removes all the text from the question input field and focuses out of it, an error message \'Error: Question is required.\' should be displayed', () => {
50
- textSelectionPage.steps.clearQuestionInputField();
51
- textSelectionPage.steps.focusOutOfQuestionInputField();
52
- utilities.verifyInnerText(textSelectionPage.errorMessage(), 'Error: Question is required.');
53
- textSelectionPage.steps.verifyErroredStateOfQuestionInputField();
54
- });
55
-
56
- textSelectionPage.tests.verifyErrorMessageCSSAndA11y();
57
-
58
- it('The user should be able to give input in the question input field, then the error message should disappear', () => {
59
- cy.log('Add Image to Question input field')
60
- textSelectionPage.steps.focusInQuestionInputField();
61
- textSelectionPage.steps.selectImageOptionFromCKEditorToolbar();
62
- textSelectionPage.steps.addImageToInputField();
63
- textSelectionPage.steps.verifyImageAndAltTextInQuestionInputField();
64
- textSelectionPage.steps.addInputToQuestionInputField('{enter}');
65
- cy.log('Add equation to Question input field')
66
- textSelectionPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
67
- textSelectionPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
68
- textSelectionPage.steps.verifyEquationInQuestionInputField();
69
- textSelectionPage.steps.addInputToQuestionInputField('{rightarrow}{enter}');
70
- cy.log('Add bold text to input field')
71
- textSelectionPage.steps.focusInQuestionInputField();
72
- textSelectionPage.steps.selectBoldOptionFromCKEditorToolbar();
73
- textSelectionPage.steps.addInputToQuestionInputField('This is Bold text input.');
74
- textSelectionPage.steps.verifyBoldTextInQuestionInputField();
75
- textSelectionPage.steps.addInputToQuestionInputField('{enter}');
76
- cy.log('Add link to Question input field')
77
- textSelectionPage.steps.selectLinkOptionFromCKEditorToolbar();
78
- textSelectionPage.steps.addLinkToInputField();
79
- textSelectionPage.steps.verifyLinkInQuestionInputField();
80
- utilities.verifyElementVisibilityState(textSelectionPage.errorMessage(), 'notExist');
81
- textSelectionPage.steps.focusOutOfQuestionInputField();
82
- });
83
-
84
- it('CSS of Question label and Question input field contents', { tags: 'css' }, () => {
85
- utilities.verifyCSS(textSelectionPage.questionLabel(), {
86
- 'color': css.color.sectionHeading,
87
- 'font-size': css.fontSize.normal,
88
- 'font-weight': css.fontWeight.semibold
89
- });
90
- utilities.verifyCSS(textSelectionPage.questionInputField(), {
91
- 'color': css.color.text,
92
- 'font-size': css.fontSize.default,
93
- 'font-weight': css.fontWeight.regular,
94
- 'border': `1px solid ${css.color.figDefaultComponentBorder}`
95
- });
96
- utilities.verifyCSS(textSelectionPage.questionInputField().find('a'), {
97
- 'color': css.color.linkText,
98
- 'font-size': css.fontSize.default,
99
- 'font-weight': css.fontWeight.bold
100
- });
101
- });
102
-
103
- it('Image, equation, bold text and link added in Question input field should be properly displayed in specify possible options section', () => {
104
- textSelectionPage.steps.verifyImageAndAltTextInSpecifyPossibleOptionsSection();
105
- textSelectionPage.steps.verifyEquationInSpecifyPossibleOptionsSection();
106
- textSelectionPage.steps.verifyBoldTextInSpecifyPossibleOptionsSection();
107
- textSelectionPage.steps.verifyLinkInSpecifyPossibleOptionsSection();
108
- });
109
-
110
- it('Image, equation, bold text and link added in Question input field should be properly displayed in specify correct answer section', () => {
111
- textSelectionPage.steps.verifyImageAndAltTextInSpecifyCorrectAnswerSection();
112
- textSelectionPage.steps.verifyEquationInSpecifyCorrectAnswerSection();
113
- textSelectionPage.steps.verifyBoldTextInSpecifyCorrectAnswerSection();
114
- textSelectionPage.steps.verifyLinkInSpecifyCorrectAnswerSection();
115
- });
116
- });
117
-
118
- describe('Question field - Preview tab', () => {
119
- abortEarlySetup();
120
- before(() => {
121
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
122
- cy.barsPreLoaderWait();
123
- });
124
-
125
- it('In Preview tab, the sample \'Lorem Ipsum\' text should be displayed in the question field', () => {
126
- textSelectionPage.steps.switchToPreviewTab()
127
- utilities.verifyInnerText(textSelectionPage.questionTextWrapperPreviewTab(), 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n\n \n\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n\n \n\nExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
128
- });
129
-
130
- it('The user should be able to edit text in the question input field and the updated question should be displayed in the preview tab', () => {
131
- cy.log('Switching to edit tab')
132
- textSelectionPage.steps.switchToEditTab();
133
- textSelectionPage.steps.clearQuestionInputField();
134
- cy.log('Add Image to Question input field')
135
- textSelectionPage.steps.focusInQuestionInputField();
136
- textSelectionPage.steps.selectImageOptionFromCKEditorToolbar();
137
- textSelectionPage.steps.addImageToInputField();
138
- textSelectionPage.steps.verifyImageAndAltTextInQuestionInputField();
139
- textSelectionPage.steps.addInputToQuestionInputField('{enter}');
140
- cy.log('Add equation to Question input field')
141
- textSelectionPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
142
- textSelectionPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
143
- textSelectionPage.steps.verifyEquationInQuestionInputField();
144
- textSelectionPage.steps.addInputToQuestionInputField('{rightarrow}{enter}');
145
- cy.log('Add bold text to input field')
146
- textSelectionPage.steps.focusInQuestionInputField();
147
- textSelectionPage.steps.selectBoldOptionFromCKEditorToolbar();
148
- textSelectionPage.steps.addInputToQuestionInputField('This is Bold text input.');
149
- textSelectionPage.steps.verifyBoldTextInQuestionInputField();
150
- textSelectionPage.steps.addInputToQuestionInputField('{enter}');
151
- cy.log('Add link to Question input field')
152
- textSelectionPage.steps.selectLinkOptionFromCKEditorToolbar();
153
- textSelectionPage.steps.addLinkToInputField();
154
- textSelectionPage.steps.verifyLinkInQuestionInputField();
155
- utilities.verifyElementVisibilityState(textSelectionPage.errorMessage(), 'notExist');
156
- textSelectionPage.steps.focusOutOfQuestionInputField();
157
- cy.log('Switching to preview tab')
158
- textSelectionPage.steps.switchToPreviewTab();
159
- textSelectionPage.steps.verifyImageAndAltTextInPreviewTab();
160
- textSelectionPage.steps.verifyEquationInPreviewTab();
161
- textSelectionPage.steps.verifyBoldTextInPreviewTab();
162
- textSelectionPage.steps.verifyLinkInPreviewTab();
163
- });
164
-
165
- //Failing due to https://redmine.zeuslearning.com/issues/537907
166
- it('CSS of \'Preview tab\' when image, equation, bold text and link are added', { tags: 'css' }, () => {
167
- utilities.verifyCSS(textSelectionPage.questionTextWrapperPreviewTab().find('strong'), {
168
- 'color': css.color.text,
169
- 'font-size': css.fontSize.default,
170
- 'font-weight': css.fontWeight.bold
171
- });
172
- utilities.verifyCSS(textSelectionPage.questionTextWrapperPreviewTab().find('a'), {
173
- 'color': css.color.linkText,
174
- 'font-size': css.fontSize.default,
175
- 'font-weight': css.fontWeight.bold
176
- });
177
- });
178
- });
179
- });
@@ -1,89 +0,0 @@
1
- import { textSelectionPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
-
5
- const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.'];
6
-
7
- describe('Create Item page - Text selection: Specify correct answer, Alternative correct answer', () => {
8
- before(() => {
9
- cy.loginAs('admin');
10
- });
11
-
12
- describe('Specify correct answer section - \'Correct\' accordion', () => {
13
- abortEarlySetup();
14
- before(() => {
15
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
16
- cy.barsPreLoaderWait();
17
- textSelectionPage.steps.addTextInQuestionInstructionsInputField('Select text from the given paragraph');
18
- textSelectionPage.steps.clearQuestionInputField();
19
- paragraphTextArray.forEach((paragraphText) => {
20
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
21
- });
22
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
23
- textSelectionPage.steps.switchTextSelectionMode('Paragraph');
24
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
25
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
26
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
27
- });
28
-
29
- textSelectionPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('text selection');
30
-
31
- it('In the \'Correct\' accordion the question field text should be displayed and the options should be available as set in \'Specify possible options\' section', () => {
32
- textSelectionPage.steps.verifySpecifyCorrectAnswerTextAndOptions(paragraphTextArray, [paragraphTextArray[0], paragraphTextArray[1], paragraphTextArray[2]]);
33
- });
34
-
35
- textSelectionPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
36
- });
37
-
38
- describe('Specify correct answer section - \'Alternative\' accordion', () => {
39
- abortEarlySetup();
40
- before(() => {
41
- textSelectionPage.steps.navigateToCreateQuestion('text selection');
42
- cy.barsPreLoaderWait();
43
- textSelectionPage.steps.addTextInQuestionInstructionsInputField('Select text from the given paragraph');
44
- textSelectionPage.steps.clearQuestionInputField();
45
- paragraphTextArray.forEach((paragraphText) => {
46
- textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
47
- });
48
- textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
49
- textSelectionPage.steps.switchTextSelectionMode('Paragraph');
50
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
51
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
52
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
53
- });
54
-
55
- textSelectionPage.tests.verifyAutoScoredAddAlternativeAnswerButtonAndValidation('text selection');
56
-
57
- it('When user has added points and set correct answers in the \'Correct\' accordion, then the user should be able to add alternative answer for the question using \'Add alternative answer\' button', () => {
58
- textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
59
- textSelectionPage.steps.allotPoints(20);
60
- textSelectionPage.steps.addAlternativeAnswerAccordion(1);
61
- });
62
-
63
- it('In the \'Alternate\' accordion the question field text should be displayed and the options should be available as set in \'Specify possible options\' section', () => {
64
- textSelectionPage.steps.verifySpecifyCorrectAnswerTextAndOptions(paragraphTextArray, [paragraphTextArray[0], paragraphTextArray[1], paragraphTextArray[2]]);
65
- });
66
-
67
- textSelectionPage.tests.verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Alternative');
68
-
69
- 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\'', () => {
70
- textSelectionPage.steps.addAlternativeAnswerAccordion(2);
71
- });
72
-
73
- textSelectionPage.tests.verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion();
74
-
75
- 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', () => {
76
- cy.log('Set correct answer and points in alternative 2 accordion, then switch to alternative 1 accordion and click delete icon button');
77
- textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
78
- textSelectionPage.steps.allotPoints(5);
79
- textSelectionPage.steps.deleteAlternativeAnswerAccordion(1);
80
- textSelectionPage.steps.verifyAlternativeAnswerAccordionNotExists(2);
81
- textSelectionPage.steps.verifyAlternativeAnswerAccordionLabel(0);
82
- });
83
-
84
- it('When the user deselects an option assigned as correct in the correct accordion then the correct accordion should be in the expanded state', () => {
85
- textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
86
- textSelectionPage.steps.verifyCorrectAnswerAccordionIsExpanded();
87
- });
88
- });
89
- });