@test-station/render-html 0.2.26 → 0.2.28
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 +1 -1
- package/src/index.js +17 -4
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -261,6 +261,13 @@ export function renderHtmlReport(report, options = {}) {
|
|
|
261
261
|
font-size: 1rem;
|
|
262
262
|
font-weight: 600;
|
|
263
263
|
}
|
|
264
|
+
.module-card__owner {
|
|
265
|
+
font-size: 0.72rem;
|
|
266
|
+
font-weight: 300;
|
|
267
|
+
letter-spacing: 0.08em;
|
|
268
|
+
text-transform: uppercase;
|
|
269
|
+
color: var(--muted);
|
|
270
|
+
}
|
|
264
271
|
.module-card__meta {
|
|
265
272
|
font-size: 0.85rem;
|
|
266
273
|
color: var(--muted);
|
|
@@ -1042,6 +1049,13 @@ function renderOwnerPill(owner) {
|
|
|
1042
1049
|
return `<span class="owner-pill">Owner: ${escapeHtml(owner)}</span>`;
|
|
1043
1050
|
}
|
|
1044
1051
|
|
|
1052
|
+
function renderOwnerMeta(owner) {
|
|
1053
|
+
if (!owner) {
|
|
1054
|
+
return '';
|
|
1055
|
+
}
|
|
1056
|
+
return `<span class="module-card__owner">Owner: ${escapeHtml(owner)}</span>`;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1045
1059
|
function renderThresholdPill(threshold) {
|
|
1046
1060
|
if (!threshold?.configured) {
|
|
1047
1061
|
return '';
|
|
@@ -1123,6 +1137,7 @@ function renderModuleCard(moduleEntry) {
|
|
|
1123
1137
|
const dominantPackages = Array.isArray(moduleEntry.dominantPackages) && moduleEntry.dominantPackages.length > 0
|
|
1124
1138
|
? moduleEntry.dominantPackages.join(', ')
|
|
1125
1139
|
: 'No packages';
|
|
1140
|
+
const thresholdMarkup = renderThresholdPill(moduleEntry.threshold);
|
|
1126
1141
|
const filterAttrs = renderFilterAttributes({
|
|
1127
1142
|
nodeType: 'module-card',
|
|
1128
1143
|
moduleNames: [moduleEntry.module],
|
|
@@ -1135,16 +1150,14 @@ function renderModuleCard(moduleEntry) {
|
|
|
1135
1150
|
<button type="button" class="module-card status-${status}" data-open-target="${escapeHtml(targetId)}" data-view-target="module" ${filterAttrs}>
|
|
1136
1151
|
<div class="module-card__header">
|
|
1137
1152
|
<div class="module-card__summary">
|
|
1153
|
+
${renderOwnerMeta(moduleEntry.owner)}
|
|
1138
1154
|
<span class="module-card__name">${escapeHtml(moduleEntry.module)}</span>
|
|
1139
1155
|
<span class="module-card__meta">${escapeHtml(formatSummary(moduleEntry.summary))}</span>
|
|
1140
1156
|
<span class="module-card__meta">${escapeHtml(formatDuration(moduleEntry.durationMs || 0))} • ${escapeHtml(`${moduleEntry.packageCount || 0} package${moduleEntry.packageCount === 1 ? '' : 's'}`)}</span>
|
|
1141
1157
|
</div>
|
|
1142
1158
|
${renderStatusPill(status)}
|
|
1143
1159
|
</div>
|
|
1144
|
-
|
|
1145
|
-
${renderOwnerPill(moduleEntry.owner)}
|
|
1146
|
-
${renderThresholdPill(moduleEntry.threshold)}
|
|
1147
|
-
</div>
|
|
1160
|
+
${thresholdMarkup ? `<div class="module-card__badges">${thresholdMarkup}</div>` : ''}
|
|
1148
1161
|
<div class="module-card__coverage">
|
|
1149
1162
|
${renderCoverageMiniMetric('Lines', moduleEntry.coverage?.lines)}
|
|
1150
1163
|
${renderCoverageMiniMetric('Branches', moduleEntry.coverage?.branches)}
|