Test blurRadius (#53037)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53037

Changelog: [Internal]
Add `blurRadius` test.

Reviewed By: rshest

Differential Revision: D79552155

fbshipit-source-id: 710b2f328857a32ecb0db00c36f3eedabe74a249
This commit is contained in:
Andrew Datsenko
2025-08-05 07:05:54 -07:00
committed by Facebook GitHub Bot
parent d58601b59f
commit e9fdb23ed2
3 changed files with 31 additions and 0 deletions
@@ -107,6 +107,20 @@ describe('<Image>', () => {
});
});
});
describe('blurRadius', () => {
it('provides blur radius for image', () => {
const root = Fantom.createRoot();
Fantom.runTask(() => {
root.render(<Image blurRadius={10} />);
});
expect(root.getRenderedOutput({props: ['blurRadius']}).toJSX()).toEqual(
<rn-image blurRadius="10" />,
);
});
});
});
describe('ref', () => {
@@ -9,6 +9,7 @@
#include <react/renderer/components/image/ImageProps.h>
#include <react/renderer/components/image/conversions.h>
#include <react/renderer/core/propsConversions.h>
#include <react/renderer/debug/debugStringConvertibleUtils.h>
namespace facebook::react {
@@ -282,4 +283,16 @@ folly::dynamic ImageProps::getDiffProps(const Props* prevProps) const {
#endif
#if RN_DEBUG_STRING_CONVERTIBLE
SharedDebugStringConvertibleList ImageProps::getDebugProps() const {
const auto& defaultImageProps = ImageProps();
return ViewProps::getDebugProps() +
SharedDebugStringConvertibleList{
debugStringConvertibleItem(
"blurRadius", blurRadius, defaultImageProps.blurRadius),
};
}
#endif
} // namespace facebook::react
@@ -50,6 +50,10 @@ class ImageProps final : public ViewProps {
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
#if RN_DEBUG_STRING_CONVERTIBLE
SharedDebugStringConvertibleList getDebugProps() const override;
#endif
};
} // namespace facebook::react