itemengine-cypress-automation 1.0.164 → 1.0.166-migrationScripts-b8c79a0.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.
@@ -471,7 +471,7 @@ export const extractLrnQuestionData = {
471
471
 
472
472
  figText: (lrnQuestionDataArr, index) => {
473
473
  let obj = {};
474
- cy.log(`Extracting the question instructions, question and response count from question ${index}`);
474
+ cy.log(`Extracting the question instructions, question, response count, response field properties from question ${index}`);
475
475
  obj.questionIndex = index;
476
476
  obj.questionType = 'figText';
477
477
  lrnPage.steps.extractQuestionInstructions(obj, index);
@@ -496,7 +496,7 @@ export const extractLrnQuestionData = {
496
496
  .parent()
497
497
  .then(($responseField) => {
498
498
  obj.isMultiline = $responseField[0].type === 'textarea' ? true : false;
499
- if($responseField[0].innerHTML.includes('lrn_charactermapbutton')) {
499
+ if ($responseField[0].innerHTML.includes('lrn_charactermapbutton')) {
500
500
  obj.specialCharactersEnabled = true;
501
501
  }
502
502
  });
@@ -518,7 +518,7 @@ export const extractLrnQuestionData = {
518
518
 
519
519
  figTextGrading: (lrnQuestionDataArr, index) => {
520
520
  let obj = {};
521
- cy.log(`Extracting the question instructions, question and response count from question ${index}`);
521
+ cy.log(`Extracting the question instructions, question, response count, response field properties from question ${index}`);
522
522
  obj.questionIndex = index;
523
523
  obj.questionType = 'figText';
524
524
  lrnPage.steps.extractQuestionInstructions(obj, index);
@@ -550,6 +550,15 @@ export const extractLrnQuestionData = {
550
550
  lrnQuestionDataArr.push(obj);
551
551
  },
552
552
 
553
+ figDropdown: (lrnQuestionDataArr, index) => {
554
+ let obj = {};
555
+ cy.log(`Extracting the question instructions, question, response count, response field properties from question ${index}`);
556
+ obj.questionIndex = index;
557
+ obj.questionType = 'figDropdown';
558
+ lrnPage.steps.extractQuestionInstructions(obj, index);
559
+ lrnQuestionDataArr.push(obj);
560
+ },
561
+
553
562
  /* singleSelection: (lrnQuestionDataArr, index) => {
554
563
  let obj = {};
555
564
  cy.log(`Extracting the question instructions and options from question ${index}`);
@@ -10,6 +10,7 @@ const lrnQuestionTypesENUM = {
10
10
  multipleSelection: 'Multiple choice – multiple response',
11
11
  trueOrFalse: 'True or false',
12
12
  figText: 'Cloze with text',
13
+ figDropdown: 'Cloze with drop down',
13
14
  }
14
15
 
15
16
  export default lrnQuestionTypesENUM;
@@ -24,6 +24,7 @@ const extractLrnPreviewData = (currQuestionType, lrnQuestionDataArr, index) => {
24
24
  case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
25
25
  case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
26
26
  case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
27
+ case lrnQuestionTypesENUM.figDropdown: return extractLrnQuestionData.figDropdown(lrnQuestionDataArr, index);
27
28
  default: throw new Error('Invalid lrn question type');
28
29
  }
29
30
  }
@@ -38,6 +39,7 @@ const verifyIePreviewData = (questionType, questionData, index) => {
38
39
  case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
39
40
  case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
40
41
  case 'figText': return verifyIeQuestionData.figText(questionData, index);
42
+ case 'figDropdown': return verifyIeQuestionData.figDropdown(questionData, index);
41
43
  default: throw new Error('Invalid ngie question type');
42
44
  }
43
45
  }
@@ -47,8 +49,12 @@ const extractLrnGradingData = (currQuestionType, lrnGradingDataArr, index) => {
47
49
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
48
50
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
49
51
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
52
+ case lrnQuestionTypesENUM.essayResponse: return cy.log('Manually Graded Question Type');
53
+ case lrnQuestionTypesENUM.essayResponseBasic: return cy.log('Manually Graded Question Type');
54
+ case lrnQuestionTypesENUM.drawingResponse: return cy.log('Manually Graded Question Type');
50
55
  case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
51
56
  case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
57
+ case lrnQuestionTypesENUM.figDropdown: return;
52
58
  default: throw new Error('Invalid lrn question type');
53
59
  }
54
60
  }
@@ -58,8 +64,12 @@ const verifyIeGradingData = (questionType, questionData, index) => {
58
64
  case 'mcq': return verifyIeQuestionData.mcqGrading(questionData, index);
59
65
  case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
60
66
  case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
67
+ case 'essayResponse': return cy.log('Manually Graded Question Type');
68
+ case 'essayResponseBasic': return cy.log('Manually Graded Question Type');
69
+ case 'drawingResponse': return cy.log('Manually Graded Question Type');
61
70
  case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
62
71
  case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
72
+ case 'figDropdown': return;
63
73
  default: throw new Error('Invalid ngie question type');
64
74
  }
65
75
  }
@@ -510,6 +510,14 @@ export const verifyIeQuestionData = {
510
510
  });
511
511
  },
512
512
 
513
+ figDropdown: (expectedQuestionData, index) => {
514
+ cy.get('.ngie-cloze-with-dropdown')
515
+ .eq(index)
516
+ .within(() => {
517
+ iePage.steps.verifyQuestionInstructions(expectedQuestionData);
518
+ });
519
+ },
520
+
513
521
  /* singleSelection: (expectedQuestionData, index) => {
514
522
  cy.get('.ngie-single-select')
515
523
  .eq(index)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.164",
3
+ "version": "1.0.166-migrationScripts-b8c79a0.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -35,4 +35,4 @@
35
35
  "node-fetch": "^3.3.2",
36
36
  "react-uuid": "^2.0.0"
37
37
  }
38
- }
38
+ }