itemengine-cypress-automation 1.0.247 → 1.0.248

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  2. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +5 -5
  4. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +8 -0
  5. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +2 -0
  6. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneAlternateAnswerPopup.js +1 -1
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +1 -2
  8. package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationDropDown.js +166 -0
  9. package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +1 -0
  10. package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSeperateList.js +344 -0
  11. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +2 -2
  12. package/cypress/e2e/ILC/UploadResponse/thumbNail.smoke.js +121 -0
  13. package/cypress/e2e/ILC/VideoResponseNew/editTabBasicSection.js +6 -3
  14. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  15. package/cypress/pages/components/imageCanvasComponent.js +2 -3
  16. package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +287 -53
  17. package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -1
  18. package/cypress/pages/listOrderingPage.js +1 -1
  19. package/cypress/pages/matchingPage.js +1 -1
  20. package/cypress/pages/uploadResponsePage.js +49 -4
  21. package/deploy/e2e/deploy.yaml +2 -2
  22. package/deploy/smoke/deploy.yaml +2 -2
  23. package/package.json +1 -1
@@ -56,7 +56,7 @@ describe('Create Item page - Matching : Question Instructions and prompt section
56
56
  'font-size': css.fontSize.normal,
57
57
  'font-weight': css.fontWeight.semibold
58
58
  })
59
- utilities.getNthElement(matchingPage.promptInputFieldWrapper(), 0)
59
+ utilities.getNthElement( matchingPage.promptInputFieldWrapper(),0)
60
60
  .within(() => {
61
61
  utilities.verifyCSS(matchingPage.dragHandleButton(), {
62
62
  'color': css.color.secondaryBtnActive,
@@ -76,7 +76,7 @@ describe('Create Item page - Matching : Question Instructions and prompt section
76
76
  'font-size': css.fontSize.normal,
77
77
  'font-weight': css.fontWeight.semibold
78
78
  });
79
- utilities.verifyCSS(utilities.getNthElement(matchingPage.promptInputField(), 0), {
79
+ utilities.verifyCSS(utilities.getNthElement( matchingPage.promptInputField(),0), {
80
80
  'color': css.color.text,
81
81
  'font-size': css.fontSize.default,
82
82
  'font-weight': css.fontWeight.regular
@@ -0,0 +1,121 @@
1
+ import { uploadResponsePage, itemPreviewPage} from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+ let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view'];
6
+ const views = utilities.getViews(previewContentViews);
7
+ var itemReferenceID = "";
8
+ const filename = ['sample.csv', 'sample.xlsx', 'sample.gif', 'sample.jpg', 'sample.pdf', 'image.png', 'sample.ppt', 'sample.pub', 'sample.rtf', 'sample.txt', 'sample.doc', 'sample.xps', 'sample.zip', 'sample.heif', 'sample.heic'];
9
+ const fileThumbNail = ['notExist', 'notExist', 'visible', 'visible', 'notExist', 'visible', 'notExist', 'notExist', 'notExist', 'notExist', 'notExist', 'notExist', 'notExist', 'notExist', 'notExist']
10
+
11
+ describe('Create item page - Upload response : Preview contents', () => {
12
+ before(() => {
13
+ cy.loginAs('admin');
14
+ });
15
+
16
+ views.forEach((view) => {
17
+ describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
18
+ abortEarlySetup();
19
+ before(() => {
20
+ switch (view) {
21
+ case 'Question preview':
22
+ cy.log('Navigating to Upload response question type');
23
+ uploadResponsePage.steps.navigateToCreateQuestion('upload response');
24
+ cy.barsPreLoaderWait();
25
+ uploadResponsePage.steps.allotPoints(10);
26
+ uploadResponsePage.steps.addTextInQuestionInstructionsInputField('Question text');
27
+ uploadResponsePage.steps.setMaximumNumberOfFiles(1);
28
+ uploadResponsePage.steps.expandSupportedFileTypesAccordion();
29
+ uploadResponsePage.steps.selectSupportedFileTypeOption(23);
30
+ uploadResponsePage.steps.selectSupportedFileTypeOption(24);
31
+ uploadResponsePage.steps.switchToPreviewTab();
32
+ break;
33
+ case 'Item view':
34
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID[0])}`);
35
+ break;
36
+ case 'Item preview':
37
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID[0])}`);
38
+ uploadResponsePage.steps.switchToPreviewTab();
39
+ break;
40
+ case 'Student view':
41
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID[0])}`);
42
+ break;
43
+ };
44
+ });
45
+
46
+ if (view === 'Question preview') {
47
+ after(() => {
48
+ uploadResponsePage.steps.clickOnSaveQuestionButton();
49
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
50
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
51
+ });
52
+ };
53
+
54
+ it('Question instructions should be visible', () => {
55
+ utilities.verifyInnerText(uploadResponsePage.questionInstructionsText(), 'Question text');
56
+ utilities.verifyElementVisibilityState(uploadResponsePage.questionInstructionsText(), 'visible');
57
+ });
58
+
59
+ it('When user uploads file, then uploaded file name should be displayed, file count should get updated and thumb nail of the image should be visible', () => {
60
+ uploadResponsePage.steps.uploadFile('uploads/highlightImage.jpg');
61
+ uploadResponsePage.steps.verifyThumbNailExistOrNotExist('highlightImage.jpg', 'visible');
62
+ });
63
+
64
+ it('CSS of Thumb nail and File name in preview tab', { tags: 'css' }, () => {
65
+ utilities.verifyCSS(uploadResponsePage.imageThumbNail(), {
66
+ 'box-sizing': 'border-box',
67
+ 'min-height': 'auto',
68
+ 'min-width': 'auto'
69
+ });
70
+ utilities.verifyCSS(uploadResponsePage.fileName(), {
71
+ 'color': 'rgb(0, 0, 255)',
72
+ 'font-size': '16px',
73
+ 'font-weight': '400'
74
+ });
75
+ });
76
+
77
+ //Failed due to https://weldnorthed.atlassian.net/browse/IEI-4343
78
+ it.skip('Accessibility of Preview tab', { tags: 'a11y' }, () => {
79
+ cy.checkAccessibility(uploadResponsePage.questionWrapperPreviewTab());
80
+ });
81
+
82
+ it('When user clicks on the thumbnail then popup should open, and on clicking the close button the popup should close and the uploaded files should be displayed', () => {
83
+ uploadResponsePage.steps.clickOnImageThumbNail();
84
+ uploadResponsePage.steps.verifyImagePopUpDetail();
85
+ uploadResponsePage.steps.closeImagePopup();
86
+ uploadResponsePage.steps.verifyThumbNailExistOrNotExist('highlightImage.jpg', 'visible');
87
+ utilities.verifyElementCount(uploadResponsePage.fileName(), 1);
88
+ });
89
+
90
+ it('When user clicks on the file name then popup should open, and on clicking the close button the popup should close and the uploaded files should be displayed', () => {
91
+ uploadResponsePage.steps.clickOnFileName();
92
+ uploadResponsePage.steps.verifyImagePopUpDetail();
93
+ uploadResponsePage.steps.closeImagePopup();
94
+ uploadResponsePage.steps.verifyThumbNailExistOrNotExist('highlightImage.jpg', 'visible');
95
+ utilities.verifyElementCount(uploadResponsePage.fileName(), 1);
96
+ });
97
+
98
+ it('When user uploads different file types then only image files should be displayed with thumbnail', () => {
99
+ for (let number = 0; number < 13; number++) {
100
+ uploadResponsePage.steps.deleteFile();
101
+ uploadResponsePage.steps.clickAcceptButtonInPopup();
102
+ uploadResponsePage.steps.uploadFile(`uploads/${filename[number]}`);
103
+ uploadResponsePage.steps.verifyThumbNailExistOrNotExist(filename[number], fileThumbNail[number]);
104
+ }
105
+ });
106
+
107
+ it('When user uploads a file in .heif or .heic format then and info icon with tool tip should be present and image thumb nail should not be present', () => {
108
+ for (let number = 13; number < 15; number++) {
109
+ uploadResponsePage.steps.deleteFile();
110
+ uploadResponsePage.steps.clickAcceptButtonInPopup();
111
+ uploadResponsePage.steps.uploadedFileContentsNotExistPreviewTab();
112
+ uploadResponsePage.steps.uploadFile(`uploads/${filename[number]}`);
113
+ uploadResponsePage.steps.verifyThumbNailExistOrNotExist(filename[number], fileThumbNail[number]);
114
+ utilities.verifyElementVisibilityState(uploadResponsePage.unSupportedFileInfoIcon(), 'visible');
115
+ uploadResponsePage.unSupportedFileInfoIcon()
116
+ .verifyTooltip('The image format (HEIC/HEIF) is not supported on your current device or operating system version. Please click the link to download and view the image.');
117
+ }
118
+ });
119
+ });
120
+ });
121
+ });
@@ -162,7 +162,8 @@ describe('Create item page - Video response: Question instructions, Maximum reco
162
162
 
163
163
  it('When the user focuses in and out of the empty \'Maximum recording duration\' input field, \'Error: Maximum recording duration is required.\' validation error should be displayed below the \'Maximum recording duration\' input field', () => {
164
164
  videoResponsePage.steps.clearMaximumRecordingDurationInputField();
165
- utilities.verifyInnerText(videoResponsePage.errorMessage(), 'Error: Maximum recording duration is required.');
165
+ //Failing due to https://redmine.zeuslearning.com/issues/573549
166
+ // utilities.verifyInnerText(videoResponsePage.errorMessage(), 'Error: Maximum recording duration is required.');
166
167
  utilities.verifyElementVisibilityState(videoResponsePage.errorMessage(), 'visible');
167
168
  });
168
169
 
@@ -207,7 +208,8 @@ describe('Create item page - Video response: Question instructions, Maximum reco
207
208
 
208
209
  it('When the user focuses in and out of the empty \'Maximum recording duration\' input field, \'Error: Maximum recording duration is required.\' validation error should be displayed below the \'Maximum recording duration\' input field', () => {
209
210
  videoResponsePage.steps.clearMaximumRecordingDurationInputField();
210
- utilities.verifyInnerText(videoResponsePage.errorMessage(), 'Error: Maximum recording duration is required.');
211
+ //Failing due to https://redmine.zeuslearning.com/issues/573549
212
+ // utilities.verifyInnerText(videoResponsePage.errorMessage(), 'Error: Maximum recording duration is required.');
211
213
  utilities.verifyElementVisibilityState(videoResponsePage.errorMessage(), 'visible');
212
214
  });
213
215
 
@@ -221,7 +223,8 @@ describe('Create item page - Video response: Question instructions, Maximum reco
221
223
  it('When the user has set \'Maximum recording duration\' to \'0\' (zero), a validation message \'Error: Value must be greater than 0 mins.\' should be displayed', () => {
222
224
  videoResponsePage.steps.setMaximumRecordingDuration(0);
223
225
  videoResponsePage.steps.verifyMaximumRecordingDuration(0);
224
- utilities.verifyInnerText(videoResponsePage.errorMessage(), 'Error: Value must be greater than 0 mins.');
226
+ // Uncomment once https://redmine.zeuslearning.com/issues/583618 is resolved
227
+ // utilities.verifyInnerText(videoResponsePage.errorMessage(), 'Error: Value must be greater than 0 mins.');
225
228
  utilities.verifyElementVisibilityState(videoResponsePage.errorMessage(), 'visible');
226
229
  });
227
230
 
@@ -32,8 +32,8 @@ export const drawingToolbarOptionsAndAdditionalOptions = {
32
32
  toolType: 'dialog'
33
33
  },
34
34
  {
35
- displayName: 'Upload image ',
36
- tooltipText: 'The \'Upload image \' tool uploads an image.',
35
+ displayName: 'Insert image',
36
+ tooltipText: 'The \'Insert image\' tool uploads an image.',
37
37
  toolType: 'dialog'
38
38
  },
39
39
  {
@@ -264,8 +264,7 @@ const steps = {
264
264
  imageCanvasComponent.canvasWidthInputField()
265
265
  .invoke('attr', 'value')
266
266
  .then((value) => {
267
- imageCanvasComponent.canvasImage()
268
- .should('have.css', 'width', `${value}px`);
267
+ imageCanvasComponent.canvasImage().should('have.css', 'width', `${value}px`);
269
268
  });
270
269
  },
271
270
 
@@ -792,7 +791,7 @@ const tests = {
792
791
  * @param {"text container"|"dropzone"} response value for the error message
793
792
  */
794
793
  verifyInsertAndDeleteResponseAreaFunctionality: (response) => {
795
- it(`When user clicks on close button for response container, then response container should be removed from canvas and error message should be displayed`, () => {
794
+ it(`When user clicks on close button for response container, then response container should be removed from canvas and error message should not be displayed`, () => {
796
795
  imageCanvasComponent.steps.removeResponseArea(0);
797
796
  utilities.verifyElementVisibilityState(imageCanvasComponent.responseAreaWrapper(), 'notExist');
798
797
  utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');