From 4f8414298750193b6de3daff08364ec745a6a761 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 25 Sep 2013 10:12:08 +0200 Subject: visual feedback when submitting forms (#3164) This also helps with the failing integration test. We needed a way to tell the ajax request was back. Observing the button state now works for that. --- users/test/integration/browser/account_test.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'users/test/integration/browser/account_test.rb') diff --git a/users/test/integration/browser/account_test.rb b/users/test/integration/browser/account_test.rb index 3434557..1deda45 100644 --- a/users/test/integration/browser/account_test.rb +++ b/users/test/integration/browser/account_test.rb @@ -52,8 +52,11 @@ class AccountTest < BrowserIntegrationTest fill_in 'Public key', with: pgp_key click_on 'Save' end - debugger - assert user = User.find_by_login(username) + page.assert_selector 'input[value="Saving..."]' + # at some point we're done: + page.assert_no_selector 'input[value="Saving..."]' + assert page.has_field? 'Public key', with: pgp_key + user = User.find_by_login(username) assert_equal pgp_key, user.public_key user.account.destroy end -- cgit v1.2.3