Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test exercising public API to test BeforeInputEventPlugin + Fallb…
…ackCompositionState (#11849) * Add test exercising public API to test BeforeInputEventPlugin + FallbackCompositionState - I've adopted a similar approach to the existing test for BeforeInputEventPlugin - I've simulated events and then assert the event handler for onBeforeInput is fired or not fired based on the test conditions - The scenarios are tested against IE11, Webkite and Presto environment simulations - I've encorporated what I understand to be the functionality in the FallbackCompositionState test * Prettier * Linting fixes * Remove test for contenteditable in Presto - the contenteditable type is not supported in Presto powered browsers (Opera). * Remove mention of Presto as this explicit condition is no longer handled in BeforeInputEventPlugin. We still need to exercise usage of FallbackCompositionState though so let's keep a test where the env does not support Composition and Text events. * Add tests for envs with only CompositionEvent support * Remove internal tests no longer needed * Shorten test case names to satisfy lint rules * Add tests for onCompositionStart and onCompositionUpdte events The BeforeInputEventPlugin is responsible for emitting these events so we need to add tests for this. This also ensure we exercise the code path that, L207, that was not previously exercised with the public tests.
- Loading branch information