From 00f139ca586492612c00e33b65d97e23a0d67e55 Mon Sep 17 00:00:00 2001 From: Mira Fedas <30750556+mirafedas@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:12:58 +0200 Subject: [PATCH] Fixed MAS unit test related to mini-compare card variation (#2957) * fixed unit test (parseInt) * added radix --- .../web-components/test/merch-card.mini-compare.test.html.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/features/mas/web-components/test/merch-card.mini-compare.test.html.js b/libs/features/mas/web-components/test/merch-card.mini-compare.test.html.js index 55e5028ca4..e439f80272 100644 --- a/libs/features/mas/web-components/test/merch-card.mini-compare.test.html.js +++ b/libs/features/mas/web-components/test/merch-card.mini-compare.test.html.js @@ -52,7 +52,7 @@ runTests(async () => { const el = miniCompareChart.shadowRoot.querySelector(selector); if (!el) return 0; - return parseFloat(window.getComputedStyle(el).height); + return parseInt(window.getComputedStyle(el).height, 10); }) .join(','); return heights; @@ -76,12 +76,13 @@ runTests(async () => { .fill() .map( (_, i) => - parseFloat( + parseInt( window.getComputedStyle( miniCompareChart.querySelector( `.footer-row-cell:nth-child(${i + 1})`, ), ), + 10, ).height, ) .join(',');