jenkins-bot has submitted this change and it was merged.

Change subject: screenshots: Add task for Math dialog
......................................................................


screenshots: Add task for Math dialog

Bug: T136675
Change-Id: I3194eb1b8131cfc3f64188cc40c26c1c1525d8de
---
M build/screenshots.js
1 file changed, 27 insertions(+), 0 deletions(-)

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



diff --git a/build/screenshots.js b/build/screenshots.js
index c729e6a..247e56a 100644
--- a/build/screenshots.js
+++ b/build/screenshots.js
@@ -282,6 +282,33 @@
                                }
                        );
                } );
+               test.it( 'Math dialog', function () {
+                       runScreenshotTest( 'VisualEditor_formula',
+                               // This function is converted to a string and 
executed in the browser
+                               function () {
+                                       var win,
+                                               done = arguments[ 
arguments.length - 1 ],
+                                               surface = 
ve.init.target.surface;
+
+                                       surface.dialogs.once( 'opening', 
function ( win, opening ) {
+                                               opening.then( function () {
+                                                       
win.previewElement.once( 'render', function () {
+                                                               
win.previewElement.$element.find( 'img' ).on( 'load', function () {
+                                                                       done(
+                                                                               
seleniumUtils.getBoundingRect( [
+                                                                               
        win.$frame[ 0 ]
+                                                                               
]
+                                                                       ) );
+                                                               } );
+                                                       } );
+                                                       win.input.setValue( 'E 
= mc^2' ).moveCursorToEnd();
+                                               } );
+                                       }, 1000 );
+                                       surface.executeCommand( 'mathDialog' );
+                                       win = surface.dialogs.currentWindow;
+                               }
+                       );
+               } );
        } );
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3194eb1b8131cfc3f64188cc40c26c1c1525d8de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to