Skip to content

test(outliner): move up/down: children, edges, several blocks, repeated moves - #13604

Closed
yuxi-liu-wired wants to merge 1 commit into
logseq:masterfrom
yuxi-liu-wired:test/move-up-down-cases
Closed

yuxi-liu-wired wants to merge 1 commit into
logseq:masterfrom
yuxi-liu-wired:test/move-up-down-cases

Conversation

@yuxi-liu-wired

@yuxi-liu-wired yuxi-liu-wired commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Tests only.

The outliner's only test of move-blocks-up-down! moves 1 block up among its siblings. Mutation testing of move-blocks-up-down and the sibling lookups it uses (12 one-line changes: up and down swapped, the first block moved instead of the last, the step out to the parent's sibling removed, sibling? forced, the nearest sibling made the farthest, and so on) found 7 that frontend.modules.outliner.core-test did not catch.

New cases in frontend.modules.outliner.core-test:

  • down among siblings;
  • a last child into its parent's right sibling, as its first child; and a last child with nowhere to go, which stays;
  • a first child into the block above its parent, as its last child; and a first child with nowhere to go, which stays;
  • the page's first and last blocks, which do not move;
  • 2 blocks moving together, up and down, and twice in a row;
  • a block keeping its children when it moves.

They pass on master and catch 10 of the 12 changes. The 2 left change no move's result: the page's-first-block check in the up branch is also made by the target lookup, and the original-position check only skips a move to the place the block already is.


Devin Review

yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 6, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 6, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 8, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 8, 2026
@yuxi-liu-wired
yuxi-liu-wired force-pushed the test/move-up-down-cases branch from bce23d5 to c419b62 Compare October 11, 2026 06:20
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 11, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 11, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 13, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 13, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 16, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 16, 2026
…ed moves

Mutation testing of move-blocks-up-down (12 one-line changes) found 7
that the outliner tests did not catch: the only up/down test moves 1
block up among its siblings. New cases: down among siblings, a last
child into its parent's right sibling, a first child into the block
above its parent, the edges where nothing moves, 2 blocks moving
together and twice in a row, a block keeping its children. They catch
10 of the 12; the 2 left change no move's result (the first-block check
is also made by the target lookup; the original-position check only
skips a move to the same place).
@yuxi-liu-wired
yuxi-liu-wired force-pushed the test/move-up-down-cases branch from c419b62 to 3dbb18f Compare October 16, 2026 18:34
@yuxi-liu-wired

Copy link
Copy Markdown
Contributor Author

Combined with the other PRs that change the same files into #13783.

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.

1 participant