itemengine-cypress-automation 1.0.357-IEI-5712-TEM-Validation-d745575.0 → 1.0.359

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.
@@ -5,6 +5,8 @@ import { backgroundImageUploadComponent, createQuestionBasePage, scoringSectionB
5
5
  import { drawingResponsePage } from "./drawingResponsePage";
6
6
  import { optionsWrapperComponent } from "../pages/components/optionsWrapperComponent";
7
7
  import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
8
+ import { videoResponsePage } from "./videoResponsePage";
9
+ import { singleSelectionPage } from "./singleSelectionPage";
8
10
  const css = Cypress.env('css');
9
11
 
10
12
  const selectors = {
@@ -20,10 +22,13 @@ const selectors = {
20
22
  ...equationEditorSectionCommonComponent,
21
23
  ...selectQuestionResourceToolPage,
22
24
  ...browseItemsPage,
25
+ ...videoResponsePage,
26
+ ...dialogBoxBase,
23
27
  editQuestionPencil: () => cy.get('[class*="Widgetstyles__HeaderContainer"] button.icon-pencil'),
24
28
  widgetHeaderQuestionTitle: () => cy.get('[class*="Widgetstyles__HeaderContainer"] [class*="Widgetstyles__QuestionTypeText"]'),
25
29
  imageUploadSection: () => cy.get('[class*="TabsComponentstyles__ImageUploadComponentWrapper"]'),
26
30
  addThinkSphereQuestionButton: () => cy.get('.ngie-btn-contained').contains('add ThinkSphere question'),
31
+ whiteBoardCanvasAndControls: () => cy.get('[class*="WhiteboardPagesstyles__WhiteboardPagesWrapper"]'),
27
32
  whiteBoardImageProperties: () => cy.get('[class*="WhiteBoardImagePropertiesstyles__ImagePropertiesWrapper"]'),
28
33
  whiteBoardImagePropertiesInputTypeFile: () => cy.get('[class*="WhiteBoardImagePropertiesstyles__ImagePropertiesWrapper"] input[type="file"]'),
29
34
  topLeftButton: () => utilities.getNthElement(cy.get('button[class*="WhiteBoardImagePropertiesstyles__StyledButton"]'), 0),
@@ -31,8 +36,15 @@ const selectors = {
31
36
  topRightButton: () => utilities.getNthElement(cy.get('button[class*="WhiteBoardImagePropertiesstyles__StyledButton"]'), 2),
32
37
  opacityLabel: () => utilities.getNthElement(cy.get('h2[class*="WhiteBoardImagePropertiesstyles__LayoutLabel"]'), 1),
33
38
  imageAlternativeTextLabel: () => cy.get('div[class*="InlineTextFieldWithDebouncestyles__PropertyLabel"]'),
34
- imageAlternativeTextInputField: () => cy.get('[class*="WhiteBoardImagePropertiesstyles__AltTextWrapper"] input'),
39
+ imageAlternativeTextInputField: () => cy.get('input.text-field'),
35
40
  imageRadioButton: () => cy.get('div[data-value="image"]'),
41
+ manageWhiteBoardTitle: () => cy.get('[class*="WhiteboardPagesstyles__HeadingLabel"]'),
42
+ whiteBoardPreviousButton: () => cy.get('[class*="whiteboard-pagination-prev-button"]'),
43
+ whiteBoardPageLabel: () => cy.get('[class*="WhiteboardPagesstyles__PageLabel"]'),
44
+ whiteBoardPageCounter: () => cy.get('[class*="WhiteboardPagesstyles__PageCounter"]'),
45
+ whiteBoardNextButton: () => cy.get('[class*="whiteboard-pagination-next-button"]'),
46
+ whiteBoardDeleteButton: () => cy.get('[class*="whiteboard-delete-page-button"]'),
47
+ whiteBoardAddNewPageButton: () => cy.get('[class*="whiteboard-add-new-page-button"]'),
36
48
  imageRadioInput: () => cy.get('div[data-value="image"] input[type="radio"]'),
37
49
  pageImageTitle: () => cy.get('div[class*="WhiteBoardImagePropertiesstyles__PageImageTitle"]'),
38
50
  radioGroupWrapper: () => cy.get('div[class*="ngie-radio-group-wrapper"]'),
@@ -71,13 +83,14 @@ const selectors = {
71
83
  solvePhaseAccordianLabel: () => cy.get('[class*="Solvestyles__AccordionLabel"]'),
72
84
  inputTypeVideoFile: () => cy.get('[class*="Planstyles__StrategiesWrapper"] input[type="file"]'),
73
85
  inputTypeFile: () => cy.get('[class*="TabsComponentstyles__ImageUploadComponentWrapper"] input[type="file"]'),
86
+ whiteBoardInputTypeFile: () => cy.get('[class*="UploadImagestyles__UploadWrapper"] input[type="file"]'),
74
87
  warningPopupTitle: () => cy.get('.dialog-title-wrapper'),
75
88
  warningPopupContentText: () => cy.get('.upload-question-preview-popup-error-msg'),
76
89
  warningPopupOkButton: () => cy.get('.upload-question-preview-popup-ok-btn'),
77
- editVideoButton: () => cy.get('[aria-label*="Edit video"]'),
90
+ editVideoButton: () => cy.get('[aria-label*="Change video"]'),
78
91
  deleteVideoButton: () => cy.get('[aria-label*="Delete video"]'),
79
92
  listInputField: () => cy.get('.option-component textarea[placeholder]'),
80
- deleteButton: () => cy.get('button[aria-label*="Delete item"]'),
93
+ deleteButton: () => cy.get('button[aria-label*="Delete"]'),
81
94
  optionNumeration: () => cy.get('[class*="MuiInputAdornment-positionStart"]'),
82
95
  iconPencil: () => cy.get('div[class*="icon-pencil"]'),
83
96
  iconXCircle: () => cy.get('div[class*="icon-x-circle"]'),
@@ -94,7 +107,7 @@ const selectors = {
94
107
  singleOptionTextFieldWrapper: () => cy.get('[class*="SingleOptionstyle__TextFieldWrapper"]'),
95
108
  customizeStampComponent: () => cy.get('[class*="CustomizeStampstyles__CustomizeStampWrapper"]'),
96
109
  customizeStampHeading: () => cy.get('[class*="CustomizeStampstyles__CustomizeStampHeading"]'),
97
- customizeStampCard: (ariaLabel) => cy.get(`[class*="CustomizeStampstyles__StampCard"]${ariaLabel ? ('[aria-label="' + ariaLabel + '"]') : ''}`),
110
+ customizeStampCard: (ariaLabel, checked) => cy.get(`[class*="CustomizeStampstyles__StampCard"]${ariaLabel ? ('[aria-label="' + ariaLabel + '"]') : ''}${checked ? ('[aria-checked="' + checked + '"]') : ''}`),
98
111
  customizeStampCardImg: (ariaLabel) => cy.get('[class*="CustomizeStampstyles__QuestionImage"]'),
99
112
  questionImage: () => cy.get('img[class*="QuestionImageComponentstyle__QuestionImage"]'),
100
113
  stampsToolButton: () => cy.get('#stamps button[aria-label*="Stamps"]'),
@@ -119,11 +132,58 @@ const selectors = {
119
132
  solvePhaseToolsAndControlsOptionsTilesRectangle: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Text').find('[data-name*="Rectangle"]'),
120
133
  solvePhaseToolsAndControlsOptionsTilesDragItemFlexWrapperSvg: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Text').find('.drag-item-flex-wrapper svg'),
121
134
  solvePhaseToolsAndControlsOptionsTilesTextDragIconSvgPath: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Text').find('.drag-icon-button-custom-format svg path'),
122
- solvePhaseToolsAndControlsOptionsTilesArrayDragIconSvgPath: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Array').find('.drag-icon-button-custom-format svg path')
135
+ solvePhaseToolsAndControlsOptionsTilesArrayDragIconSvgPath: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Array').find('.drag-icon-button-custom-format svg path'),
136
+ playerTimer: () => cy.get('[class*="VideoPlayerstyles__PlayerTimerWrapper"]'),
137
+ strategiesPreviewHeader: () => cy.get('[class*="StrategiesPreviewstyles__HeadingWrapper"]'),
138
+ addNewStrategyButton: () => cy.get('[class*="StrategiesPreviewstyles__AddStrategyButton"]'),
139
+ strategiesInputBoxEditTab: () => cy.get('.video-upload-support-wrapper .edit-mcq-option-wrapper'),
140
+ strategiesBoxPreviewTab: () => cy.get('[class*="StrategiesPreviewstyles__ListWrapper"]'),
141
+ popupTitle: () => cy.get('[class*="dialog-title-wrapper"]'),
142
+ strategyNameLabel: () => cy.get('[class*="ThinkSpherePreviewstyles__StrategyNameTextWrapper"]'),
143
+ strategyNameInputField: () => cy.get('[class*="new-strategy-name-field"]'),
144
+ addStrategyPopupCancelButton: () =>
145
+ cy.get('.dialog-content').contains('Cancel'),
146
+ addStrategyPopupSaveButton: () =>
147
+ cy.get('.dialog-content').contains('Save'),
148
+ // preview tab plan section selection
149
+ questionInstructionPreviewTexWrapper: () => cy.get('.question-instruction.question-text-wrapper'),
150
+ questionInstructionPreviewImageWrapper: () => cy.get('[class*="ThinkSpherePreviewstyles__ImageWrapper"]'),
151
+ questionInstructionPreviewImageExpandButton: () => cy.get('[class*="ThinkSpherePreviewstyles__ExpandImageIconWrapper"]'),
152
+ questionInstructionImagePopup: () => cy.get('[class*="QuestionTextstyle__ImagePopupDiv"]'),
153
+ closeExpandImagePopupButton: () => cy.get('.close-popup-btn'),
154
+ PlanningPreviewWrapper : () => cy.get('[class*="PlanningPreviewstyles__PlanningPreviewWrapper"]'),
155
+ planningPreviewHeading: () => cy.get('[class*="PlanningPreviewstyles__HeadingWrapper"]'),
156
+ planningWriteWrapper : () => cy.get('[class*="PlanningPreviewstyles__WriteWrapper"]'),
157
+ problemAskingWrapper: () => cy.get('[class*="PlanningPreviewstyles__ProblemAskingWrapper"]'),
158
+ contentEditableDiv: () => cy.get('[class*="PlanningPreviewstyles__ContentEditableDiv"]'),
159
+ micIconWrapper: () => cy.get('[class*="PlanningPreviewstyles__MicIconWrapper"]'),
160
+ strategiesToPlanWrapper: () => cy.get('[class*="PlanningPreviewstyles__StrategiesToPlanWrapper"]'),
161
+ subheadingWrapper: () => cy.get('[class*="PlanningPreviewstyles__SubHeadingWrapper"]'),
162
+ writePlanWrapper: () => cy.get('[class*="PlanningPreviewstyles__WritePlanWrapper"]'),
163
+ strategyChipWrapper: () => cy.get('[class*="PlanningPreviewstyles__StrategyChipWrapper"]'),
164
+ strategyChip: () => cy.get('[class*="PlanningPreviewstyles__StrategyChip-"]'),
165
+ strategiesPreviewListLI: () => cy.get('[class*="StrategiesPreviewstyles__ListLI"]'),
166
+ chooseStarterLabel: () => cy.get('[class*="ThinkSpherePreviewstyles__DropDownLabel"]'),
167
+ chooseStarterDropdown: () => cy.get('[class*="drop-down-parent"]'),
168
+ chooseStarterTextIconWrapper: () => cy.get('[class*="DropDownstyles__StarterTextIconWrapper"]'),
169
+ chooseStartersListOptions: () => cy.get('.ngie-popover-container.dropdown-list-container li[role="option"]'),
170
+ chooseStartersListOptionLabels: () => cy.get('.ngie-popover-container.dropdown-list-container li[role="option"] .dropdown-label-text'),
171
+ starterTextWrapper: () => cy.get('.starter-text-wrapper'),
172
+ starterIocn: () => cy.get('[class*="DropDownstyles__StarterIconWrapper"]'),
173
+ addNewStrategyTextWrapper: () => cy.get('[class*="StrategiesPreviewstyles__AddStrategyTextWrapper"]'),
174
+ strategyTextWrapper: () => cy.get('[class*="StrategiesPreviewstyles__StrategyTextWrapper"]'),
175
+ videoIconWrapper: () => cy.get('[class*="StrategiesPreviewstyles__VideoIconWrapper"]'),
176
+ whiteBoardCanvas: () => cy.get('[class*="WhiteboardPagesstyles__Canvas"]'),
177
+ whiteBoardImage: () => cy.get('[class*="WhiteboardPagesstyles__BackgroundImage"]'),
178
+ videoPopupTitle: () => cy.get('[class*="dialog-title-wrapper"]'),
179
+ videoPopupCloseButton: () => cy.get('[class*="dialog-close-button"]'),
180
+ videoPreviewPopup: () => cy.get('[class*="video-preview-popup"]'),
181
+ gridItemsWrapper: (number) => cy.get('[class*="DragAndDropGridstyles__GridItemsWrapper"]').eq(number),
182
+ dragButton: (number) => cy.get('[type="button"]').eq(number),
183
+ customizeStampsButton: (customizeStampPosition) => cy.get(`button[aria-label="Stamp ${customizeStampPosition}"]`),
123
184
  };
124
185
 
125
186
  const steps = {
126
- ...createQuestionBasePage.steps,
127
187
  ...backgroundImageUploadComponent.steps,
128
188
  ...questionInstructionsComponent.steps,
129
189
  ...scoringSectionBaseEditTab.steps,
@@ -138,6 +198,8 @@ const steps = {
138
198
  ...equationEditorSectionCommonComponent.steps,
139
199
  ...selectQuestionResourceToolPage.steps,
140
200
  ...browseItemsPage.steps,
201
+ ...videoResponsePage.steps,
202
+ ...createQuestionBasePage.steps,
141
203
 
142
204
  /**
143
205
  * Navigates to the ThinkSphere create question page.
@@ -246,13 +308,32 @@ const steps = {
246
308
  cy.wait(4000);
247
309
  },
248
310
 
311
+ uploadWhiteBoardImage: (file) => {
312
+ thinkSpherePage.whiteBoardInputTypeFile()
313
+ .attachFile(file);
314
+ cy.wait(4000);
315
+ },
316
+
249
317
  /**
250
318
  * Uploads a video file.
251
319
  * @param {string} file - The file to upload.
252
320
  */
253
321
  uploadVideoFile: (file) => {
254
- thinkSpherePage.inputTypeVideoFile()
255
- .attachFile(file);
322
+ const fileName = file.split('/').pop(); // Extracts only 'sample.mp4'
323
+
324
+ cy.fixture(file, 'binary') // Read the file as binary
325
+ .then(Cypress.Blob.binaryStringToBlob)
326
+ .then((blob) => {
327
+ const fileObj = new File([blob], fileName, { type: 'video/mp4' });
328
+ const dataTransfer = new DataTransfer();
329
+ dataTransfer.items.add(fileObj);
330
+
331
+ thinkSpherePage.inputTypeVideoFile().then(($input) => {
332
+ $input[0].files = dataTransfer.files;
333
+ cy.wrap($input).trigger('change', { force: true });
334
+ });
335
+ });
336
+
256
337
  cy.wait(4000);
257
338
  },
258
339
 
@@ -278,11 +359,6 @@ const steps = {
278
359
  thinkSpherePage.addThinkSphereQuestionButton()
279
360
  .click();
280
361
  },
281
-
282
- navigateToThinkSphereCreateQuestion: () => {
283
- thinkSpherePage.steps.navigateToThinkSphereCreateItem();
284
- thinkSpherePage.steps.clickOnAddThinkSphereQuestion();
285
- },
286
362
 
287
363
  verifyCenterOptionAlignmentIsSelected: () => {
288
364
  thinkSpherePage.centerButton()
@@ -386,17 +462,7 @@ const steps = {
386
462
  thinkSpherePage.solveToolsAndControlsOptionsTiles(option)
387
463
  .should('have.attr', 'data-aria-pressed', 'false');
388
464
  },
389
- navigateToThinkSphereCreateItem: () => {
390
- cy.visit('/item-engine/thinksphere/create-item');
391
- },
392
- clickOnAddThinkSphereQuestion: () => {
393
- thinkSpherePage.addThinkSphereQuestionButton()
394
- .click();
395
- },
396
- navigateToThinkSphereCreateQuestion: () => {
397
- thinkSpherePage.steps.navigateToThinkSphereCreateItem();
398
- thinkSpherePage.steps.clickOnAddThinkSphereQuestion();
399
- },
465
+
400
466
  /**
401
467
  * Verifies the options contents.
402
468
  * @param {number} index - The index of the option.
@@ -550,7 +616,7 @@ const steps = {
550
616
  thinkSpherePage.customizeStampCard()
551
617
  .should('have.length', defaultStamps.length);
552
618
  defaultStamps.forEach((ele) => {
553
- utilities.verifyElementVisibilityState(thinkSpherePage.customizeStampCard(`${ele} selected`), 'visible');
619
+ utilities.verifyElementVisibilityState(thinkSpherePage.customizeStampCard(ele, 'true'), 'visible');
554
620
  });
555
621
  });
556
622
  },
@@ -575,9 +641,9 @@ const steps = {
575
641
  thinkSpherePage.customizeStampComponent()
576
642
  .within(() => {
577
643
  thinkSpherePage.steps.clickOnCustomizeCard(0);
578
- utilities.verifyElementVisibilityState(thinkSpherePage.customizeStampCard('Stamp 1 not selected'), 'visible');
644
+ utilities.verifyElementVisibilityState(thinkSpherePage.customizeStampCard('Stamp 1', 'false'), 'visible');
579
645
  thinkSpherePage.steps.clickOnCustomizeCard(0);
580
- utilities.verifyElementVisibilityState(thinkSpherePage.customizeStampCard('Stamp 1 selected'), 'visible');
646
+ utilities.verifyElementVisibilityState(thinkSpherePage.customizeStampCard('Stamp 1', 'true'), 'visible');
581
647
  });
582
648
  },
583
649
 
@@ -597,7 +663,7 @@ const steps = {
597
663
  utilities.verifyCSS(
598
664
  utilities.getNthElement(thinkSpherePage.customizeStampCard(), 0),
599
665
  {
600
- border: `1px solid ${css.color.figDefaultComponentBorder}`,
666
+ border: `1px solid ${css.color.secondaryBtnDisabled}`,
601
667
  },
602
668
  );
603
669
  utilities.getNthElement(thinkSpherePage.customizeStampCard(), 0)
@@ -609,15 +675,186 @@ const steps = {
609
675
  });
610
676
  });
611
677
  },
612
- createReviewQuestion: (questionType = 'Drawing Response') => {
678
+ createReviewQuestion: () => {
679
+ const questionType = 'single selection'
680
+ const options = ['Animal', 'Vehicle', 'Birds', 'Insects'];
613
681
  thinkSpherePage.steps.clickOnCreateItemButton();
614
682
  thinkSpherePage.steps.selectQuestionType(questionType);
683
+ singleSelectionPage.steps.addQuestionInstructions();
684
+ singleSelectionPage.steps.addInputToOptionsInputField(options);
685
+ singleSelectionPage.steps.allotPoints(20);
686
+ singleSelectionPage.steps.checkOptionInSpecifyCorrectAnswerSection(1);
615
687
  thinkSpherePage.steps.clickOnSaveButton();
616
688
  },
689
+
690
+ clickOnVideoLink: () => {
691
+ thinkSpherePage.videoLinkComponent()
692
+ .click();
693
+ },
694
+
695
+ verifyVideoPlaybackTimer: (elapsedTime, totalTime) => {
696
+ thinkSpherePage.playerTimer()
697
+ .should('have.text', `${elapsedTime}/${totalTime}`);
698
+ },
699
+
700
+ waitForPlaybackToBegin: () => {
701
+ thinkSpherePage.playerTimer()
702
+ .should('contain', '0:01/');
703
+ },
704
+
705
+ expandChooseStarterDropdown: () => {
706
+ thinkSpherePage.chooseStarterDropdown()
707
+ .click();
708
+ },
709
+
710
+ verifyOptionAlignmentIsSelected: (direction) => {
711
+ if(direction === 'topLeft') {
712
+ thinkSpherePage.whiteBoardCanvas()
713
+ .should('not.have.css', 'justify-content', 'start');
714
+ } else {
715
+ thinkSpherePage.whiteBoardCanvas()
716
+ .should('have.css', 'justify-content', (direction === 'center' || direction === 'flex-end') ? 'normal' : direction);
717
+ if (direction === 'center') {
718
+ thinkSpherePage.whiteBoardCanvas()
719
+ .should('have.css', 'align-items', 'normal');
720
+ }
721
+ }
722
+ },
723
+
617
724
  clickOnImageRadioButton: () => {
618
725
  thinkSpherePage.imageRadioButton()
619
726
  .click();
620
- }
727
+ },
728
+
729
+ clickOnEditQuestionIcon: () => {
730
+ utilities.getNthElement(thinkSpherePage.editQuestionPencil(), 0)
731
+ .click();
732
+ },
733
+
734
+ clickOnQuestionInstructionExpandImageButton: () => {
735
+ thinkSpherePage.questionInstructionPreviewImageExpandButton()
736
+ .click();
737
+ },
738
+
739
+ clickOnCloseExpandImagePopupButton: () => {
740
+ thinkSpherePage.dialogBoxRoot()
741
+ .within(() => {
742
+ thinkSpherePage.closeExpandImagePopupButton()
743
+ .click();
744
+ });
745
+ },
746
+
747
+ clickOnStrategiesPreviewListLI: () => {
748
+ utilities.getNthElement(thinkSpherePage.strategiesPreviewListLI(), 1)
749
+ .click();
750
+ },
751
+
752
+ clickOnVideoIcon: () => {
753
+ utilities.getNthElement(thinkSpherePage.videoIconWrapper(), 0)
754
+ .click();
755
+ },
756
+
757
+ closeVideoPopup: () => {
758
+ thinkSpherePage.dialogBoxRoot()
759
+ .within(() => {
760
+ thinkSpherePage.buttonClose()
761
+ .click();
762
+ });
763
+ },
764
+
765
+ hoverOnVolumeControlButton: () => {
766
+ thinkSpherePage.volumeControlButton()
767
+ .realHover({ position: 'bottom' });
768
+ },
769
+
770
+ verifyPlaybackElapsedTime: (time) => {
771
+ const playbackTimeElement = thinkSpherePage.playerTimer();
772
+ playbackTimeElement
773
+ .invoke('text')
774
+ .then((text) => {
775
+ let elapsedTime = text.split('/')[0];
776
+ let currentElapsedTimerMinutes = Number(elapsedTime.split(':')[0]);
777
+ let currentElapsedTimerSeconds = Number(elapsedTime.split(':')[1]);
778
+ let currentTotalElapsedTimerSeconds = currentElapsedTimerMinutes * 60 + currentElapsedTimerSeconds;
779
+ expect(currentTotalElapsedTimerSeconds).to.eq(time);
780
+ });
781
+ },
782
+
783
+ getToolbarOptionCount: (number) => {
784
+ return thinkSpherePage.gridItemsWrapper(number).find('button').its('length');
785
+ },
786
+
787
+ selectTools: (array, number) => {
788
+ thinkSpherePage.steps.getToolbarOptionCount(number).then((count) => {
789
+ thinkSpherePage.gridItemsWrapper(number).within(() => {
790
+ for (let i = 0; i < count; i++) {
791
+ thinkSpherePage.dragButton(i)
792
+ .invoke('attr', 'aria-label')
793
+ .then((attr) => {
794
+ if (attr.includes('not-selected')) {
795
+ const toolName = attr.split(' ').slice(0, -1).join(' ');
796
+ if (array.includes(toolName)) {
797
+ thinkSpherePage.dragButton(i)
798
+ .click();
799
+ }
800
+ } else {
801
+ const toolName = attr.split(' ').slice(0, -1).join(' ');
802
+ if (!array.includes(toolName)) {
803
+ thinkSpherePage.dragButton(i)
804
+ .click();
805
+ }
806
+ }
807
+ })
808
+ }
809
+ });
810
+ });
811
+ },
812
+
813
+ verifySelectTools: (array, number) => {
814
+ thinkSpherePage.steps.getToolbarOptionCount(number).then((count) => {
815
+ thinkSpherePage.gridItemsWrapper(number).within(() => {
816
+ for (let i = 0; i < count; i++) {
817
+ thinkSpherePage.dragButton(i)
818
+ .invoke('attr', 'aria-label')
819
+ .then((attr) => {
820
+ const toolName = attr.split(' ').slice(0, -1).join(' ');
821
+ if (array.includes(toolName)) {
822
+ thinkSpherePage.dragButton(i)
823
+ .invoke('attr', 'aria-label')
824
+ .should('contain', ' selected');
825
+ } else {
826
+ thinkSpherePage.dragButton(i)
827
+ .invoke('attr', 'aria-label')
828
+ .should('contain', ' not-selected');
829
+ }
830
+ })
831
+ }
832
+ });
833
+ });
834
+ },
835
+
836
+ verifyUploadedImage: () => {
837
+ thinkSpherePage.whiteBoardImage()
838
+ .should('exist')
839
+ .and('have.attr', 'src')
840
+ .and('not.be.empty');
841
+ },
842
+
843
+ visitThinksphereBrowseItemsPage: () => {
844
+ cy.visit('/item-engine/thinksphere/browse-items');
845
+ cy.interceptGraphql('getItems');
846
+ cy.wait('@getItems');
847
+ },
848
+
849
+ clickOnCustomizeStamp: (customizeStampPosition) => {
850
+ thinkSpherePage.customizeStampsButton(customizeStampPosition)
851
+ .click();
852
+ cy.wait(1000);
853
+ },
854
+
855
+ verifyCustomizeStampSelectedUnselected: (selected, customizeStampPosition) => {
856
+ utilities.verifyElementAttribute(thinkSpherePage.customizeStampsButton(customizeStampPosition), 'aria-checked', selected ? 'true' : 'false');
857
+ },
621
858
  };
622
859
 
623
860
  const tests = {
@@ -916,7 +1153,7 @@ const tests = {
916
1153
 
917
1154
  it('when the user hovers over the enabled \'Delete\' icon buttons, then \'Delete option\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Delete\' icon button', () => {
918
1155
  utilities.getNthElement(thinkSpherePage.deleteButton(), NthElement)
919
- .verifyTooltip('Delete item for item 1');
1156
+ .verifyTooltip(list === 'strategy' ? 'Delete strategy' : 'Delete sentence starter');
920
1157
  });
921
1158
 
922
1159
  it('CSS of enabled delete button tooltip', { tags: 'css' }, () => {
@@ -1163,8 +1400,8 @@ const tests = {
1163
1400
  thinkSpherePage.uploadVideoLinkButton()
1164
1401
  .click();
1165
1402
  });
1166
- thinkSpherePage.steps.uploadVideoFile('uploads/image.png');
1167
- thinkSpherePage.steps.verifyWarningPopup('File upload error', 'The file type is not supported. Please upload files with the following supported formats: mov, avi, mp4, webm, wmv.');
1403
+ thinkSpherePage.steps.uploadVideoFile('uploads/sample.wmv');
1404
+ thinkSpherePage.steps.verifyWarningPopup('File upload error', 'The file type is not supported. Please upload files with the following supported formats: mp4, webm.');
1168
1405
  });
1169
1406
 
1170
1407
  it('CSS of warning popup', { tags: 'css' }, () => {
@@ -1212,14 +1449,29 @@ const tests = {
1212
1449
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
1213
1450
  });
1214
1451
 
1215
- it('When user upload a file of size more than 10MB then an error message should be displayed', () => {
1452
+ it('When user upload a file whose extension is supported then no error message should be displayed', () => {
1453
+ thinkSpherePage.videoLinkComponent()
1454
+ .within(() => {
1455
+ thinkSpherePage.uploadVideoLinkButton()
1456
+ .click();
1457
+ });
1458
+ thinkSpherePage.steps.uploadVideoFile('uploads/sample.webm');
1459
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
1460
+ thinkSpherePage.videoLinkComponent()
1461
+ .within(() => {
1462
+ thinkSpherePage.deleteVideoButton()
1463
+ .click();
1464
+ });
1465
+ });
1466
+
1467
+ it('When user upload a file of size more than 25MB then an error message should be displayed', () => {
1216
1468
  thinkSpherePage.videoLinkComponent()
1217
1469
  .within(() => {
1218
1470
  thinkSpherePage.uploadVideoLinkButton()
1219
1471
  .click();
1220
1472
  });
1221
- thinkSpherePage.steps.uploadVideoFile('uploads/sample20MB.mp4');
1222
- thinkSpherePage.steps.verifyWarningPopup('File upload error', 'The file could not be uploaded. The file is 37 MB exceeding the maximum size of 10 MB.');
1473
+ thinkSpherePage.steps.uploadVideoFile('uploads/sample30MB.mp4');
1474
+ thinkSpherePage.steps.verifyWarningPopup('File upload error', 'The file could not be uploaded. The file is 31 MB exceeding the maximum size of 25 MB.');
1223
1475
  });
1224
1476
 
1225
1477
  it('When user click on OK button of warning popup then the popup should be closed', () => {
@@ -1230,7 +1482,7 @@ const tests = {
1230
1482
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
1231
1483
  });
1232
1484
 
1233
- it('When user upload a file of size less than 10MB then no error message should be displayed and video uploaded successfully', () => {
1485
+ it('When user upload a file of size less than 25MB then no error message should be displayed and video uploaded successfully', () => {
1234
1486
  thinkSpherePage.videoLinkComponent()
1235
1487
  .within(() => {
1236
1488
  thinkSpherePage.uploadVideoLinkButton()
@@ -1265,7 +1517,7 @@ const tests = {
1265
1517
  });
1266
1518
  });
1267
1519
 
1268
- it('When user upload another file size less than 10MB then no error message should be displayed and video uploaded successfully', () => {
1520
+ it('When user upload another file size less than 25MB then no error message should be displayed and video uploaded successfully', () => {
1269
1521
  thinkSpherePage.videoLinkComponent()
1270
1522
  .within(() => {
1271
1523
  thinkSpherePage.editVideoButton()