Add tests for Modal.hardwareAccelerated prop (#53162)

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

Add Fantom tests for Modal.hardwareAccelerated prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79881565

fbshipit-source-id: 80aaeb0659883d536c37996e86231c9d1d9eff49
This commit is contained in:
Riccardo Cipolleschi
2025-08-08 08:52:46 -07:00
committed by Facebook GitHub Bot
parent 674fd79eaf
commit 2812e20ecc
@@ -235,6 +235,39 @@ describe('<Modal>', () => {
);
});
});
describe('hardwareAccelerated', () => {
it('renders a Modal with hardwareAccelerated="true"', () => {
const root = Fantom.createRoot();
Fantom.runTask(() => {
root.render(<Modal hardwareAccelerated={true} />);
});
expect(
root.getRenderedOutput({props: ['hardwareAccelerated']}).toJSX(),
).toEqual(
<rn-modalHostView hardwareAccelerated="true">
<rn-view />
</rn-modalHostView>,
);
});
it('renders a Modal with hardwareAccelerated="false"', () => {
const root = Fantom.createRoot();
Fantom.runTask(() => {
root.render(<Modal hardwareAccelerated={false} />);
});
expect(
root.getRenderedOutput({props: ['hardwareAccelerated']}).toJSX(),
).toEqual(
<rn-modalHostView>
<rn-view />
</rn-modalHostView>,
);
});
});
// ... more props
});
describe('ref', () => {