itemengine-cypress-automation 1.0.574-IEI-7080-e6d1871.0 → 1.0.574-IEI-7071-main-360bc22.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,7 +1,8 @@
1
1
  import abortEarlySetup from "../../../support/helpers/abortEarly";
2
- import { shortTextResponsePage } from "../../../pages";
2
+ import { shortTextResponsePage, itemPreviewPage } from "../../../pages";
3
3
  import utilities from "../../../support/helpers/utilities";
4
4
  const css = Cypress.env('css');
5
+ let itemReferenceID = '';
5
6
 
6
7
  describe('Create question page - Short text response: Question Instructions, Set limit', () => {
7
8
  before(() => {
@@ -583,4 +584,57 @@ describe('Create question page - Short text response: Question Instructions, Set
583
584
  shortTextResponsePage.steps.focusInAnswerInputFieldPreviewTab();
584
585
  });
585
586
  });
587
+
588
+ describe('Print layout settings accordion', () => {
589
+ abortEarlySetup();
590
+ before(() => {
591
+ shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
592
+ cy.barsPreLoaderWait();
593
+ });
594
+
595
+ shortTextResponsePage.tests.verifyPrintLayoutSettingsAccordionProperties();
596
+ shortTextResponsePage.tests.verifyPrintLayoutSettingsAccordionContents();
597
+ shortTextResponsePage.tests.verifyPrintLayoutSettingsAccordionAdditionalContent();
598
+ });
599
+
600
+ describe('Print layout settings: Default state', () => {
601
+ abortEarlySetup();
602
+ before(() => {
603
+ shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
604
+ cy.barsPreLoaderWait();
605
+ shortTextResponsePage.steps.expandPrintLayoutSettings();
606
+ shortTextResponsePage.steps.addTextInQuestionInstructionsInputField('short text response instructions.');
607
+ });
608
+
609
+ it('When the user navigates to the print view, then instructions and number of lines with 32px height should be displayed correctly', () => {
610
+ shortTextResponsePage.steps.clickOnSaveQuestionButton();
611
+ shortTextResponsePage.steps.clickOnConfirmButton();
612
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
613
+ cy.wrap(itemPreviewPage.steps.getItemReferenceID()).then((referenceId) => {
614
+ itemReferenceID = referenceId;
615
+ cy.visit(`/item-engine/demo/render-item/print-view/${utilities.base64Encoding(itemReferenceID)}`);
616
+ utilities.verifyInnerText(shortTextResponsePage.questionInstructionsPrintPreviewText(), 'short text response instructions.');
617
+ shortTextResponsePage.steps.verifyNumberOfLinesInPrintView(1, '32px');
618
+ });
619
+ });
620
+
621
+ it('When the modified number of lines and line spacing are applied, then instructions and number of lines with modified line spacing should be displayed correctly', () => {
622
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
623
+ shortTextResponsePage.steps.clickOnEditQuestionButton();
624
+ shortTextResponsePage.steps.expandPrintLayoutSettings();
625
+ shortTextResponsePage.steps.addTextInQuestionInstructionsInputFieldForPrint('short text response modify instructions.');
626
+ shortTextResponsePage.steps.addValueInNumberOfLinesInputField('5');
627
+ shortTextResponsePage.steps.expandLineSpacingDropdown();
628
+ shortTextResponsePage.steps.selectLineSpacingDropdownOption('Double');
629
+ shortTextResponsePage.steps.clickOnSaveQuestionButton();
630
+ shortTextResponsePage.steps.clickOnConfirmButton();
631
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
632
+ cy.wrap(itemPreviewPage.steps.getItemReferenceID()).then((referenceId) => {
633
+ itemReferenceID = referenceId;
634
+ cy.visit(`/item-engine/demo/render-item/print-view/${utilities.base64Encoding(itemReferenceID)}`);
635
+ utilities.verifyInnerText(shortTextResponsePage.questionInstructionsPrintPreviewText(), 'short text response modify instructions.');
636
+ shortTextResponsePage.steps.verifyNumberOfLinesInPrintView(5, '48px');
637
+ });
638
+ });
639
+ });
586
640
  });
@@ -157,7 +157,7 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
157
157
  });
158
158
  //Category tiles in de-selected state
159
159
  utilities.verifyCSS(shortTextResponsePage.specialCharacterTileIcon().eq(0).find('svg'), {
160
- 'fill': css.color.secondaryBtn
160
+ 'fill': css.color.optionColor
161
161
  });
162
162
  utilities.verifyCSS(shortTextResponsePage.specialCharacterTileSectionCategoriesDragIcon().eq(0).find('path'), {
163
163
  'fill': css.color.secondaryBtn
@@ -198,10 +198,10 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
198
198
  cy.checkAccessibility(dialogBoxBase.dialogBox());
199
199
  cy.log('Closing preview popup');
200
200
  dialogBoxBase.steps.closeWarningPopup();
201
- cy.checkAccessibility(shortTextResponsePage.specialCharactersLabel().parents('.edit-question-edit-tab-wrapper'));
201
+ cy.checkAccessibility(shortTextResponsePage.specialCharactersLabel());
202
202
  cy.log('Selecting show only custom special characters radio button');
203
203
  shortTextResponsePage.steps.selectShowOnlyCustomSpecialCharactersRadioButton();
204
- cy.checkAccessibility(shortTextResponsePage.specialCharactersLabel().parent());
204
+ cy.checkAccessibility(shortTextResponsePage.customSpecialCharactersInputFieldWrapper());
205
205
  });
206
206
  });
207
207
 
@@ -1,7 +1,10 @@
1
- import { shortTextResponsePage } from "../../../pages";
1
+ import { shortTextResponsePage, itemPreviewPage } from "../../../pages";
2
2
  import abortEarlySetup from "../../../support/helpers/abortEarly";
3
3
  import utilities from "../../../support/helpers/utilities";
4
4
  const css = Cypress.env('css');
5
+ let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
6
+ const views = utilities.getViews(correctAnswerViews);
7
+ let itemReferenceID = "";
5
8
 
6
9
  const labels = [shortTextResponsePage.displayWordCountLabel, shortTextResponsePage.spellCheckLabel, shortTextResponsePage.autoScaleTheResponseFieldHeightLabel];
7
10
  const checkboxes = [shortTextResponsePage.displayWordCountCheckbox, shortTextResponsePage.spellCheckCheckbox, shortTextResponsePage.autoScaleTheResponseFieldHeightCheckbox];
@@ -330,4 +333,129 @@ describe('Create Item page - Short text response : Student view settings', () =>
330
333
  shortTextResponsePage.steps.verifyCheckAnswerButtonEnabled();
331
334
  });
332
335
  });*/
336
+
337
+
338
+ views.forEach((view) => {
339
+ describe(`${view}: Student view settings default state`, () => {
340
+ abortEarlySetup();
341
+ before(() => {
342
+ switch (view) {
343
+ case 'Question preview':
344
+ shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
345
+ cy.barsPreLoaderWait();
346
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Correct answer');
347
+ shortTextResponsePage.steps.allotPoints(10);
348
+ shortTextResponsePage.steps.switchToPreviewTab();
349
+ break;
350
+ case 'Item preview':
351
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
352
+ itemPreviewPage.steps.switchToPreviewTab();
353
+ break;
354
+ case 'Student view':
355
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
356
+ break;
357
+ };
358
+ });
359
+
360
+ beforeEach(() => {
361
+ switch (view) {
362
+ case 'Question preview':
363
+ break;
364
+ case 'Item preview':
365
+ shortTextResponsePage.steps.switchToGradingView();
366
+ break;
367
+ case 'Student view':
368
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
369
+ break;
370
+ }
371
+ });
372
+
373
+ if (view === 'Question preview') {
374
+ after(() => {
375
+ shortTextResponsePage.steps.clickOnSaveQuestionButton();
376
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
377
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
378
+ });
379
+ };
380
+
381
+ it(`When the \'Auto scale the response field height (no scrolling)\' checkbox is unchecked, then entering long text into the input field should display the entire text in the response input field on a single scrollable line and height of the response input field should remain unchanged in ${view}`, () => {
382
+ shortTextResponsePage.steps.verifyAutoScaleHeightOfResponseFieldFunctionalityPreviewTab('Disabled');
383
+ });
384
+
385
+ it(`When the \'Spell check\' checkbox is unchecked, the response field should have \'spellcheck\' attribute set as \'false\' in the ${view}`, () => {
386
+ shortTextResponsePage.steps.verifySpellCheckOfResponseFieldDisabledInAllViews();
387
+ });
388
+
389
+ it(`When \'Display character count\' checkbox is unchecked, then the \'Character\' label and count should not be displayed in ${view}`, () => {
390
+ utilities.verifyElementVisibilityState(shortTextResponsePage.characterWordCountLabelPreviewTab(), 'notExist');
391
+ utilities.verifyElementVisibilityState(shortTextResponsePage.characterWordCountLabelPreviewTab(), 'notExist');
392
+ });
393
+ });
394
+ });
395
+
396
+ views.forEach((view) => {
397
+ describe(`${view}: Student view settings`, () => {
398
+ abortEarlySetup();
399
+ before(() => {
400
+ switch (view) {
401
+ case 'Question preview':
402
+ shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
403
+ cy.barsPreLoaderWait();
404
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Correct answer');
405
+ shortTextResponsePage.steps.allotPoints(10);
406
+ shortTextResponsePage.steps.checkAutoScaleTheResponseFieldHeightCheckbox();
407
+ shortTextResponsePage.steps.checkSpellCheckCheckbox();
408
+ shortTextResponsePage.steps.checkDisplayCharacterCountCheckbox();
409
+ shortTextResponsePage.steps.switchToPreviewTab();
410
+ break;
411
+ case 'Item preview':
412
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
413
+ itemPreviewPage.steps.switchToPreviewTab();
414
+ break;
415
+ case 'Student view':
416
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
417
+ break;
418
+ };
419
+ });
420
+
421
+ beforeEach(() => {
422
+ switch (view) {
423
+ case 'Question preview':
424
+ break;
425
+ case 'Item preview':
426
+ shortTextResponsePage.steps.switchToGradingView();
427
+ break;
428
+ case 'Student view':
429
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
430
+ break;
431
+ }
432
+ });
433
+
434
+ if (view === 'Question preview') {
435
+ after(() => {
436
+ shortTextResponsePage.steps.clickOnSaveQuestionButton();
437
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
438
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
439
+ });
440
+ };
441
+
442
+ it(`When \'Auto scale the response field height (no scrolling)\' checkbox is checked, then entering a long text in the input field should display the entire text in the response input field, and the height of the response input field should automatically resize according to the entered text in the ${view}`, () => {
443
+ shortTextResponsePage.steps.verifyAutoScaleHeightOfResponseFieldFunctionalityPreviewTab('Enabled');
444
+ });
445
+
446
+ it(`When the \'Spell check\' functionality is enabled, the response field should have \'spellcheck\' attribute set as \'true\' in the ${view}`, () => {
447
+ shortTextResponsePage.steps.verifySpellCheckOfResponseFieldEnabledInAllViews();
448
+ });
449
+
450
+ it(`When \'Display character count\' checkbox is checked, then the \'Character\' label and count should be displayed and count should be zero by default in the ${view}`, () => {
451
+ utilities.verifyInnerText(shortTextResponsePage.characterWordCountLabelPreviewTab(), 'Characters: 0');
452
+ utilities.verifyElementVisibilityState(shortTextResponsePage.characterWordCountLabelPreviewTab(), 'visible');
453
+ });
454
+
455
+ it(`When user enters text in response field, then character count should be updated in the ${view}`, () => {
456
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTabNew('Flowers are blooming');
457
+ utilities.verifyInnerText(shortTextResponsePage.characterWordCountLabelPreviewTab(), 'Characters: 20');
458
+ });
459
+ });
460
+ });
333
461
  });
@@ -54,7 +54,14 @@ const steps = {
54
54
  verifyQuestionInstructionsInputFieldForPrintDisabledState: () => {
55
55
  printPreviewComponent.questionInstructionsInputFieldForPrint()
56
56
  .should('have.attr', 'contenteditable', 'false');
57
- }
57
+ },
58
+
59
+ addTextInQuestionInstructionsInputFieldForPrint: (text) => {
60
+ printPreviewComponent.questionInstructionsInputFieldForPrint()
61
+ .clear()
62
+ .type(text)
63
+ .should('have.text', text);
64
+ },
58
65
 
59
66
  };
60
67
 
@@ -1,4 +1,4 @@
1
- import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent } from "./components/";
1
+ import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent, printPreviewComponent } from "./components/";
2
2
  import { dialogBoxBase } from "./dialogBoxBase";
3
3
  import utilities from "../support/helpers/utilities";
4
4
  import { createItemPage } from "./createItemPage";
@@ -16,6 +16,8 @@ const selectors = {
16
16
  ...commonComponents,
17
17
  ...additionalSettingsPanel,
18
18
  ...createQuestionBasePage,
19
+ ...printPreviewComponent,
20
+ ...autoScoredScoringSectionMultiResponseType,
19
21
 
20
22
  answerLabelSpecifyCorrectAnswerSection: () => cy.get('.answer-label'),
21
23
  displayCharacterCountLabel: () => cy.get('[data-ngie-testid="display-character-count-checkbox"] .MuiFormControlLabel-label'),
@@ -92,6 +94,23 @@ const selectors = {
92
94
  ariaLabelLabel: () => cy.get('.aria-label-wrapper .title-casing'),
93
95
  ariaLabelInputField: () => cy.get('.aria-label-wrapper [role="textbox"]'),
94
96
  questionInstructionsTextPreviewTab: () => cy.get('.question-instruction:visible'),
97
+ displayLinesForTheResponseLabel: () => cy.get('label[aria-label*="Display lines for the response"]'),
98
+ displayLinesForTheResponseCheckbox: () => cy.get('input[aria-label*="Display lines for the response"]'),
99
+ numberOfLinesInputField: () => cy.get('[aria-labelledby*="number-of-lines"]'),
100
+ numberOfLinesLabel: () => cy.get('.number-of-lines-label'),
101
+ lineSpacingLabel: () => cy.get('[id="Line-Spacing-dropdown-label"]'),
102
+ lineSpacingDropdown: () => cy.get('.print-layout-settings-detail-wrapper [aria-label*="Line Spacing"]'),
103
+ lineSpacingDropdownListOptions: (ariaLabel = null) => {
104
+ if (ariaLabel) {
105
+ return cy.get(`[aria-labelledby*="Line-Spacing-dropdown-label Line-Spacing-placeholder"] [role="option"][aria-label*="${ariaLabel}"]`)
106
+ } else {
107
+ return cy.get('[aria-labelledby*="Line-Spacing-dropdown-label Line-Spacing-placeholder"] [role="option"]')
108
+ }
109
+ },
110
+ numberOfLinesInPrintView: () => cy.get('.student-view [class*="ShortTextResponsePreviewstyle__OptionsWrapper"] [class*="ShortTextResponsePreviewstyle__Line"],[class*="ShortTextResponsePreviewstyle__Question"] [class*="ShortTextResponsePreviewstyle__Line"]'),
111
+ answerResponseInputField: () => cy.get('[aria-label*="Enter your response to the question here "]'),
112
+ answerResponseInputFieldWrapper: () => cy.get('.additional-option-placeholder-input input,.additional-option-placeholder-input textarea'),
113
+ answerInputField: () => cy.get('.additional-option-placeholder-input'),
95
114
  }
96
115
 
97
116
  const steps = {
@@ -106,6 +125,8 @@ const steps = {
106
125
  ...additionalSettingsPanel.steps,
107
126
  ...autoScoredSpecifyCorrectAnswerSection.steps,
108
127
  ...createItemPage.steps,
128
+ ...printPreviewComponent.steps,
129
+ ...autoScoredScoringSectionMultiResponseType.steps,
109
130
 
110
131
  verifyCorrectIcon: () => {
111
132
  utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
@@ -179,6 +200,16 @@ const steps = {
179
200
  .type(text);
180
201
  },
181
202
 
203
+ /**
204
+ * @param {string} text text to entered in response input field
205
+ * @description enters text in answer input field
206
+ */
207
+ enterTextInAnswerInputField: (text) => {
208
+ shortTextResponsePage.answerResponseInputField()
209
+ .clear()
210
+ .type(text);
211
+ },
212
+
182
213
  clearAndFocusOutOfSpecifyCorrectAnswerInputField: () => {
183
214
  shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection()
184
215
  .clear()
@@ -813,6 +844,14 @@ const steps = {
813
844
  steps.verifyClipboardFunctionButtonUnselectedState(index);
814
845
  },
815
846
 
847
+ deselectAllClipboardFunctionButton: () => {
848
+ for (let index = 0; index < 3; index++) {
849
+ shortTextResponsePage.clipboardFunctionButton(index)
850
+ .click();
851
+ steps.verifyClipboardFunctionButtonUnselectedState(index);
852
+ }
853
+ },
854
+
816
855
  enterTextInPlaceholderTextInputField: (text) => {
817
856
  shortTextResponsePage.placeholderTextInputField()
818
857
  .clear()
@@ -899,7 +938,99 @@ const steps = {
899
938
  verifyFlagThisItemNonAccessibleCheckboxIsUnchecked: () => {
900
939
  shortTextResponsePage.flagNonAccessibleCheckbox()
901
940
  .should('not.be.checked');
902
- }
941
+ },
942
+
943
+ verifyDisplayLinesForTheResponseCheckboxUnchecked: () => {
944
+ shortTextResponsePage.displayLinesForTheResponseCheckbox()
945
+ .should('not.be.checked');
946
+ },
947
+
948
+ verifyDisplayLinesForTheResponseCheckboxChecked: () => {
949
+ shortTextResponsePage.displayLinesForTheResponseCheckbox()
950
+ .should('be.checked');
951
+ },
952
+
953
+ checkDisplayLinesForTheResponseCheckbox: () => {
954
+ shortTextResponsePage.displayLinesForTheResponseCheckbox()
955
+ .click()
956
+ steps.verifyDisplayLinesForTheResponseCheckboxChecked();
957
+ },
958
+
959
+ uncheckDisplayLinesForTheResponseCheckbox: () => {
960
+ shortTextResponsePage.displayLinesForTheResponseCheckbox()
961
+ .click();
962
+ steps.verifyDisplayLinesForTheResponseCheckboxUnchecked();
963
+ },
964
+
965
+ expandLineSpacingDropdown: () => {
966
+ shortTextResponsePage.lineSpacingDropdown()
967
+ .click();
968
+ },
969
+
970
+ selectLineSpacingDropdownOption: (option) => {
971
+ shortTextResponsePage.lineSpacingDropdownListOptions(option)
972
+ .click();
973
+ utilities.verifyInnerText(shortTextResponsePage.lineSpacingDropdown(), option);
974
+ },
975
+
976
+ addValueInNumberOfLinesInputField: (value) => {
977
+ shortTextResponsePage.numberOfLinesInputField()
978
+ .clear()
979
+ .type(value)
980
+ .should('have.value', value);
981
+ },
982
+
983
+ verifyNumberOfLinesInPrintView: (expectedLines, expectedLineHeight) => {
984
+ shortTextResponsePage.numberOfLinesInPrintView()
985
+ .should('have.length', expectedLines)
986
+ .each(($line) => {
987
+ cy.wrap($line).should('have.css', 'height', expectedLineHeight);
988
+ });
989
+ },
990
+
991
+ copyTextFromAnswerResponseField: () => {
992
+ shortTextResponsePage.answerResponseInputField()
993
+ .focus()
994
+ .type('{selectall}')
995
+ .realPress(['Control', 'c']);
996
+ },
997
+
998
+ cutTextFromAnswerResponseField: () => {
999
+ shortTextResponsePage.answerResponseInputField()
1000
+ .focus()
1001
+ .type('{selectall}')
1002
+ .realPress(['Control', 'x']);
1003
+ },
1004
+
1005
+ pasteTextFromAnswerResponseField: () => {
1006
+ shortTextResponsePage.answerResponseInputField()
1007
+ .focus()
1008
+ .type('{selectall}')
1009
+ .realPress(['Control', 'c'])
1010
+ .realPress(['Control', 'v']);
1011
+ },
1012
+
1013
+ verifySpellCheckOfResponseFieldDisabledInAllViews: () => {
1014
+ shortTextResponsePage.answerResponseInputFieldWrapper()
1015
+ .should('have.prop', 'spellcheck', false);
1016
+ },
1017
+
1018
+ verifySpellCheckOfResponseFieldEnabledInAllViews: () => {
1019
+ shortTextResponsePage.answerInputField()
1020
+ .should('have.prop', 'spellcheck', true);
1021
+ },
1022
+
1023
+ /**
1024
+ * @param {string} text text to be entered in response field preview tab
1025
+ * @description enters text in preview tab response field
1026
+ *
1027
+ */
1028
+ enterTextInAnswerInputFieldPreviewTabNew: (text) => {
1029
+ shortTextResponsePage.answerResponseInputFieldWrapper()
1030
+ .eq(0)
1031
+ .clear()
1032
+ .type(text);
1033
+ },
903
1034
  }
904
1035
 
905
1036
  const tests = {
@@ -915,6 +1046,7 @@ const tests = {
915
1046
  ...additionalSettingsPanel.tests,
916
1047
  ...autoScoredSpecifyCorrectAnswerSection.tests,
917
1048
  ...studentResponseAndLayoutComponent.tests,
1049
+ ...printPreviewComponent.tests,
918
1050
 
919
1051
  /**
920
1052
  * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
@@ -931,15 +1063,11 @@ const tests = {
931
1063
  utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
932
1064
  });
933
1065
 
934
- autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredCorrectAnswerErrorMessageCSSAndA11y();
935
-
936
1066
  it('When gives an input to \'Answer\' input field,then error message should disappear', () => {
937
1067
  shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Nature');
938
1068
  commonComponents.steps.verifyErrorMessageIsNotDisplayed();
939
1069
  });
940
1070
 
941
- autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
942
-
943
1071
  it(`CSS of ${accordionName} accordion contents`, { tags: 'css' }, () => {
944
1072
  utilities.verifyCSS(utilities.getNthElement(shortTextResponsePage.correctAnswerAccordionLabel(), 0), {
945
1073
  'color': css.color.accordionLabel,
@@ -959,6 +1087,67 @@ const tests = {
959
1087
  utilities.verifyElementCount(shortTextResponsePage.answerInputFieldSpecifyCorrectAnswerSection(), 1);
960
1088
  });
961
1089
  },
1090
+
1091
+ verifyPrintLayoutSettingsAccordionAdditionalContent: () => {
1092
+ const lineSpacingDropdownOptions = ['Single', 'Double'];
1093
+ it('\'Display lines for the response\' label should be displayed', () => {
1094
+ utilities.verifyInnerText(shortTextResponsePage.displayLinesForTheResponseLabel(), 'Display lines for the response');
1095
+ utilities.verifyElementVisibilityState(shortTextResponsePage.displayLinesForTheResponseLabel(), 'visible');
1096
+ });
1097
+
1098
+ it('Display lines for the response checkbox should be displayed and by default checked', () => {
1099
+ utilities.verifyElementVisibilityState(shortTextResponsePage.displayLinesForTheResponseCheckbox(), 'exist');
1100
+ steps.verifyDisplayLinesForTheResponseCheckboxChecked();
1101
+ });
1102
+
1103
+ it('CSS of \'Display lines for the response\' section', { tags: 'css' }, () => {
1104
+ utilities.verifyCSS(shortTextResponsePage.displayLinesForTheResponseLabel(), {
1105
+ 'color': css.color.labelText,
1106
+ 'font-size': css.fontSize.normal,
1107
+ 'font-weight': css.fontWeight.regular
1108
+ });
1109
+ });
1110
+
1111
+ it('Accessibility of \'Display lines for the response\' section', { tags: 'a11y' }, () => {
1112
+ cy.checkAccessibility(shortTextResponsePage.displayLinesForTheResponseLabel().parents('.print-layout-settings-container'));
1113
+ });
1114
+
1115
+ it('User should be able to check and uncheck the \'Display lines for the response\' checkbox', () => {
1116
+ steps.uncheckDisplayLinesForTheResponseCheckbox();
1117
+ steps.checkDisplayLinesForTheResponseCheckbox();
1118
+ });
1119
+
1120
+ it('Number of lines label and input field should be displayed when \'Display lines for the response\' checkbox is checked', () => {
1121
+ utilities.verifyInnerText(shortTextResponsePage.numberOfLinesLabel(), 'Number of lines');
1122
+ utilities.verifyElementVisibilityState(shortTextResponsePage.numberOfLinesLabel(), 'visible');
1123
+ utilities.verifyElementVisibilityState(shortTextResponsePage.numberOfLinesInputField(), 'exist');
1124
+ });
1125
+
1126
+ it('User should be able to enter value in Number of lines input field', () => {
1127
+ shortTextResponsePage.steps.addValueInNumberOfLinesInputField('5');
1128
+ });
1129
+
1130
+ 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`, () => {
1131
+ utilities.verifyInnerText(shortTextResponsePage.lineSpacingLabel(), 'Line spacing');
1132
+ utilities.verifyElementVisibilityState(shortTextResponsePage.lineSpacingDropdown(), 'visible');
1133
+ utilities.verifyInnerText(shortTextResponsePage.lineSpacingDropdown(), lineSpacingDropdownOptions[0]);
1134
+ });
1135
+
1136
+ it(`\'Line Spacing\' dropdown should have the following options: ${lineSpacingDropdownOptions.join(', ')}`, () => {
1137
+ steps.expandLineSpacingDropdown()
1138
+ lineSpacingDropdownOptions.forEach((option, count) => {
1139
+ utilities.verifyInnerText(shortTextResponsePage.lineSpacingDropdownListOptions().eq(count), option)
1140
+ });
1141
+ shortTextResponsePage.steps.selectLineSpacingDropdownOption('Double')
1142
+ });
1143
+
1144
+ it('User should be able to select options from Line Spacing dropdown', () => {
1145
+ lineSpacingDropdownOptions.forEach((option) => {
1146
+ shortTextResponsePage.steps.expandLineSpacingDropdown();
1147
+ shortTextResponsePage.steps.selectLineSpacingDropdownOption(option)
1148
+ });
1149
+ });
1150
+ },
962
1151
  }
963
1152
 
964
1153
  export const shortTextResponsePage = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.574-IEI-7080-e6d1871.0",
3
+ "version": "1.0.574-IEI-7071-main-360bc22.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {