Commit graph

17 commits

Author SHA1 Message Date
Catrope 748b34cc49 ve2 -> ve in the tests directory too
Change-Id: I30b56b1c43202d8cb6af397d2813b19b1a71d30e
2012-06-19 18:36:34 -07:00
Catrope 7dd65cda91 Add newFromWrap(), ported 98% verbatim from the old code
Change-Id: I81fc74b1d23bc6b60e476bfefbae4d7d9a9bf5f6
2012-06-13 16:17:23 -07:00
Trevor Parscal c8c4ed8f99 Added ve.dm.Transaction.newFromContentBranchConversion
Change-Id: I0e272b24dddae028e44d4c693297b1875000ef57
2012-06-11 15:58:44 -07:00
Trevor Parscal 61ba00aaef Add a tableSection to the example data and update offsets and stuff in almost all tests
This fixes the converter tests.

Change-Id: I72f6d6c103c3a8bbee201c070a2f7c1bfe401235
2012-06-08 12:27:39 -07:00
Trevor Parscal c8ec9fc6f5 Added a test for removing all the content of a paragraph in the middle of a document
Change-Id: Ibbbc401a6484616dca52133b605d643ba3f810eb
2012-06-07 10:57:03 -07:00
Catrope f34b41fe3f Add a test case for a complex removal
Change-Id: I9e57bf2f1381b1da196308f1cd27c9be58bf8509
2012-06-06 15:36:08 -07:00
Catrope 1429a3da59 Rewrite newFromRemoval() using 'covered' mode
Change-Id: If0736aff6d194ec09c2a109f046dd6362ddc64fb
2012-06-06 11:47:35 -07:00
Trevor Parscal a0ea700090 Added tests for transactions that deal with removing alien nodes
Change-Id: Id36413c62386dbe5ebc8c8b3a1d3c5e301a8175a
2012-06-04 16:21:29 -07:00
Catrope f7445b37b8 Retain attributes when reopening closed nodes
* Push entire elements onto openingStack rather than type strings
* When closing an element, build a clone of the opening and push it onto
  closedElements, then insert that clone when reopening the element

Change-Id: I8b0fb44394aed6c471dc6dacaab03e44c2333733
2012-06-04 16:07:16 -07:00
Catrope e67b2fd793 Add some more tests for newFromInsertion
Change-Id: I3c403928a8176d8685e48a63759fefec4657ca96
2012-06-04 16:01:14 -07:00
Trevor Parscal 386faa5569 Fixed ve.dm.Transaction.newFromRemoval so it supports trimming off extra openings and closings
Change-Id: Icbcf4129a51aa92d47aa89738facd0d288337cbd
2012-06-01 14:34:59 -07:00
Trevor Parscal 32bddaf088 Added ve.dm.Transaction.newFromRemoval
Also:
* Refactored tests
* Added tests for ve.dm.Transaction.newFromInsertion
* Added tests for ve.dm.Transaction.newFromRemoval
* Fixed problems with ve.dm.Transaction.newFromInsertion
* Added ve.dm.Node.canBeMergedWith which is partially a port of ve.Node.getCommonAncestorPaths merged with canMerge from within ve.dm.DocumentNode.prepareRemoval from the old ve codebase

Change-Id: Ibbc3887d08286d8ab33fd6296487802d65b319fa
2012-05-31 14:39:34 -07:00
Catrope 9a1ec62f0d Remove pushInsert() and pushRemove()
The 'insert' and 'remove' operations weren't implemented in the
transaction processor and were a holdover from the old DM
implementation.

Also migrated the tests, especially those that asserted that consecutive
insert/remove operations were combined (this is no longer the case now
that they are replace operations)

Change-Id: I2379fe92b331c5316f70f4b695397da41581cce9
2012-05-23 12:45:27 -07:00
Trevor Parscal 0a32898f3a Added annotation and attribute tests for transaction constructors
Change-Id: I61e5f37b1f866afc4a3b9a18cd6e7e7a08e0958f
2012-05-21 12:21:07 -07:00
Trevor Parscal 6321821c86 Rewrote tests for ve.dm.Transaction to use a data provider
Change-Id: I7ecf09c627b96b4c84824152bd178fb36c1ce348
2012-05-11 16:49:31 -07:00
Trevor Parscal 39b3755310 Line-length fixes
Change-Id: I5258ad2e550313a95ae5b7bba951992db2db966c
2012-05-07 11:45:31 -07:00
Catrope f9fd9ea66b Add tests for ve.dm.Transaction
These are currently broken because pushReplace() doesn't update the
lengthDifference

Change-Id: If0b611b7228c54ed15551514e773865be343e63a
2012-04-20 11:29:30 -07:00