itemengine-cypress-automation 1.0.427 → 1.0.429-fixTheSetCiBuildFunctionToIncludeQuestionNames-b9167e9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.427",
3
+ "version": "1.0.429-fixTheSetCiBuildFunctionToIncludeQuestionNames-b9167e9.0",
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
+ }
@@ -47,16 +47,49 @@ function setCiBuildId(user, startTime) {
47
47
  'fillInTheGaps': 'Fill in the gaps'
48
48
  };
49
49
 
50
+ // Method 1: Try npm script detection (works locally)
50
51
  const npmScript = process.env.npm_lifecycle_event;
52
+ let commandName = null;
51
53
 
52
54
  if (npmScript && npmScript.startsWith('spinnaker:')) {
53
- const commandName = npmScript.replace('spinnaker:', '');
55
+ commandName = npmScript.replace('spinnaker:', '');
56
+ } else if (envArgs.questionType) {
57
+ // Method 2: Detect from questionType patterns (works in CI)
58
+ const questionTypePatterns = {
59
+ 'EssayResponse': 'essayResponse',
60
+ 'ThinkSphere': 'thinkSphereQuestion',
61
+ 'TextEntryMath': 'textEntryMath',
62
+ 'DragAndDropIntoCategoriesNew': 'DNDIntoCategories',
63
+ 'MultipleSelection': 'multipleSelection',
64
+ 'Graphing': 'graphing',
65
+ 'ChartsBar': 'graphing',
66
+ 'ChartsLine': 'graphing',
67
+ 'ChartsDotsPlot': 'graphing',
68
+ 'ImageHighlight': 'imageHighlight',
69
+ 'GridFill': 'imageHighlight',
70
+ 'TextSelection': 'imageHighlight',
71
+ 'ListOrderingNew': 'listOrdering',
72
+ 'Matching': 'listOrdering',
73
+ 'FillInTheGapsTextNew': 'fillInTheGaps',
74
+ 'FillInTheGapsDropdownNew': 'fillInTheGaps',
75
+ 'FillInTheGapsDragAndDropNew': 'fillInTheGaps'
76
+ };
54
77
 
55
- if (questionTypeDisplayNames[commandName]) {
56
- questionTypeInfo = `[${questionTypeDisplayNames[commandName]}]`;
78
+ // Find matching pattern in questionType
79
+ const questionTypes = envArgs.questionType.split('_');
80
+ for (const questionType of questionTypes) {
81
+ if (questionTypePatterns[questionType]) {
82
+ commandName = questionTypePatterns[questionType];
83
+ break; // Use first match
84
+ }
57
85
  }
58
86
  }
59
87
 
88
+ // Apply display name if found
89
+ if (commandName && questionTypeDisplayNames[commandName]) {
90
+ questionTypeInfo = `[${questionTypeDisplayNames[commandName]}]`;
91
+ }
92
+
60
93
  if (envArgs.grepUntagged) {
61
94
  tags = 'untagged';
62
95
  } else if (envArgs.grepTags) {