Skip to content

E2E tests: drag-and-drop notebook cell reordering#12328

Draft
rodrigosf672 wants to merge 1 commit intomainfrom
rsf/notebook-drag-drop-e2e
Draft

E2E tests: drag-and-drop notebook cell reordering#12328
rodrigosf672 wants to merge 1 commit intomainfrom
rsf/notebook-drag-drop-e2e

Conversation

@rodrigosf672
Copy link
Member

@rodrigosf672 rodrigosf672 commented Mar 6, 2026

Summary

Extend the existing notebook-cell-reordering.test.ts suite with comprehensive drag-and-drop tests for issue #9840.

  • 8 new drag-and-drop tests covering all E2E requirements from the issue
  • Tests use test.step for clear organization with succinct assertions
  • Adds dragCellToCell() helper method to page object with smart fallback selectors
  • Consolidated with existing keyboard/action bar reordering tests in a single suite

Test Coverage

Existing tests (keyboard/action bar reordering):

  • Action Bar: swap 1st and 2nd cell
  • Keyboard: swap 1st and 2nd cell
  • Boundaries: first-up and last-down are no-ops
  • Multi-move: move first to end then one up
  • Undo/redo cell move operation
  • Multiselect: move multiple cells

New drag-and-drop tests:

  • Drag-and-drop: single cell down by two positions
  • Drag-and-drop: single cell up by one position
  • Drag-and-drop: multiple selected cells
  • Drag-and-drop: to top of notebook
  • Drag-and-drop: to bottom of notebook
  • Drag-and-drop: cancel with Escape key
  • Drag-and-drop: auto-scroll when dragging near edges
  • Drag-and-drop: undo/redo after drag operation

Test Plan

These tests are designed to run once the drag-and-drop feature is implemented. The dragCellToCell() helper includes fallback logic to adapt to the actual implementation:

  • Primary: .cell-drag-handle (expected per issue spec)
  • Fallback: .cell-gutter or .positron-notebook-code-cell-gutter
  • Ultimate fallback: cell element itself

@github-actions
Copy link

github-actions bot commented Mar 6, 2026

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

Extend notebook-cell-reordering.test.ts with comprehensive drag-and-drop
tests for issue #9840. Adds 8 new tests covering single/multi-cell dragging,
boundary cases, auto-scroll, escape cancellation, and undo/redo. Also adds
dragCellToCell() helper method to notebooksPositron page object.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@rodrigosf672
Copy link
Member Author

@rodrigosf672 draft for now, wait for clarifications and full implementation of #9840 to be settled so that changes to PR can be made for drag and drop tests to be automated (to catch potential breakages with that in the future).

@rodrigosf672
Copy link
Member Author

#9840 not merged yet, wait for it to be ready for review and re-run those e2e tests (right now, they're all failing). Once fix is done, they should all pass. cc @nstrayer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

automate drag and drop cell reodering -- add new tests to existing notebook-cell-reordering.test.ts

1 participant