Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EuiInlineEdit] Test Cases for
EuiInlineEdit
(#6722)
* Added Cypress tests for EuiInlineEdit functionality * Added snapshots for read mode and edit mode for the Text and Title variations for EuiInlineEdit * Use RTL render method for snapshots * [InlineEditForm] - Add data-test-subj to EuiInlineEditForm buttons and inputs - Removed opinionated save logic that prevented users from being able to save empty strings in editMode * Created test cases for EuiInlineEditForm. These test cases handle the functional and prop testing for both the Text and Title variations of the component * Updated InlineEdit Text and Title test suites to only include basic render tests and snapshots of their sizing in both readMode and editMode * Removed Cypress test in favor of testing EuiInlineEdit with Jest * Created the onSave prop that returns that latest value within EuiFieldText (in editMode) at the time the save button is clicked. * [REVERT ME] Added text to the InlineEditText example to display the use of the onSave prop * Updated onSave prop test to use the Jest mock function call instead of relying on variable value changes * [PR Feedback] Remove tests that toggled between read/edit mode in EuiInlineEdit Text and Title test suites. * [PR Feedback] - Updated the descriptions for the onSave and onConfirm props - Removed data-test-subj IDs from the loading skeleton rectangles - Updated the isLoading prop to default to false and removed explicit declarations in Text and Title * [PR Feedback] Updated EuiInlineEditForm test cases with more specific cases for onSave. Removed the isLoading default set in the props for the form as it's no longer needed * Revert "[REVERT ME] Added text to the InlineEditText example to display the use of the onSave prop" This reverts commit 6005e53. Removing modifications to docs file as they were only needed for testing * Created a new documentation example to showcase the onSave prop * Update src-docs/src/views/inline_edit/inline_edit_example.js Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com> --------- Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
- Loading branch information