@test-station/render-html 0.2.27 → 0.2.29

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +59 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@test-station/render-html",
3
- "version": "0.2.27",
3
+ "version": "0.2.29",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/index.js CHANGED
@@ -258,23 +258,33 @@ export function renderHtmlReport(report, options = {}) {
258
258
  align-items: flex-start;
259
259
  }
260
260
  .module-card__name {
261
- font-size: 1rem;
261
+ font-size: clamp(0.96rem, 1.5vw, 1.08rem);
262
262
  font-weight: 600;
263
+ line-height: 1.08;
264
+ overflow-wrap: anywhere;
263
265
  }
264
266
  .module-card__owner {
265
- font-size: 0.72rem;
267
+ font-size: 0.68rem;
266
268
  font-weight: 300;
269
+ line-height: 1.15;
267
270
  letter-spacing: 0.08em;
268
271
  text-transform: uppercase;
269
272
  color: var(--muted);
273
+ overflow-wrap: anywhere;
270
274
  }
271
275
  .module-card__meta {
272
- font-size: 0.85rem;
276
+ display: block;
277
+ max-width: 100%;
278
+ font-size: 0.75rem;
279
+ line-height: 1.18;
273
280
  color: var(--muted);
281
+ font-variant-numeric: tabular-nums;
282
+ overflow-wrap: anywhere;
274
283
  }
275
284
  .module-card__summary {
276
285
  display: grid;
277
- gap: 4px;
286
+ gap: 3px;
287
+ min-width: 0;
278
288
  }
279
289
  .owner-pill {
280
290
  display: inline-flex;
@@ -466,7 +476,7 @@ export function renderHtmlReport(report, options = {}) {
466
476
  .test-row[open] { border-color: var(--border-strong); }
467
477
  .test-row__summary {
468
478
  display: grid;
469
- grid-template-columns: auto 1fr auto auto;
479
+ grid-template-columns: auto minmax(0, 1fr) auto;
470
480
  gap: 12px;
471
481
  align-items: start;
472
482
  list-style: none;
@@ -512,16 +522,28 @@ export function renderHtmlReport(report, options = {}) {
512
522
  align-items: center;
513
523
  }
514
524
  .test-row__name { min-width: 0; }
525
+ .test-row__aside {
526
+ display: grid;
527
+ gap: 4px;
528
+ justify-items: end;
529
+ min-width: 0;
530
+ text-align: right;
531
+ }
515
532
  .test-row__title {
516
533
  display: block;
517
534
  font-weight: 600;
518
535
  margin-bottom: 4px;
519
- overflow: hidden;
520
- text-overflow: ellipsis;
521
- white-space: nowrap;
536
+ overflow-wrap: anywhere;
537
+ word-break: break-word;
538
+ white-space: normal;
522
539
  }
523
540
  .test-row__file,
524
- .test-row__duration { font-size: 0.83rem; color: var(--muted); }
541
+ .test-row__duration {
542
+ font-size: 0.83rem;
543
+ color: var(--muted);
544
+ overflow-wrap: anywhere;
545
+ word-break: break-word;
546
+ }
525
547
  .test-row__details {
526
548
  display: none;
527
549
  margin-top: 16px;
@@ -535,10 +557,13 @@ export function renderHtmlReport(report, options = {}) {
535
557
  }
536
558
  .detail-grid {
537
559
  display: grid;
538
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
560
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
539
561
  gap: 14px;
562
+ align-items: start;
540
563
  }
541
564
  .detail-card {
565
+ min-width: 0;
566
+ overflow: visible;
542
567
  padding: 14px;
543
568
  border-radius: 14px;
544
569
  border: 1px solid rgba(124, 160, 224, 0.12);
@@ -556,10 +581,23 @@ export function renderHtmlReport(report, options = {}) {
556
581
  padding-left: 18px;
557
582
  display: grid;
558
583
  gap: 8px;
584
+ min-width: 0;
585
+ }
586
+ .detail-card li,
587
+ .failure-list li {
588
+ min-width: 0;
589
+ overflow-wrap: anywhere;
590
+ word-break: break-word;
591
+ }
592
+ .detail-card code {
593
+ white-space: pre-wrap;
594
+ overflow-wrap: anywhere;
595
+ word-break: break-word;
559
596
  }
560
597
  .detail-card pre {
561
598
  margin: 0;
562
599
  white-space: pre-wrap;
600
+ overflow-wrap: anywhere;
563
601
  word-break: break-word;
564
602
  font-size: 0.82rem;
565
603
  color: #d7e5ff;
@@ -755,7 +793,12 @@ export function renderHtmlReport(report, options = {}) {
755
793
  .toolbar { align-items: flex-start; }
756
794
  .toolbar__controls { justify-content: flex-start; }
757
795
  .toolbar__filters { justify-content: flex-start; }
758
- .test-row__summary { grid-template-columns: auto 1fr; }
796
+ .test-row__summary { grid-template-columns: auto minmax(0, 1fr); }
797
+ .test-row__aside {
798
+ grid-column: 2;
799
+ justify-items: start;
800
+ text-align: left;
801
+ }
759
802
  }
760
803
  </style>
761
804
  </head>
@@ -1053,7 +1096,7 @@ function renderOwnerMeta(owner) {
1053
1096
  if (!owner) {
1054
1097
  return '';
1055
1098
  }
1056
- return `<span class="module-card__owner">Owner: ${escapeHtml(owner)}</span>`;
1099
+ return `<span class="module-card__owner">${escapeHtml(owner)}</span>`;
1057
1100
  }
1058
1101
 
1059
1102
  function renderThresholdPill(threshold) {
@@ -1486,8 +1529,10 @@ function renderTest(suite, test, rootDir, filterContext = {}) {
1486
1529
  <span class="test-row__title">${escapeHtml(test.fullName || test.name || 'Unnamed test')}</span>
1487
1530
  <span class="test-row__file">${escapeHtml(formatTestLocation(test, rootDir))}</span>
1488
1531
  </div>
1489
- <span class="test-row__duration">${escapeHtml(formatDuration(test.durationMs || 0))}</span>
1490
- <span class="test-row__file">${escapeHtml(suite.label || '')}</span>
1532
+ <div class="test-row__aside">
1533
+ <span class="test-row__duration">${escapeHtml(formatDuration(test.durationMs || 0))}</span>
1534
+ <span class="test-row__file">${escapeHtml(suite.label || '')}</span>
1535
+ </div>
1491
1536
  </summary>
1492
1537
  <div class="test-row__details">
1493
1538
  <div class="detail-grid">