Skip to content

test(selection): behavior tests for drag selection across marks and tables (SD-2057)#2318

Merged
harbournick merged 4 commits intomainfrom
tadeu/sd-2057-selection-drag-behavior-tests
Mar 18, 2026
Merged

test(selection): behavior tests for drag selection across marks and tables (SD-2057)#2318
harbournick merged 4 commits intomainfrom
tadeu/sd-2057-selection-drag-behavior-tests

Conversation

@tupizz
Copy link
Copy Markdown
Contributor

@tupizz tupizz commented Mar 6, 2026

Summary

Adds 6 Playwright behavior tests covering the selection fixes from PR #2205 (SD-2024):

  • Selection across mark boundaries: Verifies the selection overlay remains visible when selecting across differently formatted text (bold, italic). Tests both programmatic selection and real mouse drag.
  • Drag flicker prevention: Samples the selection overlay at multiple points during a drag across mark boundaries to verify it never drops to zero rects mid-drag.
  • Table boundary clamping: Verifies drag selection from a paragraph into a table clamps at the table boundary instead of creating a CellSelection.
  • Wide selection spanning tables: Verifies a selection from before a table to after it produces visible overlay rects.

All tests pass on Chromium, Firefox, and WebKit.

Resolves SD-2057

Test plan

  • npx playwright test tests/selection/drag-selection-across-marks-and-tables.spec.ts — 6/6 pass on all 3 browsers

…nd tables (SD-2057)

Add 6 Playwright behavior tests covering the selection fixes from PR #2205:

- Selection overlay remains visible when selecting across mark boundaries
  (bold → italic, different formatting runs)
- Drag selection maintains continuous overlay without flicker mid-drag
- Drag from paragraph into table clamps at the table boundary
- Wide selection spanning past a table is allowed with visible overlay

All tests pass on Chromium, Firefox, and WebKit.
@linear
Copy link
Copy Markdown

linear Bot commented Mar 6, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1fe21860ec

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown
Collaborator

@harbournick harbournick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harbournick harbournick merged commit e06e98b into main Mar 18, 2026
5 of 6 checks passed
@harbournick harbournick deleted the tadeu/sd-2057-selection-drag-behavior-tests branch March 18, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants