Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/94241


Change subject: WIP some failing tests in fixUpInsertion
......................................................................

WIP some failing tests in fixUpInsertion

Change-Id: Ibd6ae30924c0f4af1351be122272055c2e9ce08e
---
M modules/ve/test/dm/ve.dm.Transaction.test.js
1 file changed, 49 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/41/94241/1

diff --git a/modules/ve/test/dm/ve.dm.Transaction.test.js 
b/modules/ve/test/dm/ve.dm.Transaction.test.js
index 295d599..279a6a0 100644
--- a/modules/ve/test/dm/ve.dm.Transaction.test.js
+++ b/modules/ve/test/dm/ve.dm.Transaction.test.js
@@ -48,6 +48,7 @@
                isolationDoc = ve.dm.example.createExampleDocument( 
'isolationData' ),
                complexTableDoc = ve.dm.example.createExampleDocument( 
'complexTable' ),
                listWithMetaDoc = ve.dm.example.createExampleDocument( 
'listWithMeta' ),
+               simpleDoc = ve.dm.example.createExampleDocument( 
'withMetaPlainData' ),
                doc2 = new ve.dm.Document(
                        ve.dm.example.preprocessAnnotations( [ { 'type': 
'paragraph' }, { 'type': '/paragraph' } ] )
                ),
@@ -322,6 +323,54 @@
                                        { 'type': 'retain', 'length': 8 },
                                        { 'type': 'retainMetadata', 'length': 1 
}
                                ]
+                       },
+                       'listItem between paragraphs inserted into a table cell 
gets wrapped in a list': {
+                               'args': [complexTableDoc, 4, [
+                                       { 'type': '/paragraph' },
+                                       { 'type': 'listItem' }, { 'type': 
'paragraph' }, 'F', 'O', 'O', { 'type': '/paragraph' }, { 'type': '/listItem' },
+                                       { 'type': 'listItem' }, { 'type': 
'paragraph' }, 'B', 'A', 'R', { 'type': '/paragraph' }, { 'type': '/listItem' },
+                                       { 'type': 'paragraph' }
+                               ]],
+                               'ops': [
+                                       { 'type': 'retain', 'length': 4 },
+                                       {
+                                               'type': 'replace',
+                                               'remove': [],
+                                               'insert': [
+                                                       { 'type': '/paragraph' 
},
+                                                       { 'type': 'list', 
'attributes': { 'style': 'bullet' } },
+                                                       { 'type': 'listItem' }, 
{ 'type': 'paragraph' }, 'F', 'O', 'O', { 'type': '/paragraph' }, { 'type': 
'/listItem' },
+                                                       { 'type': 'listItem' }, 
{ 'type': 'paragraph' }, 'B', 'A', 'R', { 'type': '/paragraph' }, { 'type': 
'/listItem' },
+                                                       { 'type': 'listItem' },
+                                                       { 'type': 'paragraph' }
+                                               ]
+                                       },
+                                       { 'type': 'retain', 'length': 49 }
+                               ]
+                       },
+                       'listItem between paragraphs inserted into a paragraph 
gets wrapped in a list': {
+                               'args': [simpleDoc, 4, [
+                                       { 'type': '/paragraph' },
+                                       { 'type': 'listItem' }, { 'type': 
'paragraph' }, 'F', 'O', 'O', { 'type': '/paragraph' }, { 'type': '/listItem' },
+                                       { 'type': 'listItem' }, { 'type': 
'paragraph' }, 'B', 'A', 'R', { 'type': '/paragraph' }, { 'type': '/listItem' },
+                                       { 'type': 'paragraph' }
+                               ]],
+                               'ops': [
+                                       { 'type': 'retain', 'length': 4 },
+                                       {
+                                               'type': 'replace',
+                                               'remove': [],
+                                               'insert': [
+                                                       { 'type': '/paragraph' 
},
+                                                       { 'type': 'list', 
'attributes': { 'style': 'bullet' } },
+                                                       { 'type': 'listItem' }, 
{ 'type': 'paragraph' }, 'F', 'O', 'O', { 'type': '/paragraph' }, { 'type': 
'/listItem' },
+                                                       { 'type': 'listItem' }, 
{ 'type': 'paragraph' }, 'B', 'A', 'R', { 'type': '/paragraph' }, { 'type': 
'/listItem' },
+                                                       { 'type': 'listItem' },
+                                                       { 'type': 'paragraph' }
+                                               ]
+                                       },
+                                       { 'type': 'retain', 'length': 8 }
+                               ]
                        }
                        // TODO test cases for unclosed openings
                        // TODO test cases for (currently failing) unopened 
closings use case

-- 
To view, visit https://gerrit.wikimedia.org/r/94241
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd6ae30924c0f4af1351be122272055c2e9ce08e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <esand...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to