Unit tests currently fail on Firefox headless (See https://gerrit.wikimedia.org/r/#/c/VisualEditor/VisualEditor/+/524816/3/ ), even though they succeed in Chromium and Firefox non-headless. See below for failure details.
The problem is ve.ce.Surface#getOffsetFromCoords behaves in a fairly arbitrary way in the ve.ce.TableNode unit tests, where a fake click event is passed with x,y coordinates pointing to nowhere meaningful.
Failure details:
Selection after double click
Expected: {
"range": {
"from": 94,
"to": 94,
"type": "range"
},
"type": "linear"
}
Actual: {
"range": {
"from": 0,
"to": 0,
"type": "range"
},
"type": "linear"
}
@tests/ce/nodes/ve.ce.TableNode.test.js:98:2
runTest@node_modules/qunit/qunit/qunit.js:3044:16
run@node_modules/qunit/qunit/qunit.js:3030:6
runTest/<@node_modules/qunit/qunit/qunit.js:3257:7
processTaskQueue@node_modules/qunit/qunit/qunit.js:2623:24
processTaskQueue/<@node_modules/qunit/qunit/qunit.js:2627:8
Selection after Shift-click on another cell
Expected: {
"fromCol": 3,
"fromRow": 3,
"tableRange": {
"from": 0,
"to": 171,
"type": "range"
},
"toCol": 0,
"toRow": 5,
"type": "table"
}
Actual: {
"fromCol": 0,
"fromRow": 3,
"tableRange": {
"from": 0,
"to": 171,
"type": "range"
},
"toCol": 0,
"toRow": 3,
"type": "table"
}
@tests/ce/nodes/ve.ce.TableNode.test.js:116:2
runTest@node_modules/qunit/qunit/qunit.js:3044:16
run@node_modules/qunit/qunit/qunit.js:3030:6
runTest/<@node_modules/qunit/qunit/qunit.js:3257:7
processTaskQueue@node_modules/qunit/qunit/qunit.js:2623:24
processTaskQueue/<@node_modules/qunit/qunit/qunit.js:2627:8