Editable text feature specs#2427
Merged
Merged
Conversation
Break the monolithic spec into six focused files under `EditableText/features/` (rendering, typography, placeholder, commentHighlights, commentBadges, commentSelection), mirroring the commenting feature spec layout. Migrate off `renderWithCommenting` and the local DndProvider + EditorStateProvider wrapper onto `renderEntry` from a new `support/pageObjects/inlineEditing` module, so tests exercise the real EntryDecorator instead of a hand-built provider tree. The inline- editing EntryDecorator gains a `commenting` prop that seeds ReviewState, parallel to commenting's EntryDecorator. Hide badge role/styling details behind a `queryAllCommentBadges` page object so specs assert via `isInDotMode()` / `isActive()` rather than querying `[role=status]` and checking CSS module classes.
Both EditableText specs that previously used it now go through renderEntry, exercising the real EntryDecorator provider tree. The helper's only purpose was to shortcut that tree with a hand-built provider stack, which had a habit of drifting from production.
Move editor-selection state changes off a test-only SelectionCapture component (which reached into `useEditorSelection.select`) and onto production pathways: `newThread` via a `SELECT` postMessage hitting inline-editing's MessageHandler, and `highlightedThreadId` via clicking an inline thread badge through a new `select()` method on the badge page object.
jsdom's Selection implementation is incomplete for slate-react's usage. Move the workaround stub (which returns undefined so slate falls back to its internal selection state) from per-suite beforeAll hooks in seven inline-editing specs into setupFilesAfterEnv, so the stub is in place by default and slate-using specs no longer need to remember it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.