From aa57b72fbae51b64b4a7b6f7604b23199c05f7c5 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 24 Feb 2015 02:42:47 +0100 Subject: [PATCH] Improved error handling. --- test/browser/setting_test.rb | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/test/browser/setting_test.rb b/test/browser/setting_test.rb index f9c4936ce..21e8c9995 100644 --- a/test/browser/setting_test.rb +++ b/test/browser/setting_test.rb @@ -22,6 +22,10 @@ class SettingTest < TestCase ) click( :css => '#auth_facebook button[type=submit]' ) watch_for( + :css => '#notify', + :value => 'update successful', + ) + match( :css => '#auth_facebook select[name="{boolean}auth_facebook"]', :value => 'yes', ) @@ -37,6 +41,10 @@ class SettingTest < TestCase ) click( :css => '#auth_facebook button[type=submit]' ) watch_for( + :css => '#notify', + :value => 'update successful', + ) + match( :css => '#auth_facebook select[name="{boolean}auth_facebook"]', :value => 'no', ) @@ -55,12 +63,15 @@ class SettingTest < TestCase :value => 'secret_test1234äöüß', ) click( :css => '#auth_facebook_credentials button[type=submit]' ) - sleep 4 watch_for( + :css => '#notify', + :value => 'update successful', + ) + match( :css => '#auth_facebook_credentials input[name=app_id]', :value => 'id_test1234äöüß', ) - watch_for( + match( :css => '#auth_facebook_credentials input[name=app_secret]', :value => 'secret_test1234äöüß', ) @@ -75,12 +86,15 @@ class SettingTest < TestCase :value => '---', ) click( :css => '#auth_facebook_credentials button[type=submit]' ) - sleep 4 watch_for( + :css => '#notify', + :value => 'update successful', + ) + match( :css => '#auth_facebook_credentials input[name=app_id]', :value => '---', ) - watch_for( + match( :css => '#auth_facebook_credentials input[name=app_secret]', :value => '---', )