QA: Make sure toast is not empty before checking text value
Copies approach for the text of the first heading should be accounting for the fact that the toast can have an empty message "" at any given time. Bug: T170890 Change-Id: Iba8a503a2aea30cb46fba27f000843183e9c46f1
This commit is contained in:
parent
8803101c52
commit
ebef44d0fe
|
@ -34,7 +34,12 @@ end
|
||||||
|
|
||||||
Then(/^I should see a toast with message "(.+)"$/) do |msg|
|
Then(/^I should see a toast with message "(.+)"$/) do |msg|
|
||||||
step "I should see a toast notification"
|
step "I should see a toast notification"
|
||||||
expect(on(ArticlePage).toast_element.when_present.text).to match msg
|
on(ArticlePage) do |page|
|
||||||
|
page.wait_until do
|
||||||
|
page.toast_element.when_present.text.include? msg
|
||||||
|
end
|
||||||
|
expect(page.toast_element.when_present.text).to match msg
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Then /^I should see a drawer with message "(.+)"$/ do |text|
|
Then /^I should see a drawer with message "(.+)"$/ do |text|
|
||||||
|
|
Loading…
Reference in New Issue