From 6998eb9be277e711de741ad0f8d57cffc66f9e6e Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Mon, 23 Jul 2018 19:35:44 +0200 Subject: [PATCH] Test stabilization: The combination of sleep and exists_not is slow and prone to timing issues. --- test/browser/signup_password_change_and_reset_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/browser/signup_password_change_and_reset_test.rb b/test/browser/signup_password_change_and_reset_test.rb index b174f2cb7..193268f5b 100644 --- a/test/browser/signup_password_change_and_reset_test.rb +++ b/test/browser/signup_password_change_and_reset_test.rb @@ -31,9 +31,11 @@ class SignupPasswordChangeAndResetTest < TestCase value: 'some-pass', ) click(css: 'button.js-submit') - sleep 5 - exists_not(css: '.signup') + watch_for_disappear( + css: '.signup', + timeout: 10, + ) match( css: '.user-menu .user a',