itemengine-cypress-automation 1.0.69 → 1.0.70

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +2 -2
  2. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +1 -1
  3. package/cypress/e2e/ILC/EssayResponse/essayResponseScoringSection.js +2 -2
  4. package/cypress/e2e/ILC/FeedbackScale/feedbackScaleAdditionalSettingsBasic.js +8 -9
  5. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedOptionsPartialEqualWeightsWithAlternateAnswer.js +0 -4
  6. package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +2 -0
  7. package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingScoring.js +2 -0
  8. package/cypress/e2e/ILC/Highlight/{highlightBasicScoringForTextSelectionTypes.js → HighlightScoring/highlightBasicScoringForTextSelectionTypes.js} +1 -1
  9. package/cypress/e2e/ILC/Highlight/HighlightScoring/{manualAndNonScored.js → manuallyAndNonScored.js} +1 -1
  10. package/cypress/e2e/ILC/Highlight/HighlightScoring/{partialDifferentWeightsCorrectEqualToAlternatePoints.js → partialDifferentWeightsCorrectPointsEqualToAlternatePoints.js} +2 -0
  11. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsScoring.js +7 -2
  12. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsCorrectPointEqualToAlternatePoints.js +2 -0
  13. package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsScoring.js +6 -1
  14. package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsBasic.js +2 -3
  15. package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsMaximumNumberOfAnswers.js +0 -2
  16. package/cypress/e2e/ILC/Highlight/highlightEditTabScoringSection.js +4 -3
  17. package/cypress/e2e/ILC/HighlightImage/highlightImageAdditionalSettings.js +4 -4
  18. package/cypress/e2e/ILC/HighlightImage/highlightImageAdditionalSettingsBasic.js +4 -10
  19. package/cypress/e2e/ILC/HighlightImage/highlightImageAllOrNothingScoring.js +3 -3
  20. package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabScoring.js +9 -5
  21. package/cypress/e2e/ILC/HighlightImage/highlightImageManuallyAndNonScoredScoring.js +1 -1
  22. package/cypress/e2e/ILC/HighlightImage/highlightImagePartialDifferentWeightsScoring.js +14 -15
  23. package/cypress/e2e/ILC/HighlightImage/highlightImagePartialDifferentWeightsWithAlternateAnswer.js +0 -3
  24. package/cypress/e2e/ILC/HighlightImage/highlightImagePartialEqualWeightsScoring.js +14 -14
  25. package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +60 -66
  26. package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +84 -109
  27. package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +4 -18
  28. package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +119 -150
  29. package/cypress/e2e/ILC/UploadResponse/uploadResponseScoringSection.js +2 -2
  30. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +110 -164
  31. package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettings.js +1 -1
  32. package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettingsBasic.js +11 -12
  33. package/cypress/e2e/ILC/VideoResponse/videoResponsePreviewTab.js +6 -5
  34. package/package.json +1 -1
@@ -64,7 +64,7 @@ describe('Create question page - Essay Response: Additional Settings', () => {
64
64
  cy.log('checking update in word count after removing a word from predefined text')
65
65
  essayResponsePage.responseField()
66
66
  .type('{backspace}{backspace}{backspace}{backspace}{backspace}')
67
- .should('have.text', 'Lorem Ipsum dolor sit ');
67
+ .should('have.text', 'Lorem Ipsum dolor sit');
68
68
  essayResponsePage.steps.verifyResponseFieldWordCount('4/5');
69
69
  essayResponsePage.wordLimitReachedWarningMessage()
70
70
  .should('not.exist');
@@ -338,7 +338,7 @@ describe('Create question page - Essay Response: Additional Settings', () => {
338
338
  });
339
339
 
340
340
  it('Accessibility of \'hyperlink\' text in the response field', { tags: 'a11y' }, () => {
341
- cy.checkAccessibility(essayResponsePage.responseField());
341
+ cy.checkAccessibility(essayResponsePage.previewTabQuestionWrapper());
342
342
  });
343
343
 
344
344
  it('When the user enables the \'Disable automatic hyperlinking\' functionality, then even if the user types any link text in the response field in the preview tab, it should appear as a plain text', () => {
@@ -90,7 +90,7 @@ describe('Create question page - Essay Response: Additional Settings basic', ()
90
90
  essayResponsePage.steps.expandAdditonalSettings();
91
91
  essayResponsePage.steps.setWordLimit(2);
92
92
  });
93
- const fontsizes = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
93
+ const fontsizes = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
94
94
  const font = ['16px', '12px', '14px', '17px', '20px', '24px'];
95
95
 
96
96
  essayResponsePage.tests.verifyFontSizeSectionContents();
@@ -35,7 +35,7 @@ describe('Create question page - Essay response: Scoring', () => {
35
35
  essayResponsePage.steps.switchToPreviewTab();
36
36
  });
37
37
 
38
- essayResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab()
38
+ essayResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab('Manually scored');
39
39
  });
40
40
 
41
41
  describe('Non Scored scoring type - Question creation page', () => {
@@ -54,6 +54,6 @@ describe('Create question page - Essay response: Scoring', () => {
54
54
  essayResponsePage.steps.switchToPreviewTab();
55
55
  });
56
56
 
57
- essayResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab()
57
+ essayResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab('Non scored')
58
58
  });
59
59
  });
@@ -2,6 +2,7 @@ import { feedbackScalePage } from "../../../pages/feedbackScalePage";
2
2
  import abortEarlySetup from "../../../support/helpers/abortEarly";
3
3
  import utilities from "../../../support/helpers/utilities";
4
4
  const css = Cypress.env('css');
5
+ const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
5
6
 
6
7
  describe('Create item page: Feedback scale: Additional settings', () => {
7
8
  before(() => {
@@ -54,8 +55,6 @@ describe('Create item page: Feedback scale: Additional settings', () => {
54
55
  });
55
56
 
56
57
  describe('Additional settings: Font size contents preview tab section', () => {
57
- const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
58
- const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
59
58
  const moreInfoFontSizes = { 'Default': '14px', 'Small': '12px', 'Normal': '14px', 'Large': '17px', 'Extra large': '20px', 'Huge': '24px' };
60
59
  abortEarlySetup();
61
60
  before(() => {
@@ -66,20 +65,20 @@ describe('Create item page: Feedback scale: Additional settings', () => {
66
65
  feedbackScalePage.steps.checkAllowStudentsToAddCommentCheckbox();
67
66
  });
68
67
 
69
- fontSizeDropdownOptions.forEach((option, fontsIndex) => {
70
- it(`When the user selects \'${option}\' option from the Font size dropdown, then font size of the preview contents should be changed to ${option} in the preview tab`, () => {
68
+ Object.keys(fontSizes).forEach((option, fontsIndex) => {
69
+ it(`When the user selects \'${option}\' option from the Font size dropdown, then font size of the preview contents should be changed to ${fontSizes[option]} in the preview tab`, () => {
71
70
  feedbackScalePage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex)
72
71
  utilities.verifyInnerText(feedbackScalePage.fontSizeDropdown(), `${option}`);
73
72
  feedbackScalePage.steps.switchToPreviewTab();
74
73
  utilities.verifyCSS(feedbackScalePage.questionInstructionsText(), {
75
- 'font-size': fontSizes[fontsIndex]
74
+ 'font-size': fontSizes[option]
76
75
  });
77
76
  utilities.verifyCSS(feedbackScalePage.feedbackButton(), {
78
- 'font-size': fontSizes[fontsIndex]
77
+ 'font-size': fontSizes[option]
79
78
  });
80
79
  feedbackScalePage.steps.hoverOnFeedBackButton();
81
80
  utilities.verifyCSS(feedbackScalePage.tooltipText(), {
82
- 'font-size': fontSizes[fontsIndex]
81
+ 'font-size': fontSizes[option]
83
82
  });
84
83
  feedbackScalePage.steps.hoverAwayFromFeedbackButton();
85
84
  utilities.verifyCSS(feedbackScalePage.moreInfoButton().find('.customize_info_label'), {
@@ -97,10 +96,10 @@ describe('Create item page: Feedback scale: Additional settings', () => {
97
96
  });
98
97
  //TODO: will need to update below assertions after https://redmine.zeuslearning.com/issues/539201 gets resolved
99
98
  utilities.verifyCSS(feedbackScalePage.describeYourExperienceLabel(), {
100
- 'font-size': fontSizes[fontsIndex]
99
+ 'font-size': fontSizes[option]
101
100
  });
102
101
  utilities.verifyCSS(feedbackScalePage.describeYourExperienceInputField(), {
103
- 'font-size': fontSizes[fontsIndex]
102
+ 'font-size': fontSizes[option]
104
103
  });
105
104
  feedbackScalePage.steps.switchToEditTab();
106
105
  });
@@ -40,8 +40,6 @@ describe('Create Item page - Fill in the Gaps: Drag and Drop - Grouped options l
40
40
  fillInTheGapsDragAndDropPage.steps.expandAdditonalSettings();
41
41
  fillInTheGapsDragAndDropPage.allowStudentsToCheckAnswerCheckbox()
42
42
  .click();
43
- fillInTheGapsDragAndDropPage.rounddownScoreCheckbox()
44
- .click();
45
43
  fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
46
44
  });
47
45
 
@@ -84,8 +82,6 @@ describe('Create Item page - Fill in the Gaps: Drag and Drop - Grouped options l
84
82
  fillInTheGapsDragAndDropPage.steps.expandAdditonalSettings();
85
83
  fillInTheGapsDragAndDropPage.allowStudentsToCheckAnswerCheckbox()
86
84
  .click();
87
- fillInTheGapsDragAndDropPage.rounddownScoreCheckbox()
88
- .click();
89
85
  fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
90
86
  });
91
87
 
@@ -29,6 +29,8 @@ describe('Create Item page - Highlight: Preview tab Scoring Section - All or not
29
29
  highlightPage.steps.allotPoints(20);
30
30
  highlightPage.steps.expandAdditonalSettings();
31
31
  highlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
32
+ highlightPage.steps.expandMinimumScoringDropdown();
33
+ highlightPage.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
32
34
  highlightPage.steps.switchToPreviewTab();
33
35
  });
34
36
 
@@ -62,6 +62,8 @@ describe('Create Item page - Highlight: Preview tab Scoring Section - All or not
62
62
  highlightPage.steps.allotPoints(20);
63
63
  highlightPage.steps.expandAdditonalSettings();
64
64
  highlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
65
+ highlightPage.steps.expandMinimumScoringDropdown();
66
+ highlightPage.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
65
67
  highlightPage.steps.switchToPreviewTab();
66
68
  });
67
69
 
@@ -1,4 +1,4 @@
1
- import { highlightPage } from "../../../pages";
1
+ import { highlightPage } from "../../../../pages";
2
2
  import abortEarlySetup from "../../../support/helpers/abortEarly";
3
3
 
4
4
  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.']
@@ -30,7 +30,7 @@ describe('Create Item page - Highlight - Manually and Non-scored', () => {
30
30
  highlightPage.steps.verifyOptionInPreviewTab(paragraphTextArray);
31
31
  });
32
32
 
33
- highlightPage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab();
33
+ highlightPage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab('Manually scored');
34
34
  });
35
35
 
36
36
  describe('Question Preview: Non scored', () => {
@@ -33,6 +33,8 @@ describe('Create item page - Highlight: Preview tab scoring section - Partial di
33
33
  highlightPage.steps.uncheckRoundDownScoreCheckbox();
34
34
  highlightPage.steps.expandAdditonalSettings();
35
35
  highlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
36
+ highlightPage.steps.expandMinimumScoringDropdown();
37
+ highlightPage.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
36
38
  highlightPage.steps.switchToPreviewTab();
37
39
  });
38
40
 
@@ -27,6 +27,8 @@ describe('Create item page - Highlight: Preview tab scoring section - Partial di
27
27
  highlightPage.steps.uncheckRoundDownScoreCheckbox();
28
28
  highlightPage.steps.expandAdditonalSettings();
29
29
  highlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
30
+ highlightPage.steps.expandMinimumScoringDropdown();
31
+ highlightPage.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
30
32
  highlightPage.steps.switchToPreviewTab();
31
33
  });
32
34
 
@@ -218,6 +220,8 @@ describe('Create item page - Highlight: Preview tab scoring section - Partial di
218
220
  highlightPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['6.2', '8.3']);
219
221
  highlightPage.steps.expandAdditonalSettings();
220
222
  highlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
223
+ highlightPage.steps.expandRoundingDropdown();
224
+ highlightPage.steps.selectOptionFromRoundingDropdownOption('round down if <= 0.99');
221
225
  highlightPage.steps.switchToPreviewTab();
222
226
  });
223
227
 
@@ -231,8 +235,9 @@ describe('Create item page - Highlight: Preview tab scoring section - Partial di
231
235
  });
232
236
 
233
237
  it('When the \'Round down score\' checkbox is not selected, then in Preview tab when user selects partially or fully correct answers the points should be displayed in decimal points if applicable as per the options selected by the user', () => {
234
- highlightPage.steps.switchToEditTab()
235
- highlightPage.steps.uncheckRoundDownScoreCheckbox()
238
+ highlightPage.steps.switchToEditTab();
239
+ highlightPage.steps.expandRoundingDropdown();
240
+ highlightPage.steps.selectOptionFromRoundingDropdownOption('none');
236
241
  highlightPage.steps.switchToPreviewTab();
237
242
  highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
238
243
  highlightPage.steps.verifyPreviewTabScoreText(6.2, 14.5);
@@ -31,6 +31,8 @@ describe('Create item page - Highlight: Preview tab scoring section - Partial eq
31
31
  highlightPage.steps.uncheckRoundDownScoreCheckbox();
32
32
  highlightPage.steps.expandAdditonalSettings();
33
33
  highlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
34
+ highlightPage.steps.expandMinimumScoringDropdown();
35
+ highlightPage.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
34
36
  highlightPage.steps.switchToPreviewTab();
35
37
  });
36
38
 
@@ -26,6 +26,8 @@ describe('Create item page - Highlight: Preview tab scoring section - Partial eq
26
26
  highlightPage.steps.selectPartialEqualWeightsCheckbox();
27
27
  highlightPage.steps.expandAdditonalSettings();
28
28
  highlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
29
+ highlightPage.steps.expandMinimumScoringDropdown();
30
+ highlightPage.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
29
31
  highlightPage.steps.switchToPreviewTab();
30
32
  });
31
33
 
@@ -199,6 +201,8 @@ describe('Create item page - Highlight: Preview tab scoring section - Partial eq
199
201
  highlightPage.steps.selectPartialEqualWeightsCheckbox();
200
202
  highlightPage.steps.expandAdditonalSettings();
201
203
  highlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
204
+ highlightPage.steps.expandRoundingDropdown();
205
+ highlightPage.steps.selectOptionFromRoundingDropdownOption('round down if <= 0.99');
202
206
  highlightPage.steps.switchToPreviewTab();
203
207
  });
204
208
 
@@ -213,7 +217,8 @@ describe('Create item page - Highlight: Preview tab scoring section - Partial eq
213
217
 
214
218
  it('When the \'Round down score\' checkbox is not selected, then in Preview tab when user selects partially or fully correct answers the points should be displayed in decimal points if applicable as per the options selected by the user', () => {
215
219
  highlightPage.steps.switchToEditTab()
216
- highlightPage.steps.uncheckRoundDownScoreCheckbox()
220
+ highlightPage.steps.expandRoundingDropdown();
221
+ highlightPage.steps.selectOptionFromRoundingDropdownOption('none');
217
222
  highlightPage.steps.switchToPreviewTab();
218
223
  highlightPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
219
224
  highlightPage.steps.verifyPreviewTabScoreText(7.25, 14.5);
@@ -1,11 +1,10 @@
1
1
  import { highlightPage } from "../../../pages/highlightPage";
2
2
  import abortEarlySetup from "../../../support/helpers/abortEarly";
3
3
  import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
4
 
6
5
  const paragraphTextArray = ['Horses cannot breath through their mouth. Cows can sleep standing up.', 'Dogs have excellent hearing.', 'Deers possess nearly 300 degree field of vision.'];
7
- const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
8
- const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
6
+ const fontSizeDropdownOptions = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
7
+ const fontSizes = ['12px', '14px', '16px', '18px', '22px', '26px'];
9
8
 
10
9
  describe('Create Item page - Highlight: Additional settings basic', () => {
11
10
  before(() => {
@@ -4,8 +4,6 @@ import utilities from "../../../support/helpers/utilities";
4
4
  const css = Cypress.env('css');
5
5
 
6
6
  const paragraphTextArray = ['Horses cannot breath through their mouth. Cows can sleep standing up.', 'Dogs have excellent hearing.', 'Deers possess nearly 300 degree field of vision.'];
7
- const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
8
- const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
9
7
 
10
8
  describe('Create Item page - Highlight: Additional settings - Maximum number of answers', () => {
11
9
  before(() => {
@@ -114,7 +114,8 @@ describe('Create item page - Highlight: Edit tab scoring types and set correct a
114
114
 
115
115
  it('Accessibility of \'Penalty Points\' and \'Minimum score awarded (if attempted)\' input field and \'Round down score\' checkbox', { tags: 'a11y' }, () => {
116
116
  cy.checkAccessibility(highlightPage.penaltyPointsInputField().parents('.points-container'));
117
- cy.checkAccessibility(highlightPage.rounddownScoreCheckbox().parents('[data-ngie-testid="round-down-score-checkbox"]'));
117
+ cy.checkAccessibility(highlightPage.minimumScoringDropdown());
118
+ cy.checkAccessibility(highlightPage.roundingDropdown());
118
119
  });
119
120
 
120
121
  it('When the user switches to \'All or nothing\' scoring, the \'Points per response\' label and the points displayed for individual responses should not be displayed and the points displayed in \'Points\' input field should remain unchanged', () => {
@@ -320,14 +321,14 @@ describe('Create item page - Highlight: Edit tab scoring types and set correct a
320
321
  highlightPage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored')
321
322
  });
322
323
 
323
- it('When the user has selected \'Manually Scored\' option from the Scoring Type dropdown then the \'Set Correct Answer\' section should not be displayed, \'All or Nothing\', \'Partial - equal weights\' and \'Partial - different weights\' radio buttons should not be displayed, \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed, round down score label and checkbox should not be displayed and inside Additional Settings accordion Check Answer section i.e. \'Allow students to check answer\' checkbox should not be displayed', () => {
324
+ it('When the user has selected \'Manually Scored\' option from the Scoring Type dropdown then the \'Set Correct Answer\' section should not be displayed, \'All or Nothing\', \'Partial - equal weights\' and \'Partial - different weights\' radio buttons should not be displayed, \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed, round down score label and checkbox should not be displayed and inside Additional Settings accordion Check Answer section i.e. \'Allow student to check answer\' checkbox should not be displayed', () => {
324
325
  utilities.verifyElementVisibilityState(highlightPage.setCorrectAnswerLabel(), 'notExist');
325
326
  utilities.verifyElementVisibilityState(highlightPage.allOrNothingCheckbox(), 'notExist');
326
327
  utilities.verifyElementVisibilityState(highlightPage.partialEqualWeightsCheckbox(), 'notExist');
327
328
  utilities.verifyElementVisibilityState(highlightPage.partialDifferentWeightsCheckbox(), 'notExist');
328
329
  utilities.verifyElementVisibilityState(highlightPage.penaltyPointsInputField(), 'notExist');
329
330
  utilities.verifyElementVisibilityState(highlightPage.penaltyPointsLabel(), 'notExist');
330
- utilities.verifyElementVisibilityState(highlightPage.rounddownScoreCheckbox(), 'notExist');
331
+ utilities.verifyElementVisibilityState(highlightPage.roundingDropdown(), 'notExist');
331
332
  utilities.verifyElementVisibilityState(highlightPage.rounddownScoreCheckboxLabel(), 'notExist');
332
333
  highlightPage.steps.verifyDefaultMinimumScoreIfAttemptedLabelAndPointsField();
333
334
  highlightPage.steps.expandAdditonalSettings()
@@ -9,12 +9,9 @@ let imageHeight = 500;
9
9
  const flowerHighlightRegion = [[24, 6], [24, 24], [56, 24], [56, 6]];
10
10
  const branchesHighlightRegion = [[36, 36], [36, 46], [58, 46], [58, 36]];
11
11
  const leafHighlightRegion = [[54, 48], [54, 72], [82, 72], [82, 48]];
12
- const rootsHighlightRegion = [[28, 84], [28, 98], [74, 98], [74, 84]];
13
12
  const numbers = ['1', '2'];
14
13
  const lowercase = ['a', 'b'];
15
14
  const uppercase = ['A', 'B'];
16
- const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
17
- const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
18
15
  const answerNumerationDropdownOptions = ['Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
19
16
 
20
17
  describe('Create Item page - Highlight image: Additional settings', () => {
@@ -47,7 +44,7 @@ describe('Create Item page - Highlight image: Additional settings', () => {
47
44
 
48
45
  //Note: a11y covered in verifyAdditonalSettingsAccordionProperties
49
46
  });
50
-
47
+
51
48
  describe('Additional settings: Answer numeration (only while grading) contents', () => {
52
49
  abortEarlySetup();
53
50
  before(() => {
@@ -117,6 +114,7 @@ describe('Create Item page - Highlight image: Additional settings', () => {
117
114
  highlightImagePage.steps.switchToPreviewTab();
118
115
  highlightImagePage.steps.checkShowCorrectAnswerCheckbox();
119
116
  highlightImagePage.steps.highlightARegionInPreviewTab(1);
117
+ highlightImagePage.steps.checkShowCorrectAnswerCheckbox();
120
118
  highlightImagePage.steps.verifyCorrectAnswerContainerNumeration(numbers);
121
119
  });
122
120
 
@@ -125,6 +123,7 @@ describe('Create Item page - Highlight image: Additional settings', () => {
125
123
  highlightImagePage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[1]}`);
126
124
  highlightImagePage.steps.switchToPreviewTab();
127
125
  highlightImagePage.steps.highlightARegionInPreviewTab(1);
126
+ highlightImagePage.steps.checkShowCorrectAnswerCheckbox();
128
127
  highlightImagePage.steps.verifyCorrectAnswerContainerNumeration(uppercase);
129
128
  });
130
129
 
@@ -133,6 +132,7 @@ describe('Create Item page - Highlight image: Additional settings', () => {
133
132
  highlightImagePage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[2]}`);
134
133
  highlightImagePage.steps.switchToPreviewTab();
135
134
  highlightImagePage.steps.highlightARegionInPreviewTab(1);
135
+ highlightImagePage.steps.checkShowCorrectAnswerCheckbox();
136
136
  highlightImagePage.steps.verifyCorrectAnswerContainerNumeration(lowercase);
137
137
  });
138
138
  });
@@ -4,18 +4,12 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
4
  import utilities from "../../../support/helpers/utilities";
5
5
  const css = Cypress.env('css');
6
6
 
7
- let imageWidth = 500;
8
- let imageHeight = 500;
9
7
  const flowerHighlightRegion = [[24, 6], [24, 24], [56, 24], [56, 6]];
10
8
  const branchesHighlightRegion = [[36, 36], [36, 46], [58, 46], [58, 36]];
11
9
  const leafHighlightRegion = [[54, 48], [54, 72], [82, 72], [82, 48]];
12
10
  const rootsHighlightRegion = [[28, 84], [28, 98], [74, 98], [74, 84]];
13
- const numbers = ['1', '2'];
14
- const lowercase = ['a', 'b'];
15
- const uppercase = ['A', 'B'];
16
- const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
17
- const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
18
- const answerNumerationDropdownOptions = ['Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
11
+ const fontSizeDropdownOptions = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
12
+ const fontSizes = ['12px', '14px', '16px', '18px', '22px', '26px'];
19
13
 
20
14
  describe('Create Item page - Highlight image: Additional settings', () => {
21
15
  before(() => {
@@ -67,10 +61,10 @@ describe('Create Item page - Highlight image: Additional settings', () => {
67
61
  highlightImagePage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
68
62
  utilities.verifyInnerText(highlightImagePage.fontSizeDropdown(), `${option}`);
69
63
  utilities.verifyCSS(highlightImagePage.setCorrectAnswerSectionImage(), {
70
- 'font-size': fontSizes[2]
64
+ 'font-size': fontSizes[1]
71
65
  });
72
66
  utilities.verifyCSS(highlightImagePage.highlightNumeration(), {
73
- 'font-size': fontSizes[0]
67
+ 'font-size': fontSizes[2]
74
68
  });
75
69
  });
76
70
  });
@@ -137,7 +137,7 @@ describe('Create Item page - Highlight image: Preview tab Scoring Section', () =
137
137
  it('CSS of incorrect answer state', { tags: 'css' }, () => {
138
138
  highlightImagePage.steps.checkShowCorrectAnswerCheckbox();
139
139
  cy.log('Verifying CSS of incorrect cross-mark icon')
140
- utilities.verifyCSS(highlightImagePage.correctIncorectAnswerLabel(), {
140
+ utilities.verifyCSS(highlightImagePage.correctIncorrectAnswerLabel(), {
141
141
  'color': css.color.incorrectAnswer,
142
142
  'font-size': css.fontSize.normal,
143
143
  'font-weight': css.fontWeight.bold
@@ -213,12 +213,12 @@ describe('Create Item page - Highlight image: Preview tab Scoring Section', () =
213
213
  'color': css.color.primaryBtn,
214
214
  'background-color': css.color.correctAnswer
215
215
  });
216
- utilities.verifyCSS(highlightImagePage.correctIncorectAnswerLabel(), {
216
+ utilities.verifyCSS(highlightImagePage.correctIncorrectAnswerLabel(), {
217
217
  'color': css.color.correctAnswer,
218
218
  'font-size': css.fontSize.normal,
219
219
  'font-weight': css.fontWeight.bold
220
220
  });
221
- utilities.verifyCSS(highlightImagePage.correctIncorectAnswerLabel(), {
221
+ utilities.verifyCSS(highlightImagePage.correctIncorrectAnswerLabel(), {
222
222
  'color': css.color.correctAnswer,
223
223
  'font-size': css.fontSize.normal,
224
224
  'font-weight': css.fontWeight.bold
@@ -149,6 +149,8 @@ describe('Create Item page - Highlight image: Edit tab scoring types and set cor
149
149
 
150
150
  it('User should be able to enter points in \'Penalty Points\' and \'Minimum score awarded (if attempted)\' input fields', () => {
151
151
  highlightImagePage.steps.allotPenaltyPoints(2);
152
+ highlightImagePage.steps.expandMinimumScoringDropdown()
153
+ highlightImagePage.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
152
154
  highlightImagePage.steps.allotMinimumScoreAwardedIfAttempted(1);
153
155
  });
154
156
 
@@ -184,9 +186,9 @@ describe('Create Item page - Highlight image: Edit tab scoring types and set cor
184
186
  'font-weight': css.fontWeight.semibold
185
187
  });
186
188
  utilities.verifyCSS(highlightImagePage.rounddownScoreCheckboxLabel(), {
187
- 'color': css.color.labelText,
189
+ 'color': css.color.labels,
188
190
  'font-size': css.fontSize.normal,
189
- 'font-weight': css.fontWeight.regular
191
+ 'font-weight': css.fontWeight.semibold
190
192
  });
191
193
  });
192
194
 
@@ -269,6 +271,8 @@ describe('Create Item page - Highlight image: Edit tab scoring types and set cor
269
271
 
270
272
  it('User should be able to enter points in \'Penalty Points\' and \'Minimum score awarded (if attempted)\' input fields', () => {
271
273
  highlightImagePage.steps.allotPenaltyPoints(2);
274
+ highlightImagePage.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
275
+ highlightImagePage.steps.allotMinimumScoreAwardedIfAttempted(1);
272
276
  highlightImagePage.steps.allotMinimumScoreAwardedIfAttempted(1);
273
277
  });
274
278
 
@@ -298,9 +302,9 @@ describe('Create Item page - Highlight image: Edit tab scoring types and set cor
298
302
  'font-weight': css.fontWeight.semibold
299
303
  });
300
304
  utilities.verifyCSS(highlightImagePage.rounddownScoreCheckboxLabel(), {
301
- 'color': css.color.labelText,
305
+ 'color': css.color.labels,
302
306
  'font-size': css.fontSize.normal,
303
- 'font-weight': css.fontWeight.regular
307
+ 'font-weight': css.fontWeight.semibold
304
308
  });
305
309
  });
306
310
 
@@ -355,7 +359,7 @@ describe('Create Item page - Highlight image: Edit tab scoring types and set cor
355
359
  highlightImagePage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored');
356
360
  });
357
361
 
358
- it('When the user has selected \'Manually Scored\' option from the Scoring Type dropdown then the \'Set Correct Answer\' section should not be displayed, \'All or Nothing\', \'Partial - equal weights\' and \'Partial - different weights\' radio buttons should not be displayed, \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed, round down score label and checkbox should not be displayed and inside Additional Settings accordion Check Answer section i.e. \'Allow students to check answer\' checkbox should not be displayed', () => {
362
+ it('When the user has selected \'Manually Scored\' option from the Scoring Type dropdown then the \'Set Correct Answer\' section should not be displayed, \'All or Nothing\', \'Partial - equal weights\' and \'Partial - different weights\' radio buttons should not be displayed, \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed, round down score label and checkbox should not be displayed and inside Additional Settings accordion Check Answer section i.e. \'Allow student to check answer\' checkbox should not be displayed', () => {
359
363
  utilities.verifyElementVisibilityState(highlightImagePage.setCorrectAnswerLabel(), 'notExist');
360
364
  utilities.verifyElementVisibilityState(highlightImagePage.setCorrectAnswerHelpText(), 'notExist');
361
365
  utilities.verifyElementVisibilityState(highlightImagePage.correctTab(), 'notExist');
@@ -46,7 +46,7 @@ describe('Create Item page - Highlight image - Manually and Non-scored', () => {
46
46
  highlightImagePage.steps.verifyRegionIsNotHighlighted(2);
47
47
  });
48
48
 
49
- highlightImagePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab();
49
+ highlightImagePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab('Manually scored');
50
50
  });
51
51
 
52
52
  describe('Question Preview: Non scored', () => {
@@ -34,7 +34,6 @@ describe('Create Item page - Highlight image: Preview tab Scoring Section', () =
34
34
  highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(0);
35
35
  highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(3);
36
36
  highlightImagePage.steps.selectPartialDifferentWeightsCheckbox();
37
- highlightImagePage.steps.uncheckRoundDownScoreCheckbox();
38
37
  highlightImagePage.steps.addPartialDifferentWeightsPoints([4.2, , , 2.3]);
39
38
  highlightImagePage.steps.expandAdditonalSettings();
40
39
  highlightImagePage.steps.checkAllowStudentsToCheckAnswerCheckbox();
@@ -183,21 +182,7 @@ describe('Create Item page - Highlight image: Preview tab Scoring Section', () =
183
182
  highlightImagePage.steps.switchToPreviewTab();
184
183
  });
185
184
 
186
- it('When the \'Round down score\' checkbox is selected, then in Preview tab when user enters partially or fully correct answers responses the score displayed should be rounded down to the nearest whole number', () => {
187
- highlightImagePage.steps.verifyCheckedStateOfRoundDownScoreCheckbox();
188
- highlightImagePage.steps.highlightARegionInPreviewTab(0);
189
- highlightImagePage.steps.verifyPreviewTabScoreText(4, 9.5);
190
- highlightImagePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
191
- highlightImagePage.steps.highlightARegionInPreviewTab(1);
192
- highlightImagePage.steps.highlightARegionInPreviewTab(3);
193
- highlightImagePage.steps.verifyPreviewTabScoreText(9, 9.5);
194
- highlightImagePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
195
- });
196
-
197
185
  it('When the \'Round down score\' checkbox is not selected, then in Preview tab when user selects partially or fully correct answers the points should be displayed in decimal points if applicable as per the options selected by the user', () => {
198
- highlightImagePage.steps.switchToEditTab()
199
- highlightImagePage.steps.uncheckRoundDownScoreCheckbox()
200
- highlightImagePage.steps.switchToPreviewTab();
201
186
  highlightImagePage.steps.highlightARegionInPreviewTab(3);
202
187
  highlightImagePage.steps.verifyPreviewTabScoreText(2.3, 9.5);
203
188
  highlightImagePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
@@ -206,5 +191,19 @@ describe('Create Item page - Highlight image: Preview tab Scoring Section', () =
206
191
  highlightImagePage.steps.verifyPreviewTabScoreText(9.5, 9.5);
207
192
  highlightImagePage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
208
193
  });
194
+
195
+ it('When the \'Round down score\' checkbox is selected, then in Preview tab when user enters partially or fully correct answers responses the score displayed should be rounded down to the nearest whole number', () => {
196
+ highlightImagePage.steps.switchToEditTab()
197
+ highlightImagePage.steps.expandRoundingDropdown();
198
+ highlightImagePage.steps.selectOptionFromRoundingDropdownOption('round down if <= 0.99');
199
+ highlightImagePage.steps.switchToPreviewTab();
200
+ highlightImagePage.steps.highlightARegionInPreviewTab(0);
201
+ highlightImagePage.steps.verifyPreviewTabScoreText(4, 9.5);
202
+ highlightImagePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
203
+ highlightImagePage.steps.highlightARegionInPreviewTab(1);
204
+ highlightImagePage.steps.highlightARegionInPreviewTab(3);
205
+ highlightImagePage.steps.verifyPreviewTabScoreText(9, 9.5);
206
+ highlightImagePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
207
+ });
209
208
  });
210
209
  });
@@ -34,7 +34,6 @@ describe('Create Item page - Highlight image: Preview tab Scoring Section', () =
34
34
  highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(0);
35
35
  highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(3);
36
36
  highlightImagePage.steps.selectPartialDifferentWeightsCheckbox();
37
- highlightImagePage.steps.uncheckRoundDownScoreCheckbox();
38
37
  highlightImagePage.steps.addPartialDifferentWeightsPoints([7, , , 8]);
39
38
  highlightImagePage.steps.clickOnAddAlternateAnswerButton();
40
39
  highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(0);
@@ -339,7 +338,6 @@ describe('Create Item page - Highlight image: Preview tab Scoring Section', () =
339
338
  highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(0);
340
339
  highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(3);
341
340
  highlightImagePage.steps.selectPartialDifferentWeightsCheckbox();
342
- highlightImagePage.steps.uncheckRoundDownScoreCheckbox();
343
341
  highlightImagePage.steps.addPartialDifferentWeightsPoints([9, , , 3]);
344
342
  highlightImagePage.steps.clickOnAddAlternateAnswerButton();
345
343
  highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(0);
@@ -644,7 +642,6 @@ describe('Create Item page - Highlight image: Preview tab Scoring Section', () =
644
642
  highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(0);
645
643
  highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(3);
646
644
  highlightImagePage.steps.selectPartialDifferentWeightsCheckbox();
647
- highlightImagePage.steps.uncheckRoundDownScoreCheckbox();
648
645
  highlightImagePage.steps.addPartialDifferentWeightsPoints([7, , , 8]);
649
646
  highlightImagePage.steps.clickOnAddAlternateAnswerButton();
650
647
  highlightImagePage.steps.highlightARegionInSetCorrectAnswerSection(0);
@@ -181,21 +181,7 @@ describe('Create Item page - Highlight image: Preview tab Scoring Section', () =
181
181
  highlightImagePage.steps.switchToPreviewTab();
182
182
  });
183
183
 
184
- it('When the \'Round down score\' checkbox is selected, then in Preview tab when user enters partially or fully correct answers responses the score displayed should be rounded down to the nearest whole number', () => {
185
- highlightImagePage.steps.verifyCheckedStateOfRoundDownScoreCheckbox();
186
- highlightImagePage.steps.highlightARegionInPreviewTab(0);
187
- highlightImagePage.steps.verifyPreviewTabScoreText(2, 6.3);
188
- highlightImagePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
189
- highlightImagePage.steps.highlightARegionInPreviewTab(1);
190
- highlightImagePage.steps.highlightARegionInPreviewTab(3);
191
- highlightImagePage.steps.verifyPreviewTabScoreText(6, 6.3);
192
- highlightImagePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
193
- });
194
-
195
184
  it('When the \'Round down score\' checkbox is not selected, then in Preview tab when user selects partially or fully correct answers the points should be displayed in decimal points if applicable as per the options selected by the user', () => {
196
- highlightImagePage.steps.switchToEditTab()
197
- highlightImagePage.steps.uncheckRoundDownScoreCheckbox()
198
- highlightImagePage.steps.switchToPreviewTab();
199
185
  highlightImagePage.steps.highlightARegionInPreviewTab(3);
200
186
  highlightImagePage.steps.verifyPreviewTabScoreText(2.1, 6.3);
201
187
  highlightImagePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
@@ -204,5 +190,19 @@ describe('Create Item page - Highlight image: Preview tab Scoring Section', () =
204
190
  highlightImagePage.steps.verifyPreviewTabScoreText(6.3, 6.3);
205
191
  highlightImagePage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
206
192
  });
193
+
194
+ it('When the \'Round down score\' checkbox is selected, then in Preview tab when user enters partially or fully correct answers responses the score displayed should be rounded down to the nearest whole number', () => {
195
+ highlightImagePage.steps.switchToEditTab()
196
+ highlightImagePage.steps.expandRoundingDropdown();
197
+ highlightImagePage.steps.selectOptionFromRoundingDropdownOption('round down if <= 0.99');
198
+ highlightImagePage.steps.switchToPreviewTab();
199
+ highlightImagePage.steps.highlightARegionInPreviewTab(0);
200
+ highlightImagePage.steps.verifyPreviewTabScoreText(2, 6.3);
201
+ highlightImagePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
202
+ highlightImagePage.steps.highlightARegionInPreviewTab(1);
203
+ highlightImagePage.steps.highlightARegionInPreviewTab(3);
204
+ highlightImagePage.steps.verifyPreviewTabScoreText(6, 6.3);
205
+ highlightImagePage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
206
+ });
207
207
  });
208
208
  });