itemengine-cypress-automation 1.0.379-IEI-5744-ecb0cd7.0 → 1.0.379

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.
@@ -37,6 +37,12 @@ describe('Create item : ThinkSphere - Edit tab basics', () => {
37
37
  });
38
38
 
39
39
  thinkSpherePage.tests.verifyQuestionInstructionsInputFieldEditTab();
40
+
41
+ it('When user add long text along with table in question instruction then height of question instruction should increase and horizontal scroll bar should appear', () => {
42
+ thinkSpherePage.steps.addQuestionInstructionInnerHTML('<table class="custom_author_table ie-table ie-table-bordered" border="1" style="width: 100%;"><tbody><tr><td>test</td><td>test</td><td>test</td><td>test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test&nbsp;test</td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table><p><br><br>test<br></p><p>test</p><p>test</p><p>test</p><p>test</p><p>test</p><p>test</p><p>test</p><p>test</p><p>test</p><p>test</p>');
43
+ thinkSpherePage.steps.verifyQuestionInstructionIncreasedHeightAndScrollBar();
44
+ thinkSpherePage.steps.addQuestionInstructionInnerHTML('');
45
+ });
40
46
  });
41
47
 
42
48
  describe('Question instructions input field - Edit tab functionality', () => {
@@ -6,11 +6,11 @@ import utilities from "../../../support/helpers/utilities";
6
6
  const css = Cypress.env('css');
7
7
 
8
8
  const sentenceStartersTextDefault = [
9
- 'The strategy i’m going to use is',
10
- 'First, i will',
11
- 'Secondly, i will',
9
+ 'The strategy I’m going to use is',
10
+ 'First, I will',
11
+ 'Secondly, I will',
12
12
  'I will check my work by',
13
- 'If my strategy is not working, i will'
13
+ 'If my strategy is not working, I will'
14
14
  ];
15
15
 
16
16
  describe('Preview question : ThinkSphere Question - Plan Section - preview tab', () => {
@@ -68,7 +68,7 @@ describe('ThinkSphere Question - Solve Phases Section', () => {
68
68
  'font-size': css.fontSize.default,
69
69
  'font-weight': css.fontWeight.bold
70
70
  });
71
- utilities.verifyCSS(thinkSpherePage.customizeToolsAndControlsSvg(), {
71
+ utilities.verifyCSS(thinkSpherePage.customizeToolsAndControlsPath(), {
72
72
  'fill': css.color.activeButtons
73
73
  });
74
74
 
@@ -1,4 +1,4 @@
1
- import { equationEditorCategoriesAndSymbols } from "../fixtures/equationEditorCategoriesAndSymbols ";
1
+ import { equationEditorCategoriesAndSymbols } from "../fixtures/equationEditorCategoriesAndSymbols";
2
2
  import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, commonComponents, createCustomCategoryFlyout, customizeSpecialCharacterComponent, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings, studentViewSettingsLabelComponent, equationEditorSectionCommonComponent } from "./components";
3
3
  import { equationEditorFlyout } from "./components/equationEditorFlyout";
4
4
  import { dialogBoxBase } from "../pages/dialogBoxBase";
@@ -136,7 +136,7 @@ const selectors = {
136
136
  imageUploadSectionQuestionImageCrossIcon: () => thinkSpherePage.imageUploadSection().find('div[class*="QuestionImageComponentstyle__CrossIcon"]'),
137
137
  imageRadioButtonParentSvg: () => thinkSpherePage.imageRadioButton().parent().find('svg'),
138
138
  solvePhaseAccordionSvg: () => thinkSpherePage.solvePhaseAccordion().find('svg'),
139
- customizeToolsAndControlsSvg: () => thinkSpherePage.customizeToolsAndControls().find('path'),
139
+ customizeToolsAndControlsPath: () => thinkSpherePage.customizeToolsAndControls().find('path'),
140
140
  solvePhaseToolsAndControlsOptionsTilesFeatherCheckIcon: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Text').find('[data-name="Icon feather-check"]'),
141
141
  solvePhaseToolsAndControlsOptionsTilesRectangle: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Text').find('[data-name*="Rectangle"]'),
142
142
  solvePhaseToolsAndControlsOptionsTilesDragItemFlexWrapperSvg: () => thinkSpherePage.solveToolsAndControlsOptionsTiles('Text').find('.drag-item-flex-wrapper svg'),
@@ -211,6 +211,7 @@ const selectors = {
211
211
  categoriesDropDownParent: () => cy.get('.drop-down-parent'),
212
212
  cardWrapper: () => cy.get('.card-wrapper'),
213
213
  cardLabel: () => cy.get('.widget-card-label'),
214
+ thinkSphereQuestionInstructionCKEditor: () => cy.get('div.cke_editable[contenteditable="true"]'),
214
215
  };
215
216
 
216
217
  const steps = {
@@ -1083,6 +1084,26 @@ const steps = {
1083
1084
  verifySolvePhaseAccordionCollapsed: () => {
1084
1085
  thinkSpherePage.solvePhaseAccordionExpandIcon().should('not.have.class', 'Mui-expanded');
1085
1086
  },
1087
+
1088
+ addQuestionInstructionInnerHTML: (innerHTML) => {
1089
+ thinkSpherePage.thinkSphereQuestionInstructionCKEditor()
1090
+ .invoke('html', innerHTML);
1091
+ },
1092
+
1093
+ verifyQuestionInstructionIncreasedHeightAndScrollBar: () => {
1094
+ thinkSpherePage.thinkSphereQuestionInstructionCKEditor()
1095
+ .invoke('height') // Get the height of the element
1096
+ .should('be.gt', 198);
1097
+
1098
+ thinkSpherePage.thinkSphereQuestionInstructionCKEditor()
1099
+ .should(($el) => {
1100
+ const scrollWidth = $el[0].scrollWidth;
1101
+ const clientWidth = $el[0].clientWidth;
1102
+
1103
+ // Assert that horizontal scroll is present
1104
+ expect(scrollWidth).to.be.greaterThan(clientWidth);
1105
+ });
1106
+ },
1086
1107
  };
1087
1108
 
1088
1109
  const tests = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.379-IEI-5744-ecb0cd7.0",
3
+ "version": "1.0.379",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -52,4 +52,4 @@
52
52
  "devDependencies": {
53
53
  "@applitools/eyes-cypress": "^3.47.0"
54
54
  }
55
- }
55
+ }