@empiricalrun/test-gen 0.42.11 → 0.42.13

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.42.13
4
+
5
+ ### Patch Changes
6
+
7
+ - 161b404: fix: added colors in annnotations
8
+
9
+ ## 0.42.12
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [c95a819]
14
+ - @empiricalrun/reporter@0.23.0
15
+
3
16
  ## 0.42.11
4
17
 
5
18
  ### Patch Changes
@@ -301,7 +301,13 @@ function annotateElementsWithPreference({
301
301
  var parentElements = [];
302
302
 
303
303
  // Create a hint marker
304
- function createHintMarker(el, hint, parentElement, windowToAnnotate) {
304
+ function createHintMarker(
305
+ el,
306
+ hint,
307
+ parentElement,
308
+ windowToAnnotate,
309
+ baseColor,
310
+ ) {
305
311
  const rect = el.getBoundingClientRect();
306
312
 
307
313
  // Create the marker element
@@ -311,10 +317,10 @@ function annotateElementsWithPreference({
311
317
  // Style the marker
312
318
  Object.assign(marker.style, {
313
319
  position: "absolute",
314
- background: "rgb(255, 197, 66)",
320
+ background: baseColor,
315
321
  padding: "1px 3px 0px",
316
322
  borderRadius: "3px",
317
- border: "1px solid rgb(227, 190, 35)",
323
+ border: `1px solid ${baseColor}`,
318
324
  fontSize: "11px",
319
325
  pointerEvents: "none",
320
326
  zIndex: "10000",
@@ -324,10 +330,9 @@ function annotateElementsWithPreference({
324
330
  letterSpacing: 0,
325
331
  minHeight: 0,
326
332
  lineHeight: "100%",
327
- color: "rgb(48, 37, 5)",
333
+ color: "white",
328
334
  fontFamily: "Helvetica, Arial, sans-serif",
329
335
  fontWeight: "bold",
330
- textShadow: "rgba(255, 255, 255, 0.6) 0px 1px 0px",
331
336
  visibility: "hidden", // Setting the visibility to hidden initially, to get the height and width of marker
332
337
  });
333
338
 
@@ -475,9 +480,27 @@ function annotateElementsWithPreference({
475
480
  const hint = hints[index];
476
481
  const rect = el.getBoundingClientRect();
477
482
 
483
+ const colors = [
484
+ "#FF0000", // Red
485
+ "#006400", // Dark Green
486
+ "#0000FF", // Blue
487
+ "#FFA500", // Orange
488
+ "#800080", // Purple
489
+ "#008080", // Teal
490
+ "#FF69B4", // Hot Pink
491
+ "#4B0082", // Indigo
492
+ "#FF4500", // Orange Red
493
+ "#2E8B57", // Sea Green
494
+ "#DC143C", // Crimson
495
+ "#4682B4", // Steel Blue
496
+ ];
497
+ const colorIndex = index % colors.length;
498
+ const baseColor = colors[colorIndex];
499
+
478
500
  // Use createHintMarker with the specified container
479
- createHintMarker(el, hint, container, windowToAnnotate);
480
- el.style.boxShadow = `inset 0 0 0px 1px red`;
501
+ createHintMarker(el, hint, container, windowToAnnotate, baseColor);
502
+
503
+ el.style.boxShadow = `inset 0 0 0px 2px ${baseColor}`;
481
504
 
482
505
  // Add element details to the annotations map
483
506
  annotationsMap[hint] = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.42.11",
3
+ "version": "0.42.13",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -73,8 +73,8 @@
73
73
  "tsx": "^4.16.2",
74
74
  "typescript": "^5.3.3",
75
75
  "@empiricalrun/llm": "^0.9.31",
76
- "@empiricalrun/r2-uploader": "^0.3.8",
77
- "@empiricalrun/reporter": "^0.22.1"
76
+ "@empiricalrun/reporter": "^0.23.0",
77
+ "@empiricalrun/r2-uploader": "^0.3.8"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@playwright/test": "1.47.1",