also looking at this
fix(native): preserve modal presentation protocol properties
#2099
3 files
+41
-2
| @@ -227,6 +227,15 @@ describe('events', () => { | ||
| 227 | 227 | }) |
| 228 | 228 | }) |
| 229 | 229 | |
| 230 | it.each(['nonModal dismissOnOutsideTap', 'non-modal dismiss-on-outside-tap'])('preserves native popup boolean protocol names: %s', async (attributes) => { | |
| 231 | const { root } = await translateHtmlToIR(`<div data-native="Modal" ${attributes}></div>`) | |
| 232 | expect(root.props).toMatchObject({ nonModal: true, dismissOnOutsideTap: true }) | |
| 233 | expect(root.props.nonmodal).toBeUndefined() | |
| 234 | expect(root.props.dismissonoutsidetap).toBeUndefined() | |
| 235 | const { root: blocking } = await translateHtmlToIR('<div data-native="Modal" nonModal="false" dismissOnOutsideTap="false"></div>') | |
| 236 | expect(blocking.props).toMatchObject({ nonModal: false, dismissOnOutsideTap: false }) | |
| 237 | }) | |
| 238 | ||
| 230 | 239 | it('decodes JSON object props forwarded by native components', async () => { |
| 231 | 240 | const { root } = await translateHtmlToIR('<div data-native="ScrollView" contentContainerStyle="{"paddingTop":12}"></div>') |
| 232 | 241 | |