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

This commit is contained in:
jenkins-bot 2017-08-08 15:02:51 +00:00 committed by Gerrit Code Review
commit c2cad50d50
3 changed files with 7 additions and 2 deletions

View file

@ -28,6 +28,11 @@ end
Then(/^I should see a toast notification$/) do Then(/^I should see a toast notification$/) do
# To avoid flakey tests check the notification area element first (T170890) # 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).notification_area_element.when_visible).to be_visible
expect(on(ArticlePage).toast_element.when_visible).to be_visible expect(on(ArticlePage).toast_element.when_visible).to be_visible
end end

View file

@ -145,7 +145,7 @@ class ArticlePage
# toast # toast
div(:notification_area, id: 'mw-notification-area') div(:notification_area, id: 'mw-notification-area')
div(:toast, class: 'mw-notification') div(:toast, css: '.mw-notification')
# loader # loader
div(:content_wrapper, id: 'content') div(:content_wrapper, id: 'content')

View file

@ -7,7 +7,7 @@ Feature: Manage Watchlist
Scenario: Add an article to the watchlist Scenario: Add an article to the watchlist
Given I am viewing an unwatched page Given I am viewing an unwatched page
When I click the watch star When I click the watch star
Then I should see a toast with "Added Selenium mobile watch test to your watchlist" Then I should see a toast with message "Added Selenium mobile watch test to your watchlist"
And the watch star should be selected And the watch star should be selected
Scenario: Remove an article from the watchlist Scenario: Remove an article from the watchlist