mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-27 12:16:51 +00:00
Fixed tests that were broken by r112150.
This commit is contained in:
parent
009d7a4dea
commit
0e41da3340
Notes:
Trevor Parscal
2012-03-02 23:12:38 +00:00
|
@ -218,9 +218,9 @@ test( 've.dm.DocumentNode.prepareElementAttributeChange', 4, function() {
|
||||||
|
|
||||||
// Test 1
|
// Test 1
|
||||||
deepEqual(
|
deepEqual(
|
||||||
documentModel.prepareElementAttributeChange( 0, 'set', 'test', 1234 ).getOperations(),
|
documentModel.prepareElementAttributeChange( 0, 'test', 1234 ).getOperations(),
|
||||||
[
|
[
|
||||||
{ 'type': 'attribute', 'method': 'set', 'key': 'test', 'value': 1234 },
|
{ 'type': 'attribute', 'key': 'test', 'from': undefined, 'to': 1234 },
|
||||||
{ 'type': 'retain', 'length': 34 }
|
{ 'type': 'retain', 'length': 34 }
|
||||||
],
|
],
|
||||||
'prepareElementAttributeChange retains data after attribute change for first element'
|
'prepareElementAttributeChange retains data after attribute change for first element'
|
||||||
|
@ -228,10 +228,10 @@ test( 've.dm.DocumentNode.prepareElementAttributeChange', 4, function() {
|
||||||
|
|
||||||
// Test 2
|
// Test 2
|
||||||
deepEqual(
|
deepEqual(
|
||||||
documentModel.prepareElementAttributeChange( 5, 'set', 'test', 1234 ).getOperations(),
|
documentModel.prepareElementAttributeChange( 5, 'test', 1234 ).getOperations(),
|
||||||
[
|
[
|
||||||
{ 'type': 'retain', 'length': 5 },
|
{ 'type': 'retain', 'length': 5 },
|
||||||
{ 'type': 'attribute', 'method': 'set', 'key': 'test', 'value': 1234 },
|
{ 'type': 'attribute', 'key': 'test', 'from': undefined, 'to': 1234 },
|
||||||
{ 'type': 'retain', 'length': 29 }
|
{ 'type': 'retain', 'length': 29 }
|
||||||
],
|
],
|
||||||
'prepareElementAttributeChange retains data before and after attribute change'
|
'prepareElementAttributeChange retains data before and after attribute change'
|
||||||
|
|
|
@ -8,7 +8,7 @@ test( 've.dm.TransactionProcessor', 31, function() {
|
||||||
// We should be creating transactions directly and feeding those into
|
// We should be creating transactions directly and feeding those into
|
||||||
// commit()/rollback() --Roan
|
// commit()/rollback() --Roan
|
||||||
var elementAttributeChange = documentModel.prepareElementAttributeChange(
|
var elementAttributeChange = documentModel.prepareElementAttributeChange(
|
||||||
0, 'set', 'test', 1
|
0, 'test', 1
|
||||||
);
|
);
|
||||||
|
|
||||||
// Test 1
|
// Test 1
|
||||||
|
|
Loading…
Reference in a new issue