galen icon indicating copy to clipboard operation
galen copied to clipboard

Incorrectly reporting pixel values (rounding DP)

Open freakyleaf opened this issue 8 years ago • 1 comments

Expected measurements use up to 4DP but Galen always rounds, failing tests.

Example output:

= Spacers =
    spacers.spacer_xxs:
->      width 4.3125px
->      :   "spacers.spacer_xxs" width is 4.0000px instead of 4.3125px

    spacers.spacer_xs:
->      width 8.6375px
->      :   "spacers.spacer_xs" width is 9.0000px instead of 8.6375px

    spacers.spacer_s:
->      width 17.275px
->      :   "spacers.spacer_s" width is 17.000px instead of 17.275px

    spacers.spacer_m:
->      width 34.55px
->      :   "spacers.spacer_m" width is 35.00px instead of 34.55px

    spacers.spacer_l:
->      width 69.1125px
->      :   "spacers.spacer_l" width is 69.0000px instead of 69.1125px

    spacers.spacer_xl:
->      width 138.238px
->      :   "spacers.spacer_xl" width is 138.000px instead of 138.238px

Expected figures are taken directly from Chrome DevTools.

freakyleaf avatar Nov 15 '17 10:11 freakyleaf

Galen gets object size as integer value from browser. It looks like it is not possible currently.

cyildirim avatar Nov 17 '17 14:11 cyildirim