mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-12 00:48:46 +00:00
QA: Minor tweaks to how we check toast notifications
A toast autohides within 5 seconds and its display properties are inherited from #mw-notification-area. This slight tweak waits for mw-notification-area to be visible before verifying toast and its contents Change-Id: I89beaf9d131155e958cc9aae84a9e30ffd8e9e4f
This commit is contained in:
parent
9243513749
commit
0f93115725
|
@ -27,7 +27,9 @@ When(/^I click the watch star$/) do
|
|||
end
|
||||
|
||||
Then(/^I should see a toast notification$/) do
|
||||
expect(on(ArticlePage).toast_element.when_present(10)).to be_visible
|
||||
# To avoid flakey tests check the notification area element first (T170890)
|
||||
expect(on(ArticlePage).notification_area_element.when_visible).to be_visible
|
||||
expect(on(ArticlePage).toast_element.when_visible).to be_visible
|
||||
end
|
||||
|
||||
Then(/^I should see a toast with message "(.+)"$/) do |msg|
|
||||
|
|
|
@ -144,6 +144,7 @@ class ArticlePage
|
|||
div(:spinner_loading, class: 'spinner loading')
|
||||
|
||||
# toast
|
||||
div(:notification_area, id: 'mw-notification-area')
|
||||
div(:toast, class: 'mw-notification')
|
||||
|
||||
# loader
|
||||
|
|
Loading…
Reference in a new issue