From f6df202786e8610652345903377955dd7b74f90a Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Tue, 8 Aug 2017 11:56:04 -0500 Subject: [PATCH] QA: Relax toast notification QA steps It seems trying to test both the steps can cause false positives. Relaxing these checks seems to make our Jenkins job happy without breaking the tests themselves Change-Id: I119111e97f23d2f0dac7cbb0e5b86c1df0562598 --- .../features/step_definitions/common_article_steps.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/browser/features/step_definitions/common_article_steps.rb b/tests/browser/features/step_definitions/common_article_steps.rb index df5d4fd..c08ee3a 100644 --- a/tests/browser/features/step_definitions/common_article_steps.rb +++ b/tests/browser/features/step_definitions/common_article_steps.rb @@ -32,14 +32,13 @@ Then(/^I should see a toast notification$/) do # 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') + expect(page.notification_area_element.when_visible).to be_visible end - 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| - step "I should see a toast notification" on(ArticlePage) do |page| + page.wait_until_rl_module_ready('mediawiki.notification') page.wait_until do page.toast_element.when_present.text.include? msg end