itemengine-cypress-automation 1.0.516-dependabot-npm-and-yarn-multi-92087b3b2d-5afd94b.0 → 1.0.516

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.
@@ -89,11 +89,11 @@ describe('Create item page - List ordering - Preview contents in all views', ()
89
89
  it('User should be able to reorder options containing image, bold text and equation options in the list', () => {
90
90
  listOrderingPage.steps.clickAndReorderOptionInPreviewTab('This is a bold option', 0);
91
91
  listOrderingPage.steps.clickAndReorderOptionInPreviewTab('Solve the following', 1);
92
- listOrderingPage.steps.verifyTextContentOfOptionInPreviewTab('This is a bold option', 0);
92
+ listOrderingPage.steps.verifyTextContentOfOptionInStudentView('This is a bold option', 0, view);
93
93
  listOrderingPage.steps.verifyOptionWithBoldTextInPreviewTab(0);
94
94
  listOrderingPage.steps.verifyOptionWithEquationTextInPreviewTab(1);
95
95
  listOrderingPage.steps.verifyOptionWithImageInPreviewTab(2);
96
- listOrderingPage.steps.verifyTextContentOfOptionInPreviewTab('alpha', 3);
96
+ listOrderingPage.steps.verifyTextContentOfOptionInStudentView('alpha', 3, view);
97
97
  });
98
98
  } else if (view === 'Grading view') {
99
99
  it(`The order of the responses should be as per the submitted response`, () => {
@@ -29,6 +29,7 @@ const selectors = {
29
29
  draggableOptionDragIcon: () => cy.get('.drag-indicator-icon'),
30
30
  //Preview Tab
31
31
  optionTextPreviewTab: () => cy.get('.draggable-item-wrapper[overflow] .question-text-wrapper'),
32
+ optionTextPreviewTabStudentView: () => cy.get('.draggable-item .question-text-wrapper'),
32
33
  optionPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="AnswerWrapper"][role="button"], .vertical-list-order .reorder-as-same-list-items [class*="DraggableItemstyles__DraggableItemWrapper"][role="button"]'),
33
34
  optionWrapperPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .orderlist-option-wrapper, .vertical-list-order .reorder-as-same-list-items [class*="DraggableItemstyles__DraggableItemContainer"]'),
34
35
  correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="__CorrectAnswerLabel"]'),
@@ -452,6 +453,16 @@ const steps = {
452
453
  utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.optionTextPreviewTab(), index), optionsText);
453
454
  },
454
455
 
456
+ /**
457
+ * @param {string[]} optionsTextArray options array for preview tab options
458
+ * @param {number} index index provided for option
459
+ * @param {string} view which view cypress is running on
460
+ * @description this function verifies options text content in student view
461
+ */
462
+ verifyTextContentOfOptionInStudentView: (optionsText, index, view) => {
463
+ utilities.verifyInnerText(utilities.getNthElement((view === 'Student view' ? listOrderingPage.optionTextPreviewTabStudentView() : listOrderingPage.optionTextPreviewTab()), index), optionsText);
464
+ },
465
+
455
466
  /**
456
467
  * @param {string[]} optionsTextArray options array for set correct answer options
457
468
  * @description this function verifies options text content
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.516-dependabot-npm-and-yarn-multi-92087b3b2d-5afd94b.0",
3
+ "version": "1.0.516",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -43,7 +43,7 @@
43
43
  "axe-core": "^4.7.1",
44
44
  "cy-verify-downloads": "^0.1.11",
45
45
  "cy2": "^4.0.9",
46
- "cypress": "^15.2.0",
46
+ "cypress": "^12.17.2",
47
47
  "cypress-axe": "^1.4.0",
48
48
  "cypress-file-upload": "^5.0.8",
49
49
  "cypress-real-events": "^1.7.6",