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

Change subject: QA: Adjustments to account for slow loading of 

QA: Adjustments to account for slow loading of mediawiki.notifications

* Use css rather than class for finding toast
* Correct a test typo
* Add a step to wait until the mediawiki.notification module
has been loaded

Bug: T170890
Change-Id: I86e48e00ebb83772149da7c7f20097b5436a0cf5
M tests/browser/features/step_definitions/common_article_steps.rb
M tests/browser/features/support/pages/article_page.rb
M tests/browser/features/watchstar.feature
3 files changed, 7 insertions(+), 2 deletions(-)

  jenkins-bot: Verified
  Jdlrobson: Looks good to me, approved

diff --git a/tests/browser/features/step_definitions/common_article_steps.rb 
index 453bc8a..df5d4fd 100644
--- a/tests/browser/features/step_definitions/common_article_steps.rb
+++ b/tests/browser/features/step_definitions/common_article_steps.rb
@@ -28,6 +28,11 @@
 Then(/^I should see a toast notification$/) do
   # To avoid flakey tests check the notification area element first (T170890)
+  on(ArticlePage) do |page|
+    # Minerva loads mediawiki.notify at startup which defers the loading of 
this module
+    # We must wait until the lazy loading has happened before checking for the 
toast (T170890)
+    page.wait_until_rl_module_ready('mediawiki.notification')
+  end
   expect(on(ArticlePage).notification_area_element.when_visible).to be_visible
   expect(on(ArticlePage).toast_element.when_visible).to be_visible
diff --git a/tests/browser/features/support/pages/article_page.rb 
index 2b733ae..44eb848 100644
--- a/tests/browser/features/support/pages/article_page.rb
+++ b/tests/browser/features/support/pages/article_page.rb
@@ -145,7 +145,7 @@
   # toast
   div(:notification_area, id: 'mw-notification-area')
-  div(:toast, class: 'mw-notification')
+  div(:toast, css: '.mw-notification')
   # loader
   div(:content_wrapper, id: 'content')
diff --git a/tests/browser/features/watchstar.feature 
index 76ef5b0..f319633 100644
--- a/tests/browser/features/watchstar.feature
+++ b/tests/browser/features/watchstar.feature
@@ -7,7 +7,7 @@
   Scenario: Add an article to the watchlist
     Given I am viewing an unwatched page
     When I click the watch star
-    Then I should see a toast with "Added Selenium mobile watch test to your 
+    Then I should see a toast with message "Added Selenium mobile watch test 
to your watchlist"
       And the watch star should be selected
   Scenario: Remove an article from the watchlist

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I86e48e00ebb83772149da7c7f20097b5436a0cf5
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <>
Gerrit-Reviewer: Hashar <>
Gerrit-Reviewer: Jdlrobson <>
Gerrit-Reviewer: Niedzielski <>
Gerrit-Reviewer: Pmiazga <>
Gerrit-Reviewer: Zfilipin <>
Gerrit-Reviewer: jenkins-bot <>

MediaWiki-commits mailing list

Reply via email to