summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-04-30 16:35:39 +0200
committerAzul <azul@leap.se>2014-05-06 09:36:28 +0200
commit3952a7dfcd13993bd51ac7dc07cb3a01b4658e25 (patch)
tree5336a0921ff84b6b8c0957c9907ffe20ba2f9ba6 /test/integration
parent3afb745d961c5b34d980e7e005c4e7bf81a880c4 (diff)
hide srp forms when no js is available
Hiding them using two mechanisms in case one fails: .hidden class - bootstrap hides them then style='display:none' - so they are hidden even if css load fails
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/browser/account_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/integration/browser/account_test.rb b/test/integration/browser/account_test.rb
index 6d5f7f9..4e11520 100644
--- a/test/integration/browser/account_test.rb
+++ b/test/integration/browser/account_test.rb
@@ -123,6 +123,20 @@ class AccountTest < BrowserIntegrationTest
assert page.has_content?("server failed")
end
+ test "does not render signup form without js" do
+ Capybara.current_driver = :rack_test # no js
+ visit '/signup'
+ assert page.has_no_content?("Username")
+ assert page.has_no_content?("Password")
+ end
+
+ test "does not render login form without js" do
+ Capybara.current_driver = :rack_test # no js
+ visit '/login'
+ assert page.has_no_content?("Username")
+ assert page.has_no_content?("Password")
+ end
+
def attempt_login(username, password)
click_on 'Log In'
fill_in 'Username', with: username