itemengine-cypress-automation 1.0.585-IEI-7161-main-ba54fa6.0 → 1.0.585-IEI-7055-cypress-9249eaa.0

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.
@@ -1,4 +1,4 @@
1
- import { commonComponents, questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, studentViewSettingsLabelComponent, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings, printPreviewComponent } from "./components";
1
+ import { commonComponents, questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, studentViewSettingsLabelComponent, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings } from "./components";
2
2
  import { createItemPage, dialogBoxBase } from ".";
3
3
  import utilities from "../support/helpers/utilities";
4
4
  import { supportedFileType } from "../fixtures/uploadResponseFileType";
@@ -15,7 +15,6 @@ const selectors = {
15
15
  ...questionInstructionsComponent,
16
16
  ...commonComponents,
17
17
  ...dialogBoxBase,
18
- ...printPreviewComponent,
19
18
 
20
19
  maximumNumberOfFilesInputField: () => cy.get('.input-stepper-textfield'),
21
20
  maximumNumberOfFilesLabel: () => cy.get('.input-stepper-label'),
@@ -74,11 +73,10 @@ const selectors = {
74
73
  inputTypeFile: () => cy.get('input[type="file"]'),
75
74
  uploadedFilesSectionWrapper: () => cy.get('.uploaded-document-wrapper'),
76
75
  uploadedFileWrapper: () => cy.get('.uploaded-document'),
77
- editDisplayTextIcon: () => cy.get('[class*="UploadedDocumentsstyle__DocumentEditIconWrapper"]'),
76
+ editDisplayTextIcon: () => cy.get('.icon-pencil'),
78
77
  fileName: () => cy.get('.studentResponse'),
79
- addFileDescriptionInput: () => cy.get('.uploaded-documents-file-description-input input'),
78
+ addFileDescriptionInput: () => cy.get('[placeholder="Add file description"]'),
80
79
  addFileDescriptionIcon: () => cy.get('.icon-File-description'),
81
- addFileDescriptionLabel: () => cy.get('[class*="UploadedDocumentsstyle__FileDescriptionLabel"]'),
82
80
  scanningForVirusPreLoader: () => cy.get('[alt="loader"]'),
83
81
  virusErrorMessageWrapper: () => cy.get('.FileUploadStatementLarge'),
84
82
  uploadedFileLink: () => cy.get('img[src*="/files/document?key=freeResponse/"]'),
@@ -101,25 +99,6 @@ const selectors = {
101
99
  downloadIconOfPopUp: () => cy.get('.download-icon'),
102
100
  downloadTextOfPopUp: () => cy.get('[class*="UploadedDocumentsstyle__DownloadTextWrapper"]'),
103
101
  closePopUpButton: () => cy.get('.close-popup-btn'),
104
-
105
- //Print layout settings additional content selectors
106
- displayLinesForTheResponseLabel: () => cy.get('label[aria-label*="Display lines for the response"]'),
107
- displayLinesForTheResponseCheckbox: () => cy.get('input[aria-label*="Display lines for the response"]'),
108
- numberOfLinesInputField: () => cy.get('[aria-labelledby*="number-of-lines"]'),
109
- numberOfLinesLabel: () => cy.get('.number-of-lines-label'),
110
- lineSpacingLabel: () => cy.get('[id="Line-Spacing-dropdown-label"]'),
111
- lineSpacingDropdown: () => cy.get('.print-layout-settings-detail-wrapper [aria-label*="Line Spacing"]'),
112
- lineSpacingDropdownListOptions: (ariaLabel = null) => {
113
- if (ariaLabel) {
114
- return cy.get(`[aria-labelledby*="Line-Spacing-dropdown-label Line-Spacing-placeholder"] [role="option"][aria-label*="${ariaLabel}"]`)
115
- } else {
116
- return cy.get('[aria-labelledby*="Line-Spacing-dropdown-label Line-Spacing-placeholder"] [role="option"]')
117
- }
118
- },
119
- numberOfLinesInPrintView: () => cy.get('[class*="UploadResponsePrintPreviewstyles__Line"]'),
120
- uploadedFileButton: () => cy.get('[class*="UploadedDocumentsstyle__UploadedDocumentNameContainer"] button'),
121
- uploadedFileDownloadButton: () => cy.get('[class*="UploadedDocumentsstyle__DownloadTextWrapper"]'),
122
- uploadedFileDownloadLinkText: () => cy.get('[class*="DocumentNameWrapper studentResponse"]'),
123
102
  }
124
103
 
125
104
  const steps = {
@@ -130,7 +109,7 @@ const steps = {
130
109
  ...commonComponents.steps,
131
110
  ...autoScoredScoringPreviewTab.steps,
132
111
  ...createItemPage.steps,
133
- ...printPreviewComponent.steps,
112
+
134
113
  /**
135
114
  * @param {number} maxValue value of maximum number of files
136
115
  * @description function enters value in maximum number of files input field
@@ -676,82 +655,7 @@ const steps = {
676
655
  utilities.verifyElementVisibilityState(uploadResponsePage.cancelButton(), 'visible');
677
656
  utilities.verifyInnerText(uploadResponsePage.acceptButton(), 'Capture');
678
657
  utilities.verifyElementVisibilityState(uploadResponsePage.acceptButton(), 'visible');
679
- },
680
-
681
- verifyDisplayLinesForTheResponseCheckboxUnchecked: () => {
682
- uploadResponsePage.displayLinesForTheResponseCheckbox()
683
- .should('not.be.checked');
684
- },
685
-
686
- verifyDisplayLinesForTheResponseCheckboxChecked: () => {
687
- uploadResponsePage.displayLinesForTheResponseCheckbox()
688
- .should('be.checked');
689
- },
690
-
691
- checkDisplayLinesForTheResponseCheckbox: () => {
692
- uploadResponsePage.displayLinesForTheResponseCheckbox()
693
- .click()
694
- steps.verifyDisplayLinesForTheResponseCheckboxChecked();
695
- },
696
-
697
- uncheckDisplayLinesForTheResponseCheckbox: () => {
698
- uploadResponsePage.displayLinesForTheResponseCheckbox()
699
- .click();
700
- steps.verifyDisplayLinesForTheResponseCheckboxUnchecked();
701
- },
702
-
703
- expandLineSpacingDropdown: () => {
704
- uploadResponsePage.lineSpacingDropdown()
705
- .click();
706
- },
707
-
708
- /**
709
- * @description this function is select option from line spacing dropdown
710
- * @param {number} option is to be selected from the dropdown
711
- */
712
- selectLineSpacingDropdownOption: (option) => {
713
- uploadResponsePage.lineSpacingDropdownListOptions(option)
714
- .click();
715
- utilities.verifyInnerText(uploadResponsePage.lineSpacingDropdown(), option);
716
- },
717
-
718
- /**
719
- * @description this function is to add value in number of lines input field
720
- * @param {number} value need to add in the input field
721
- */
722
- addValueInNumberOfLinesInputField: (value) => {
723
- uploadResponsePage.numberOfLinesInputField()
724
- .clear()
725
- .type(value)
726
- .should('have.value', value);
727
- },
728
-
729
- /**
730
- * @description this function verifies the number of lines and their height in the print view
731
- * @param {number} expectedLines number of lines in the print view
732
- * @param {number} expectedLineHeight height of each line in the print view
733
- */
734
- verifyNumberOfLinesInPrintView: (expectedLines, expectedLineHeight) => {
735
- uploadResponsePage.numberOfLinesInPrintView()
736
- .should('have.length', expectedLines)
737
- .each(($line) => {
738
- cy.wrap($line).should('have.css', 'height', expectedLineHeight);
739
- });
740
- },
741
-
742
- /**
743
- * @description this function verifies the downloaded filename
744
- * @param {string} fileName for the uploaded file
745
- * @param {number} index of the file type option to be click
746
- */
747
- verifyDownloadedFilename: (fileName, index) => {
748
- uploadResponsePage.uploadedFileButton()
749
- .eq(index)
750
- .click();
751
- uploadResponsePage.uploadedFileDownloadButton()
752
- .click();
753
- cy.verifyDownload(fileName);
754
- },
658
+ }
755
659
  }
756
660
 
757
661
  const tests = {
@@ -764,7 +668,6 @@ const tests = {
764
668
  ...additionalSettingsAccessibilitySectionComponent.tests,
765
669
  ...studentViewSettingsLabelComponent.tests,
766
670
  ...autoScoredStudentViewSettings.tests,
767
- ...printPreviewComponent.tests,
768
671
  verifyWarningMessageDisappear: () => {
769
672
  it('The error message should disappear if the user clicks anywhere in the upload file content wrapper', () => {
770
673
  uploadResponsePage.inputTypeFile()
@@ -773,69 +676,7 @@ const tests = {
773
676
  uploadResponsePage.warningMessage()
774
677
  .should('not.exist');
775
678
  });
776
- },
777
-
778
- verifyPrintLayoutSettingsAccordionAdditionalContent: () => {
779
- const lineSpacingDropdownOptions = ['Single', 'Double'];
780
- it('\'Display lines for the response\' label should be displayed', () => {
781
- utilities.verifyInnerText(uploadResponsePage.displayLinesForTheResponseLabel(), 'Display lines for the response');
782
- utilities.verifyElementVisibilityState(uploadResponsePage.displayLinesForTheResponseLabel(), 'visible');
783
- });
784
-
785
- it('Display lines for the response checkbox should be displayed and by default unchecked', () => {
786
- utilities.verifyElementVisibilityState(uploadResponsePage.displayLinesForTheResponseCheckbox(), 'exist');
787
- steps.verifyDisplayLinesForTheResponseCheckboxUnchecked();
788
- });
789
-
790
- it('CSS of \'Display lines for the response\' section', { tags: 'css' }, () => {
791
- utilities.verifyCSS(uploadResponsePage.displayLinesForTheResponseLabel(), {
792
- 'color': css.color.labelText,
793
- 'font-size': css.fontSize.normal,
794
- 'font-weight': css.fontWeight.regular
795
- });
796
- });
797
-
798
- it('Accessibility of \'Display lines for the response\' section', { tags: 'a11y' }, () => {
799
- cy.checkAccessibility(uploadResponsePage.displayLinesForTheResponseLabel().parents('.print-layout-settings-container'));
800
- });
801
-
802
- it('User should be able to check and uncheck the \'Display lines for the response\' checkbox', () => {
803
- steps.checkDisplayLinesForTheResponseCheckbox();
804
- steps.uncheckDisplayLinesForTheResponseCheckbox();
805
- });
806
-
807
- it('Number of lines label and input field should be displayed when \'Display lines for the response\' checkbox is checked', () => {
808
- steps.checkDisplayLinesForTheResponseCheckbox();
809
- utilities.verifyInnerText(uploadResponsePage.numberOfLinesLabel(), 'Number of lines');
810
- utilities.verifyElementVisibilityState(uploadResponsePage.numberOfLinesLabel(), 'visible');
811
- utilities.verifyElementVisibilityState(uploadResponsePage.numberOfLinesInputField(), 'exist');
812
- });
813
-
814
- it('User should be able to enter value in Number of lines input field', () => {
815
- uploadResponsePage.steps.addValueInNumberOfLinesInputField('5');
816
- });
817
-
818
- it(`\'Line Spacing\' label should be displayed and \'Line Spacing\' dropdown should be displayed and in \'Line Spacing\' dropdown \'${lineSpacingDropdownOptions[0]}\' option should be selected by default`, () => {
819
- utilities.verifyInnerText(uploadResponsePage.lineSpacingLabel(), 'Line spacing');
820
- utilities.verifyElementVisibilityState(uploadResponsePage.lineSpacingDropdown(), 'visible');
821
- utilities.verifyInnerText(uploadResponsePage.lineSpacingDropdown(), lineSpacingDropdownOptions[0]);
822
- });
823
-
824
- it(`\'Line Spacing\' dropdown should have the following options: ${lineSpacingDropdownOptions.join(', ')}`, () => {
825
- steps.expandLineSpacingDropdown()
826
- lineSpacingDropdownOptions.forEach((option, count) => {
827
- utilities.verifyInnerText(uploadResponsePage.lineSpacingDropdownListOptions().eq(count), option)
828
- });
829
- uploadResponsePage.steps.selectLineSpacingDropdownOption('Double')
830
- });
831
-
832
- it('User should be able to select options from Line Spacing dropdown', () => {
833
- lineSpacingDropdownOptions.forEach((option) => {
834
- uploadResponsePage.steps.expandLineSpacingDropdown();
835
- uploadResponsePage.steps.selectLineSpacingDropdownOption(option)
836
- });
837
- });
838
- },
679
+ }
839
680
  }
840
681
 
841
682
  export const uploadResponsePage = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.585-IEI-7161-main-ba54fa6.0",
3
+ "version": "1.0.585-IEI-7055-cypress-9249eaa.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {