[ ] I verified that the issue exists in the latest Hermione release
Hermione version
No response
Last Hermione version that worked
No response
Which area(s) of Hermione are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Шаги воспроизведения не подскажу, но знаю, как пофиксить.
Actual Behavior
Падает ошибка
"Expected integer for top but received 0.5 of type number"
at Object.invalidParameterError (/sharp@0.32.6/node_modules/sharp/lib/is.js:135:10)
at Sharp. (/sharp@0.32.6/node_modules/sharp/lib/resize.js:475:16)
at Array.forEach ()
at Sharp.extract (/sharp@0.32.6/node_modules/sharp/lib/resize.js:470:38)
at Image.crop (/hermione@8.9.5/node_modules/hermione/src/image.js:37:19)
at async Viewport.handleImage (/hermione@8.9.5/node_modules/hermione/src/browser/screen-shooter/viewport/index.js:47:9)
at async ScreenShooter.capture (/hermione@8.9.5/node_modules/hermione/src/browser/screen-shooter/index.js:21:9)
at async assertView (/hermione@8.9.5/node_modules/hermione/src/browser/commands/assert-view/index.js:82:29)
Нужно в функцию _sanitize добавить Math.floor/ceil. Тут еще встает вопрос совместимости таких изменений, можно округлять возле вызова resize, но вроде как метод _sanitize должен делать значения безопасными.
Verify latest release
Hermione version
No response
Last Hermione version that worked
No response
Which area(s) of Hermione are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Шаги воспроизведения не подскажу, но знаю, как пофиксить.
Actual Behavior
Падает ошибка "Expected integer for top but received 0.5 of type number" at Object.invalidParameterError (/sharp@0.32.6/node_modules/sharp/lib/is.js:135:10) at Sharp. (/sharp@0.32.6/node_modules/sharp/lib/resize.js:475:16)
at Array.forEach ()
at Sharp.extract (/sharp@0.32.6/node_modules/sharp/lib/resize.js:470:38)
at Image.crop (/hermione@8.9.5/node_modules/hermione/src/image.js:37:19)
at async Viewport.handleImage (/hermione@8.9.5/node_modules/hermione/src/browser/screen-shooter/viewport/index.js:47:9)
at async ScreenShooter.capture (/hermione@8.9.5/node_modules/hermione/src/browser/screen-shooter/index.js:21:9)
at async assertView (/hermione@8.9.5/node_modules/hermione/src/browser/commands/assert-view/index.js:82:29)
Expected Behavior
Ошибки быть не должно
Which Node.js version are you using?
20.10.0