From 1cb9f74aa34b21f64b793444dab8be16fe04a19d Mon Sep 17 00:00:00 2001 From: Brendan Kenny Date: Tue, 23 Jul 2019 17:12:56 -0700 Subject: [PATCH] tests: relax contrast font size expectation --- lighthouse-cli/test/smokehouse/a11y/expectations.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lighthouse-cli/test/smokehouse/a11y/expectations.js b/lighthouse-cli/test/smokehouse/a11y/expectations.js index 214b4fee2170..d8692e30ef3e 100644 --- a/lighthouse-cli/test/smokehouse/a11y/expectations.js +++ b/lighthouse-cli/test/smokehouse/a11y/expectations.js @@ -153,7 +153,8 @@ module.exports = [ 'type': 'node', 'selector': '#color-contrast', 'snippet': '
\n Hello\n
', - 'explanation': 'Fix any of the following:\n Element has insufficient color contrast of 2.59 (foreground color: #ffc0cb, background color: #ff0000, font size: 28.5pt, font weight: normal). Expected contrast ratio of 3:1', + // Default font size is different depending on the platform (e.g. 28.5 on travis, 30.0 on Mac), so use \d\d\.\d. + 'explanation': /^Fix any of the following:\n {2}Element has insufficient color contrast of 2\.59 \(foreground color: #ffc0cb, background color: #ff0000, font size: \d\d\.\dpt, font weight: normal\). Expected contrast ratio of 3:1$/, 'nodeLabel': 'Hello', }, },