itemengine-cypress-automation 1.0.133-7thMarchFixes-0e78080.0 → 1.0.134-14MarchUpdates-0b00629.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/cypress/e2e/ILC/DesmosGraphing/previewTabContent.smoke.js +1 -2
  2. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +53 -54
  3. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +0 -149
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +312 -0
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +71 -0
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  7. package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +98 -0
  8. package/cypress/e2e/ILC/GeogebraActivity/editTabScoringSection.js +56 -0
  9. package/cypress/e2e/ILC/GeogebraActivity/gradingViewAndCorrectAnswerViewContents.smoke.js +106 -0
  10. package/cypress/e2e/ILC/GeogebraActivity/headerSection.js +74 -0
  11. package/cypress/e2e/ILC/GeogebraActivity/previewTabContent.smoke.js +91 -0
  12. package/cypress/e2e/ILC/GeogebraActivity/questionInstructions.js +28 -0
  13. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingPenaltyScoring.js +79 -0
  14. package/cypress/e2e/ILC/Graphing/Scoring/manuallyAndNonScoredScoring.js +253 -0
  15. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +307 -0
  16. package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +84 -0
  17. package/cypress/e2e/ILC/Graphing/editTabScoringSection.js +105 -0
  18. package/cypress/e2e/ILC/Graphing/headerSection.js +77 -0
  19. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +916 -0
  20. package/cypress/e2e/ILC/Graphing/minimumScoringPenaltyPointsAndRoundingDropdown.js +57 -0
  21. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -1
  22. package/cypress/e2e/ILC/Graphing/specifyCorrectAnswerSection.js +72 -0
  23. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +120 -0
  24. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +858 -0
  25. package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +337 -4
  26. package/cypress/fixtures/constants.js +1 -1
  27. package/cypress/fixtures/theme/ilc.json +3 -1
  28. package/cypress/pages/components/additionalSettingsAccessibilitySectionComponent.js +66 -0
  29. package/cypress/pages/components/additionalSettingsPanel.js +95 -90
  30. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +9 -7
  31. package/cypress/pages/components/backgroundImageUploadComponent.js +16 -14
  32. package/cypress/pages/components/colorPopupComponent.js +14 -17
  33. package/cypress/pages/components/commonComponents.js +1 -1
  34. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -1
  35. package/cypress/pages/components/imageCanvasComponent.js +3 -3
  36. package/cypress/pages/components/index.js +2 -2
  37. package/cypress/pages/components/opacityComponent.js +1 -1
  38. package/cypress/pages/components/scoringSectionBaseEditTab.js +18 -0
  39. package/cypress/pages/components/studentResponseAreaAndLayoutComponent.js +1 -1
  40. package/cypress/pages/dialogBoxBase.js +1 -1
  41. package/cypress/pages/drawingResponsePage.js +35 -4
  42. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +2 -2
  43. package/cypress/pages/fillInTheGapsOverImageTextPage.js +2 -0
  44. package/cypress/pages/geogebraActivityPage.js +106 -0
  45. package/cypress/pages/graphingPage.js +1458 -77
  46. package/cypress/pages/index.js +1 -0
  47. package/cypress/pages/multipleSelectionPage.js +0 -1
  48. package/cypress/pages/shortTextResponsePage.js +155 -3
  49. package/cypress/pages/uploadResponsePage.js +0 -2
  50. package/package.json +1 -1
@@ -0,0 +1,84 @@
1
+ import { graphingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+ const fontSizeDropdownOptions = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
6
+ const fontSizes = ['12px', '14px', '16px', '18px', '22px', '26px'];
7
+
8
+ describe('Create item page - Graphing: Additional Settings accordion', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Additional Settings accordion', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
17
+ cy.barsPreLoaderWait();
18
+ });
19
+
20
+ graphingPage.tests.verifyAdditonalSettingsAccordionProperties();
21
+ });
22
+
23
+ describe('Additional settings: Font size contents', () => {
24
+ abortEarlySetup();
25
+ before(() => {
26
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
27
+ cy.barsPreLoaderWait();
28
+ graphingPage.steps.expandAdditonalSettings();
29
+ });
30
+
31
+ graphingPage.tests.verifyFontSizeSectionContents();
32
+ });
33
+
34
+ describe('Additional settings: Font size functionality edit tab', () => {
35
+ abortEarlySetup();
36
+ before(() => {
37
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
38
+ cy.barsPreLoaderWait();
39
+ graphingPage.steps.expandAdditonalSettings();
40
+ });
41
+
42
+ fontSizeDropdownOptions.forEach((option, fontsIndex) => {
43
+ it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the edit tab graph resource should not change`, () => {
44
+ graphingPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
45
+ utilities.verifyInnerText(graphingPage.fontSizeDropdown(), `${option}`);
46
+ utilities.verifyCSS(graphingPage.graphSpecifyCorrectAnswerSection(), {
47
+ 'font-size': css.fontSize.normal
48
+ });
49
+ });
50
+ });
51
+ });
52
+
53
+ describe('Additional settings: Font size functionality preview tab', () => {
54
+ abortEarlySetup();
55
+ before(() => {
56
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
57
+ cy.barsPreLoaderWait();
58
+ graphingPage.steps.expandAdditonalSettings();
59
+ });
60
+
61
+ fontSizeDropdownOptions.forEach((option, fontsIndex) => {
62
+ it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab graph resource should change`, () => {
63
+ graphingPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
64
+ utilities.verifyInnerText(graphingPage.fontSizeDropdown(), `${option}`);
65
+ graphingPage.steps.switchToPreviewTab();
66
+ utilities.verifyCSS(graphingPage.graphPreviewTab(), {
67
+ 'font-size': fontSizes[fontsIndex]
68
+ });
69
+ graphingPage.steps.switchToEditTab();
70
+ });
71
+ });
72
+ });
73
+
74
+ describe('Additional Settings: Details section', () => {
75
+ abortEarlySetup();
76
+ before(() => {
77
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
78
+ cy.barsPreLoaderWait();
79
+ graphingPage.steps.expandAdditonalSettings();
80
+ });
81
+
82
+ graphingPage.tests.verifyDetailsSection();
83
+ });
84
+ });
@@ -0,0 +1,105 @@
1
+ import { graphingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('Create item page - Graphing: Scoring section', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Scoring section contents', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
15
+ cy.barsPreLoaderWait();
16
+ });
17
+
18
+ graphingPage.tests.verifyScoringTypeLabelAndDropdown('Auto scored');
19
+
20
+ it('\'All or nothing\', \'Partial - equal weights\' and \'Partial - different weights\' labels and radio buttons should not be displayed', () => {
21
+ utilities.verifyElementVisibilityState(graphingPage.allOrNothingRadioButtonLabel(), 'notExist');
22
+ utilities.verifyElementVisibilityState(graphingPage.partialEqualWeightsRadioButtonLabel(), 'notExist');
23
+ utilities.verifyElementVisibilityState(graphingPage.partialDifferentWeightsRadioButtonLabel(), 'notExist');
24
+ });
25
+ });
26
+
27
+ describe('Auto scored: All or nothing scoring - Scoring section', () => {
28
+ abortEarlySetup();
29
+ before(() => {
30
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
31
+ cy.barsPreLoaderWait();
32
+ });
33
+
34
+ it('When the user has selected \'All or nothing\' scoring subtype, minimum scoring dropdown should be displayed in the scoring section', () => {
35
+ graphingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
36
+ });
37
+ });
38
+
39
+ describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
40
+ abortEarlySetup();
41
+ before(() => {
42
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
43
+ cy.barsPreLoaderWait();
44
+ });
45
+
46
+ graphingPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
47
+
48
+ graphingPage.tests.verifyPointsLabelAndInputField();
49
+ });
50
+
51
+ describe('Manually scored scoring - Scoring section', () => {
52
+ abortEarlySetup();
53
+ before(() => {
54
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
55
+ cy.barsPreLoaderWait();
56
+ });
57
+
58
+ it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
59
+ graphingPage.steps.expandScoringTypeDropdown();
60
+ graphingPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
61
+ });
62
+
63
+ it('When the user has selected \'Manually scored\' scoring type, then the specify correct answer section should not be displayed', () => {
64
+ utilities.verifyElementVisibilityState(graphingPage.specifyCorrectAnswerLabel(), 'notExist');
65
+ utilities.verifyElementVisibilityState(graphingPage.specifyCorrectAnswerSectionWrapper(), 'notExist');
66
+ });
67
+
68
+ graphingPage.tests.verifyScoringSectionContentsForManuallyScoredScoringType();
69
+
70
+ graphingPage.tests.verifyPointsFieldErrorState();
71
+
72
+ it('When user has selected \'Manually scored\' scoring type, then in scoring section \'Minimum scoring\' label and dropdown should be visible', () => {
73
+ graphingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
74
+ });
75
+ });
76
+
77
+ describe('Non scored scoring - Scoring section', () => {
78
+ abortEarlySetup();
79
+ before(() => {
80
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
81
+ cy.barsPreLoaderWait();
82
+ });
83
+
84
+ it('User should be able to select \'Non scored\' scoring type from scoring type dropdown', () => {
85
+ graphingPage.steps.expandScoringTypeDropdown();
86
+ graphingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
87
+ });
88
+
89
+ graphingPage.tests.verifyScoringSectionContentsForNonScoredScoringType();
90
+ });
91
+
92
+ describe('Non scored scoring - Specify correct answer section', () => {
93
+ abortEarlySetup();
94
+ before(() => {
95
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
96
+ cy.barsPreLoaderWait();
97
+ graphingPage.steps.expandScoringTypeDropdown();
98
+ graphingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
99
+ });
100
+
101
+ graphingPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
102
+
103
+ graphingPage.tests.verifyPointsLabelAndInputFieldForNonScoredScoringType();
104
+ });
105
+ });
@@ -0,0 +1,77 @@
1
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
2
+ import { dialogBoxBase, graphingPage } from "../../../pages";
3
+ import utilities from "../../../support/helpers/utilities";
4
+
5
+ describe('Create item page - Graphing: Header section and saving question', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Header section contents', () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
14
+ cy.barsPreLoaderWait();
15
+ });
16
+
17
+ graphingPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Graphing');
18
+ });
19
+
20
+ describe('Tabs section', () => {
21
+ abortEarlySetup();
22
+ before(() => {
23
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
24
+ cy.barsPreLoaderWait();
25
+ });
26
+
27
+ graphingPage.tests.verifyTabsSection();
28
+ });
29
+
30
+ describe('Cancel button', () => {
31
+ abortEarlySetup();
32
+ before(() => {
33
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
34
+ cy.barsPreLoaderWait();
35
+ });
36
+
37
+ graphingPage.tests.verifyCancelButton('Graphing')
38
+ });
39
+
40
+ describe('Save Question button', () => {
41
+ abortEarlySetup();
42
+ before(() => {
43
+ graphingPage.steps.navigateToCreateQuestion('Graphing');
44
+ cy.barsPreLoaderWait();
45
+ });
46
+
47
+ describe('Validation error messages', () => {
48
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
49
+
50
+ it('Validation error messages should be displayed below required input fields', () => {
51
+ graphingPage.steps.verifyQuestionInstructionsErrorMessage();
52
+ graphingPage.steps.verifyPointsFieldErrorMessage();
53
+ utilities.verifyInnerText(utilities.getNthElement(graphingPage.errorMessage(), 2), 'Error: Please set a correct answer.');
54
+ });
55
+
56
+ it('Validation error messages should disappear when required input fields are filled', () => {
57
+ graphingPage.steps.addTextInQuestionInstructionsInputField('Question instruction');
58
+ graphingPage.steps.allotPoints(10);
59
+ graphingPage.steps.selectGraphToolOptionSpecifyCorrectAnswer('Vector');
60
+ graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
61
+ graphingPage.steps.verifyPointsPlottedOnSpecifyCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
62
+ graphingPage.steps.verifyErrorMessageIsNotDisplayed();
63
+ graphingPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
64
+ });
65
+
66
+ graphingPage.tests.verifyCreateItemWrapperContentsA11y();
67
+ });
68
+
69
+ describe('Saving a question', () => {
70
+ it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
71
+ graphingPage.steps.saveAQuestionAndVerifySnackbar();
72
+ });
73
+
74
+ graphingPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
75
+ });
76
+ });
77
+ });