Skip to content

Commit

Permalink
Fixed MAS unit test related to mini-compare card variation (#2957)
Browse files Browse the repository at this point in the history
* fixed unit test (parseInt)

* added radix
  • Loading branch information
mirafedas authored Sep 26, 2024
1 parent 5d8d656 commit 00f139c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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(',');
Expand Down

0 comments on commit 00f139c

Please sign in to comment.