Skip to content

Add more test cases for open slice ends - #84

Open
asouqi wants to merge 1 commit into
masterfrom
update_test_cases
Open

asouqi wants to merge 1 commit into
masterfrom
update_test_cases

Conversation

@asouqi

@asouqi asouqi commented Jan 15, 2026

Copy link
Copy Markdown
Contributor
  • This PR will add test cases to cover the open slice for ReplaceAroundStep
  • Update document in test/__fixtures__/manuscript-simple.json as there was an update to manuscript-transform without updating the document to be compatible with the schema

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds four new skipped test cases for testing open slice ends in ReplaceAroundStep operations, and updates the manuscript-simple.json fixture document to be compatible with the current manuscript-transform schema. Corresponding position adjustments were made in tests that reference the updated fixture.

Changes:

  • Added 4 new skipped test cases for tracking various ReplaceAroundStep scenarios with open slice ends
  • Updated manuscript-simple.json fixture to include new required wrapper nodes (title, abstracts, body, backmatter, comments) and attributes
  • Adjusted position indices in existing tests that use the updated manuscript-simple fixture

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
test/replace-around-steps/replace-around-steps.test.ts Added 4 new skipped test cases for open slice end scenarios, removed commented-out test code, and fixed indentation in one test
test/nodes/nodes.test.ts Updated position indices from 144/145 to 163/164 to match the restructured manuscript-simple fixture
test/manuscript/manuscript.test.ts Updated position indices from 11 to 15 to accommodate the new document structure
test/fixtures/manuscript-simple.json Restructured document to comply with schema requirements by adding wrapper nodes and new required attributes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/replace-around-steps/replace-around-steps.test.ts
Comment on lines -69 to -78
// This simulates pressing backspace inside 4th paragraph which should try to lift it inside the blockquote
// .cmd((state, dispatch) => {
// const { tr, schema } = state
// const bq = schema.nodes.blockquote.create()
// // Or, more challenging?
// // const bq = schema.nodes.blockquote.create(undefined, schema.nodes.paragraph.create())
// const slice = new Slice(Fragment.from(bq), 1, 0)
// const step = new ReplaceAroundStep(48, 64, 49, 64, slice, 0, true)
// dispatch(tr.step(step))
// })

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this case moved up in a separate test case, and was skipped as we still don't support tracking of joining to the nodes

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.

3 participants