DLynch has uploaded a new change for review.
https://gerrit.wikimedia.org/r/280677
Change subject: LinearArrowKeyDownHandler: more tests
......................................................................
LinearArrowKeyDownHandler: more tests
Bug: T130389
Change-Id: I03250665eb4ab62f500520a8e58e2d5b802b2ab3
---
M tests/ce/ve.ce.Surface.test.js
1 file changed, 39 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/77/280677/1
diff --git a/tests/ce/ve.ce.Surface.test.js b/tests/ce/ve.ce.Surface.test.js
index 56bb203..b945b29 100644
--- a/tests/ce/ve.ce.Surface.test.js
+++ b/tests/ce/ve.ce.Surface.test.js
@@ -648,6 +648,45 @@
expectedData: function () {},
expectedRangeOrSelection: new ve.Range( 19 ),
msg: 'Cursor down off a block node'
+ },
+ // Cursoring onto a block node, which should focus it
+ // Again, these are forcibly moving the cursor, so it's
not a perfect
+ // test; it's more checking how we fix up the selection
afterwards.
+ {
+ htmlOrDoc: blockImageDoc,
+ rangeOrSelection: new ve.Range( 4 ),
+ keys: [ 'RIGHT' ],
+ forceSelection: new ve.Range( 8 ), // cursor
moves into the caption
+ expectedData: function () {},
+ expectedRangeOrSelection: new ve.Range( 5, 18 ),
+ msg: 'Cursor right onto a block node'
+ },
+ {
+ htmlOrDoc: blockImageDoc,
+ rangeOrSelection: new ve.Range( 19 ),
+ keys: [ 'LEFT' ],
+ forceSelection: new ve.Range( 17 ),
+ expectedData: function () {},
+ expectedRangeOrSelection: new ve.Range( 18, 5 ),
+ msg: 'Cursor left onto a block node'
+ },
+ {
+ htmlOrDoc: blockImageDoc,
+ rangeOrSelection: new ve.Range( 4 ),
+ keys: [ 'DOWN' ],
+ forceSelection: new ve.Range( 14 ), // cursor
moves into the caption
+ expectedData: function () {},
+ expectedRangeOrSelection: new ve.Range( 5, 18 ),
+ msg: 'Cursor down onto a block node'
+ },
+ {
+ htmlOrDoc: blockImageDoc,
+ rangeOrSelection: new ve.Range( 20 ),
+ keys: [ 'UP' ],
+ forceSelection: new ve.Range( 14 ), // cursor
moves into the caption
+ expectedData: function () {},
+ expectedRangeOrSelection: new ve.Range( 18, 5 ),
+ msg: 'Cursor up onto a block node'
}
];
--
To view, visit https://gerrit.wikimedia.org/r/280677
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I03250665eb4ab62f500520a8e58e2d5b802b2ab3
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits