selenium: Asynchronous methods should be returned to browser.call()
authorjdlrobson <jdlrobson@gmail.com>
Wed, 8 May 2019 21:05:44 +0000 (14:05 -0700)
committerKrinkle <krinklemail@gmail.com>
Thu, 9 May 2019 12:15:12 +0000 (12:15 +0000)
Api.edit is asynchronous and is wrapped in a browser.call but
should be returned.

Follows-up 341320457cd67.

Bug: T220479
Change-Id: Id0e3549e93a967165bdc1bb758ddef8d59ccc300

tests/selenium/pageobjects/history.page.js

index 3f75243..52d614f 100644 (file)
@@ -42,7 +42,7 @@ class HistoryPage extends Page {
                } );
 
                browser.call( function () {
-                       Api.edit(
+                       return Api.edit(
                                name,
                                'Vandalized: ' + content,
                                vandalUsername