From 1e1cb660e2cb7517901988d6b68be79910f84ea9 Mon Sep 17 00:00:00 2001 From: Angel Perez Date: Mon, 10 Sep 2018 16:05:55 -0400 Subject: [PATCH] Add missing CommonActions#fill_in_signup_form method This method allows to fill in CONSUL's signup form without interacting with other UI elements, useful when using testing locales other than English Backported from Decide Madrid --- spec/support/common_actions.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/support/common_actions.rb b/spec/support/common_actions.rb index e5b7ece1a..881685354 100644 --- a/spec/support/common_actions.rb +++ b/spec/support/common_actions.rb @@ -12,4 +12,13 @@ module CommonActions include Users include Verifications include Votes + + def fill_in_signup_form(email = 'manuela@consul.dev', password = 'judgementday') + fill_in 'user_username', with: "Manuela Carmena #{rand(99999)}" + fill_in 'user_email', with: email + fill_in 'user_password', with: password + fill_in 'user_password_confirmation', with: password + check 'user_terms_of_service' + end + end