From 6befaadc21c1d1a6b5d605167a4e87486c67901a Mon Sep 17 00:00:00 2001 From: Vito Sansevero Date: Wed, 21 Oct 2026 11:49:14 -0700 Subject: [PATCH] test(activity): compare the job view log's line height to the hundredth of a pixel WebKit reports the mockup's 11px/1.7 line height as 18.700001px, so the job view comparison failed on WebKit only. The measurement now rounds it, as other engine-dependent values are normalized. --- tests/browser/activity-concept.spec.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/browser/activity-concept.spec.mjs b/tests/browser/activity-concept.spec.mjs index 7dd1362..4d6d37b 100644 --- a/tests/browser/activity-concept.spec.mjs +++ b/tests/browser/activity-concept.spec.mjs @@ -185,7 +185,9 @@ function measureJobView() { search: css(results.querySelector('.search-field'), 'maxWidth'), term: css(term, 'marginTop', 'borderTopWidth', 'borderTopLeftRadius', 'overflow'), summary: css(term.querySelector('summary'), 'paddingTop', 'paddingLeft', 'fontSize', 'cursor'), - pre: css(pre, 'marginTop', 'paddingTop', 'paddingLeft', 'maxHeight', 'fontSize', 'lineHeight', 'overflow'), + // WebKit reports the 1.7 line height of 11px as 18.700001px; compare it to the hundredth of a pixel. + pre: { ...css(pre, 'marginTop', 'paddingTop', 'paddingLeft', 'maxHeight', 'fontSize', 'overflow'), + lineHeight: `${Math.round(parseFloat(getComputedStyle(pre).lineHeight) * 100) / 100}px` }, }, // Mockup colours: the pressed outcome takes the accent border on the soft blue, the tiles their tone. pressed: (() => {