Cmcmahon has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/110068

Change subject: Add a short pause for notification to disappear
......................................................................

Add a short pause for notification to disappear

Note: this is a deliberate use of sleep() as opposed to a
indeterminate wait.  If after clicking BACK or CLOSE the
notification overlay takes longer than one second to disappear,
we want to know that, as opposed to a variable wait of up to
several seconds.

Change-Id: Icf57cbebd13ba83bd4c50ebe2f185204de9ef24e
---
M tests/browser/features/notification.feature
M tests/browser/features/step_definitions/notification_steps.rb
2 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/68/110068/1

diff --git a/tests/browser/features/notification.feature 
b/tests/browser/features/notification.feature
index 1bd12ec..4362ed9 100644
--- a/tests/browser/features/notification.feature
+++ b/tests/browser/features/notification.feature
@@ -10,8 +10,8 @@
 
   Scenario: Closing notifications (overlay button)
     When I click the notifications overlay close button
-    Then I should not see the notifications overlay
+    Then after 1 seconds I should not see the notifications overlay
 
   Scenario: Closing notifications (browser button)
     When I click the browser back button
-    Then I should not see the notifications overlay
+    Then after 1 seconds I should not see the notifications overlay
diff --git a/tests/browser/features/step_definitions/notification_steps.rb 
b/tests/browser/features/step_definitions/notification_steps.rb
index 7cb3b6d..7818846 100644
--- a/tests/browser/features/step_definitions/notification_steps.rb
+++ b/tests/browser/features/step_definitions/notification_steps.rb
@@ -10,6 +10,7 @@
   on(ArticlePage).notifications_overlay_close_button_element.when_present.click
 end
 
-Then(/^I should not see the notifications overlay$/) do
+Then(/^after (.+) seconds I should not see the notifications overlay$/) do 
|seconds|
+  sleep seconds.to_i
   on(ArticlePage).notifications_overlay_element.should_not be_visible
 end

-- 
To view, visit https://gerrit.wikimedia.org/r/110068
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf57cbebd13ba83bd4c50ebe2f185204de9ef24e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to