artes 1.5.3 → 1.5.4

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": "artes",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -49,14 +49,6 @@ function applyLogo(cucumberConfig, report, today, reportName, logoBuffer, logoMi
49
49
  if (testCoverage) {
50
50
  const meetsThreshold = testCoverage.percentage >= testPercentage;
51
51
 
52
- if (meetsThreshold) {
53
- console.log(`✅ Tests passed required ${testPercentage}% success rate with ${testCoverage.percentage.toFixed(2)}%!`);
54
- process.env.EXIT_CODE = parseInt(0, 10);
55
- } else {
56
- console.log(`❌ Tests failed required ${testPercentage}% success rate with ${testCoverage.percentage.toFixed(2)}%!`);
57
- process.env.EXIT_CODE = parseInt(1, 10);
58
- }
59
-
60
52
  testCoverageWidgetCss = generateTestCoverageWidgetCss(testCoverage, testPercentage, meetsThreshold);
61
53
  }
62
54
  }
@@ -104,17 +96,8 @@ function generateTestCoverageWidgetCss(testCoverage, testPercentage, meetsThresh
104
96
  const r2 = (fill * 0.60).toFixed(2);
105
97
  const tm = testPercentage;
106
98
 
107
- const barGradient = `
108
- linear-gradient(to right,
109
- transparent calc(${tm}% - 1.5px),
110
- rgba(255,255,255,.95) calc(${tm}% - 1.5px),
111
- rgba(255,255,255,.95) calc(${tm}% + 1.5px),
112
- transparent calc(${tm}% + 1.5px)
113
- ),
114
- linear-gradient(to right, #f44336 0%, #ff9800 35%, #ffeb3b 60%, #4caf50 100%)
115
- `.trim();
116
-
117
- const pointerX = `${fillPct}%`;
99
+ const barGradient = `linear-gradient(to right, #f44336 0%, #ff9800 35%, #ffeb3b 60%, #4caf50 100%)`;
100
+ const pointerX = `${fillPct}%`;
118
101
  const svgLabels = [
119
102
  { val: "0", x: "0%", anchor: "start" },
120
103
  { val: "20", x: "20%", anchor: "middle" },
@@ -127,15 +110,16 @@ function generateTestCoverageWidgetCss(testCoverage, testPercentage, meetsThresh
127
110
  const labelNodes = svgLabels
128
111
  .map(l => `<text x="${l.x}" y="10" text-anchor="${l.anchor}" font-family="sans-serif" font-size="10" fill="#bbb">${l.val}</text>`)
129
112
  .join("");
130
- const pointerColor = meetsThreshold ? "#4caf50" : "#f44336";
131
- const px = (fill * 10).toFixed(1); // 0–1000 units mapping to 0–100%
113
+
114
+ const pointerColor = meetsThreshold ? "#4caf50" : "#f44336";
115
+ const px = (fill * 10).toFixed(1);
132
116
 
133
117
  const labelPointerSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="18">
134
118
  <text x="${fillPct}%" y="14" text-anchor="middle" font-family="sans-serif" font-size="11" font-weight="700" fill="${pointerColor}">${pctLabel}%</text>
135
119
  </svg>`;
136
120
 
137
121
  const stemSvg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 18" preserveAspectRatio="none" width="100%" height="18">
138
- <line x1="${px}" y1="0" x2="${px}" y2="10" stroke="${pointerColor}" stroke-width="6"/>
122
+ <line x1="${px}" y1="6" x2="${px}" y2="10" stroke="${pointerColor}" stroke-width="6"/>
139
123
  <polygon points="${parseFloat(px)-12},8 ${parseFloat(px)+12},8 ${parseFloat(px)},18" fill="${pointerColor}"/>
140
124
  </svg>`;
141
125
 
@@ -208,7 +192,7 @@ const pointerColor = meetsThreshold ? "#4caf50" : "#f44336";
208
192
  z-index: 2;
209
193
  }
210
194
 
211
- /* 3. Pointer — label SVG on top, stem+triangle SVG below, layered via multiple backgrounds */
195
+ /* 3. Pointer + threshold marker layered in one element */
212
196
  [data-id="summary"] .widget__body > div > *:first-child {
213
197
  position: relative;
214
198
  }
@@ -220,9 +204,8 @@ const pointerColor = meetsThreshold ? "#4caf50" : "#f44336";
220
204
  left: 16px;
221
205
  right: 16px;
222
206
  height: 36px;
223
- /* label on top (18px), stem+triangle below (18px) */
224
207
  background-image: url("${pointerLabelDataUrl}"), url("${pointerDataUrl}");
225
- background-repeat: no-repeat, no-repeat;
208
+ background-repeat: no-repeat;
226
209
  background-size: 100% 50%, 100% 50%;
227
210
  background-position: top, bottom;
228
211
  pointer-events: none;
@@ -295,7 +278,7 @@ function resolveLogoPath(logoConfig) {
295
278
  : path.resolve(process.cwd(), logoConfig);
296
279
 
297
280
  if (!fs.existsSync(resolved)) {
298
- console.warn(`[artes] Warning: logo not found at "${resolved}". Falling back to default logo.`);
281
+ // console.warn(`[artes] Warning: logo not found at "${resolved}". Falling back to default logo.`);
299
282
  return defaultLogoPath();
300
283
  }
301
284