jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/338011 )

Change subject: ve.ce.Surface.test: Gross workaround for failing tests
......................................................................


ve.ce.Surface.test: Gross workaround for failing tests

When a ve.ui.Surface is created (e.g. with 
ve.test.utils.createSurfaceFromDocument),
it must remain attached to the DOM for at least one setTimeout() tick.

Also remove incorrect comments. There's one like this above that is
actually correct, these must have been copy-pasted.

Bug: T158141
Change-Id: I18302439b1e405b3b1a602cd5ca1b614c2ed9e1a
---
M tests/ce/ve.ce.Surface.test.js
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Esanders: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/tests/ce/ve.ce.Surface.test.js b/tests/ce/ve.ce.Surface.test.js
index b6860fe..b782245 100644
--- a/tests/ce/ve.ce.Surface.test.js
+++ b/tests/ce/ve.ce.Surface.test.js
@@ -627,7 +627,6 @@
                                msg: 'Tab at end of table inserts new row'
                        },
                        {
-                               // Create a full surface and return the view, 
as the UI surface is required for the insert action
                                htmlOrDoc: mergedCellsDoc,
                                rangeOrSelection: {
                                        type: 'table',
@@ -640,7 +639,6 @@
                                msg: 'Up in first row of table moves out of 
table'
                        },
                        {
-                               // Create a full surface and return the view, 
as the UI surface is required for the insert action
                                htmlOrDoc: mergedCellsDoc,
                                rangeOrSelection: {
                                        type: 'table',
@@ -660,6 +658,12 @@
                        cases[ i ].expectedData, cases[ i 
].expectedRangeOrSelection, cases[ i ].msg
                );
        }
+
+       // Allow the real surface created with createSurfaceFromDocument for the
+       // 'Tab at end of table inserts new row' case to get properly 
initialized
+       // before we end the test and kill it.
+       // FIXME Oh no eww gross
+       setTimeout( assert.async(), 0 );
 } );
 
 QUnit.test( 'special key down: linear arrow keys', function ( assert ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18302439b1e405b3b1a602cd5ca1b614c2ed9e1a
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski <matma....@gmail.com>
Gerrit-Reviewer: Esanders <esand...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to