From 40a7cc2d3a5e8fdbec17d5fb29d68c39b5ead1ab Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Thu, 18 Aug 2011 12:48:59 +0200 Subject: [PATCH] add cucumber scenarios for new preferences --- .../preferences/_authentication.html.erb | 15 +++++++-- app/views/shared/_footer.rhtml | 4 +-- features/preferences.feature | 31 ++++++++++++++++--- features/step_definitions/login_steps.rb | 6 +++- .../step_definitions/preferences_steps.rb | 15 +++++++++ features/step_definitions/user_steps.rb | 2 +- features/support/paths.rb | 2 ++ public/javascripts/application.js | 2 +- public/stylesheets/standard.css | 4 +++ 9 files changed, 70 insertions(+), 11 deletions(-) create mode 100644 features/step_definitions/preferences_steps.rb diff --git a/app/views/preferences/_authentication.html.erb b/app/views/preferences/_authentication.html.erb index f2c610af..64afc8e7 100644 --- a/app/views/preferences/_authentication.html.erb +++ b/app/views/preferences/_authentication.html.erb @@ -1,8 +1,19 @@

<%= t('preferences.token_description') %>: <%= current_user.token %> +

+ +
+ <% # TODO: make remote AJAX call for new token %> -<%= button_to t('preferences.generate_new_token'), refresh_token_user_path(current_user), - :confirm => t('preferences.generate_new_token_confirm') %> + +<%= link_to( + t('preferences.generate_new_token'), + refresh_token_user_path( current_user ), + :method => :post, + :confirm => t('preferences.generate_new_token_confirm'), + :id=>'prefs_new_token') %> + +

<% if Tracks::Config.auth_schemes.length > 1 %> diff --git a/app/views/shared/_footer.rhtml b/app/views/shared/_footer.rhtml index 49a20da4..aacd2561 100644 --- a/app/views/shared/_footer.rhtml +++ b/app/views/shared/_footer.rhtml @@ -1,7 +1,7 @@