From 8fdba1b5b432dd66aca685139f647cd088d79f32 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Fri, 7 Aug 2015 12:16:20 +0200 Subject: [PATCH 1/6] Merges accounts show with registrations edit --- app/assets/stylesheets/debates.scss | 98 +++++++++++++++++++++++++++-- app/views/account/show.html.erb | 81 +++++++++++++++++++----- 2 files changed, 157 insertions(+), 22 deletions(-) diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/debates.scss index d8fabd59d..e139b94df 100644 --- a/app/assets/stylesheets/debates.scss +++ b/app/assets/stylesheets/debates.scss @@ -15,6 +15,7 @@ // 08.2. Sign Up // 09. Forms // 10. Alerts +// 11. User account // // 01. Variables @@ -187,7 +188,6 @@ header { line-height: rem-calc(30); padding: rem-calc(3) rem-calc(6); position: relative; - //when active => color: $votes-like; &:hover { background: $votes-like; @@ -210,7 +210,6 @@ header { line-height: rem-calc(30); padding: rem-calc(3) rem-calc(6); position: relative; - //when active => color: $votes-unlike; &:hover { background: $votes-unlike; @@ -236,10 +235,40 @@ header { padding-left: rem-calc(8); vertical-align: top; } + + &.voted { + + .icon-like { + background: $votes-like; + color: white; + } + } + + &.no-voted { + + .icon-like { + opacity: .5; + } + } } .unlike { @extend .like; + + &.voted { + + .icon-unlike { + background: $votes-unlike; + color: white; + } + } + + &.no-voted { + + .icon-unlike { + opacity: .5; + } + } } .total-votes { @@ -318,7 +347,6 @@ header { } .debate-description { - color: $text-color; font-size: rem-calc(13); height: $line-height*6.5; line-height: $line-height; @@ -326,6 +354,10 @@ header { margin-top: $line-height; overflow: hidden; position: relative; + + a { + color: $text-color; + } } .truncate { @@ -556,9 +588,6 @@ header { } } - - - // 06. Comments // - - - - - - - - - - - - - - - - - - - - - - - - - @@ -785,3 +814,60 @@ form { color: $alert-color; } } + +// 11. User account +// - - - - - - - - - - - - - - - - - - - - - - - - - + +.account { + background: white; + padding-top: $line-height; + + + input[type="checkbox"], .checkbox { + margin-top: -(rem-calc(12)); + } + + .back { + @include back; + } + + h1 { + clear: both; + font-size: rem-calc(36); + font-weight: bold; + line-height: $line-height*2; + margin-bottom: $line-height; + } + + .icon-comment-quotes { + color: $debates; + font-size: rem-calc(60); + line-height: $line-height; + opacity: .5; + } + + h2 { + clear: both; + font-size: rem-calc(20); + font-weight: bold; + line-height: $line-height; + margin: 0; + } + + .recommendations { + list-style-type: none; + margin-left: 0; + margin-top: $line-height; + + li { + font-size: rem-calc(12); + margin: rem-calc(12) 0; + + &:before { + color: $debates; + content: "l "; + font-family: "icons" !important; + } + } + } +} \ No newline at end of file diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index da568a9b9..c6297624c 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -1,22 +1,71 @@ -

<%= t("account.show.title") %>

+
+
+

<%= t("account.show.title") %>

-<%= form_for @account, as: :account, url: account_path do |f| %> + <%= form_for @account, as: :account, url: account_path do |f| %> +
+
+ <%= f.label :first_name, t("account.show.first_name_label") %> + <%= f.text_field :first_name, placeholder: t("account.show.first_name_label") %> +
+
+ <%= f.label :last_name, t("account.show.last_name_label") %> + <%= f.text_field :last_name, placeholder: t("account.show.last_name_label") %> +
- <%= f.label :first_name, t("account.show.first_name_label") %> - <%= f.text_field :first_name %> - <%= f.label :last_name, t("account.show.last_name_label") %> - <%= f.text_field :last_name %> +
+ <%= f.label :nickname, t("account.show.nickname_label") %> + <%= f.text_field :nickname, placeholder: t("account.show.nickname_label") %> + <%= f.label :use_nickname do %> + <%= f.check_box :use_nickname %> + <%= t("account.show.use_nickname_label") %> + <% end %> +
-
- <%= f.check_box :use_nickname %> - <%= t("account.show.use_nickname_label") %> +
+ <%= f.submit t("account.show.save_changes_submit"), class: "button radius" %> +
+
+ <% end %>
- - <%= f.label :nickname, t("account.show.nickname_label") %> - <%= f.text_field :nickname %> - - <%= f.submit t("account.show.save_changes_submit"), class: "button radius" %> -<% end %> - +
<%= link_to t("account.show.change_credentials_link"), edit_user_registration_path %> +

<%= t("devise_views.registrations.edit.edit") %> user

+ +<%= form_for(@account, as: "user", url: registration_path(@account), html: { method: :put }) do |f| %> + +
+ <%= f.label :email, t("devise_views.registrations.edit.email_label") %>
+ <%= f.email_field :email, autofocus: true %> +
+ + <% if devise_mapping.confirmable? && @resource.pending_reconfirmation? %> +
<%= t("devise_views.registrations.edit.waiting_for") %> <%= @resource.unconfirmed_email %>
+ <% end %> + +
+ <%= f.label :password, t("devise_views.registrations.edit.password_label") %> <%= t("devise_views.registrations.edit.leave_blank") %>
+ <%= f.password_field :password, autocomplete: "off" %> +
+ +
+ <%= f.label :password_confirmation, t("devise_views.registrations.edit.password_confirmation_label") %>
+ <%= f.password_field :password_confirmation, autocomplete: "off" %> +
+ +
+ <%= f.label :current_password, t("devise_views.registrations.edit.current_password_label") %> <%= t("devise_views.registrations.edit.need_current") %>
+ <%= f.password_field :current_password, autocomplete: "off" %> +
+ +
+ <%= f.submit t("devise_views.registrations.edit.update_submit") %> +
+<% end %> + +

<%= t("devise_views.registrations.edit.cancel_title") %>

+ +

<%= t("devise_views.registrations.edit.cancel_text") %> <%= button_to t("devise_views.registrations.edit.cancel_link"), registration_path(user), data: { confirm: t("devise_views.registrations.edit.cancel_confirm") }, method: :delete %>

+ +<%= link_to t("devise_views.registrations.edit.back_link"), :back %> From 076448ec80bc735c0d55989324e3444e71ff63f8 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Fri, 7 Aug 2015 17:47:12 +0200 Subject: [PATCH 2/6] fixes credentials page --- app/views/account/show.html.erb | 43 +----------- app/views/devise/registrations/edit.html.erb | 74 ++++++++++---------- config/locales/es.yml | 2 +- 3 files changed, 42 insertions(+), 77 deletions(-) diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index c6297624c..d3feef475 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -27,45 +27,8 @@
<% end %> + + <%= link_to t("account.show.change_credentials_link"), edit_user_registration_path %> + -<%= link_to t("account.show.change_credentials_link"), edit_user_registration_path %> - -

<%= t("devise_views.registrations.edit.edit") %> user

- -<%= form_for(@account, as: "user", url: registration_path(@account), html: { method: :put }) do |f| %> - -
- <%= f.label :email, t("devise_views.registrations.edit.email_label") %>
- <%= f.email_field :email, autofocus: true %> -
- - <% if devise_mapping.confirmable? && @resource.pending_reconfirmation? %> -
<%= t("devise_views.registrations.edit.waiting_for") %> <%= @resource.unconfirmed_email %>
- <% end %> - -
- <%= f.label :password, t("devise_views.registrations.edit.password_label") %> <%= t("devise_views.registrations.edit.leave_blank") %>
- <%= f.password_field :password, autocomplete: "off" %> -
- -
- <%= f.label :password_confirmation, t("devise_views.registrations.edit.password_confirmation_label") %>
- <%= f.password_field :password_confirmation, autocomplete: "off" %> -
- -
- <%= f.label :current_password, t("devise_views.registrations.edit.current_password_label") %> <%= t("devise_views.registrations.edit.need_current") %>
- <%= f.password_field :current_password, autocomplete: "off" %> -
- -
- <%= f.submit t("devise_views.registrations.edit.update_submit") %> -
-<% end %> - -

<%= t("devise_views.registrations.edit.cancel_title") %>

- -

<%= t("devise_views.registrations.edit.cancel_text") %> <%= button_to t("devise_views.registrations.edit.cancel_link"), registration_path(user), data: { confirm: t("devise_views.registrations.edit.cancel_confirm") }, method: :delete %>

- -<%= link_to t("devise_views.registrations.edit.back_link"), :back %> diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index d359cf5cd..3216c927b 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,39 +1,41 @@ -

<%= t("devise_views.registrations.edit.edit") %> <%= resource_name.to_s.humanize %>

+
+
-<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> - <%= devise_error_messages! %> +

<%= t("devise_views.registrations.edit.edit") %> <%= resource_name.to_s.humanize %>

+ + <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> + <%= devise_error_messages! %> + +
+ <%= f.label :email, t("devise_views.registrations.edit.email_label") %>
+ <%= f.email_field :email, autofocus: true %> +
+ + <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> +
<%= t("devise_views.registrations.edit.waiting_for") %> <%= resource.unconfirmed_email %>
+ <% end %> + +
+ <%= f.label :password, t("devise_views.registrations.edit.password_label") %> <%= t("devise_views.registrations.edit.leave_blank") %>
+ <%= f.password_field :password, autocomplete: "off" %> +
+ +
+ <%= f.label :password_confirmation, t("devise_views.registrations.edit.password_confirmation_label") %>
+ <%= f.password_field :password_confirmation, autocomplete: "off" %> +
+ +
+ <%= f.label :current_password, t("devise_views.registrations.edit.current_password_label") %> <%= t("devise_views.registrations.edit.need_current") %>
+ <%= f.password_field :current_password, autocomplete: "off" %> +
+ +
+ <%= f.submit t("devise_views.registrations.edit.update_submit") %> +
+ <% end %> + + <%= link_to t("devise_views.registrations.edit.back_link"), :back %> -
- <%= f.label :email, t("devise_views.registrations.edit.email_label") %>
- <%= f.email_field :email, autofocus: true %>
- - <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> -
<%= t("devise_views.registrations.edit.waiting_for") %> <%= resource.unconfirmed_email %>
- <% end %> - -
- <%= f.label :password, t("devise_views.registrations.edit.password_label") %> <%= t("devise_views.registrations.edit.leave_blank") %>
- <%= f.password_field :password, autocomplete: "off" %> -
- -
- <%= f.label :password_confirmation, t("devise_views.registrations.edit.password_confirmation_label") %>
- <%= f.password_field :password_confirmation, autocomplete: "off" %> -
- -
- <%= f.label :current_password, t("devise_views.registrations.edit.current_password_label") %> <%= t("devise_views.registrations.edit.need_current") %>
- <%= f.password_field :current_password, autocomplete: "off" %> -
- -
- <%= f.submit t("devise_views.registrations.edit.update_submit") %> -
-<% end %> - -

<%= t("devise_views.registrations.edit.cancel_title") %>

- -

<%= t("devise_views.registrations.edit.cancel_text") %> <%= button_to t("devise_views.registrations.edit.cancel_link"), registration_path(resource_name), data: { confirm: t("devise_views.registrations.edit.cancel_confirm") }, method: :delete %>

- -<%= link_to t("devise_views.registrations.edit.back_link"), :back %> +
\ No newline at end of file diff --git a/config/locales/es.yml b/config/locales/es.yml index 9bbdde6b6..2a1289cf5 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -62,7 +62,7 @@ es: show: title: "Mi cuenta" save_changes_submit: "Guardar cambios" - change_credentials_link: "Cambiar mi contraseña" + change_credentials_link: "Cambiar mis credenciales" first_name_label: "Nombre" last_name_label: "Apellidos" use_nickname_label: "Usar pseudónimo" From a65396886a120d7ea6d23f564c90bbd1871b2d83 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Fri, 7 Aug 2015 17:47:53 +0200 Subject: [PATCH 3/6] adds error messages to account edit --- app/controllers/account_controller.rb | 7 +++++-- app/views/account/show.html.erb | 12 ++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 494068476..7ad52e4bc 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -7,8 +7,11 @@ class AccountController < ApplicationController end def update - flash[:notice] = t("flash.actions.save_changes.notice") if @account.update(account_params) - redirect_to account_path + if @account.update(account_params) + redirect_to account_path, notice: t("flash.actions.save_changes.notice") + else + render :show + end end private diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index d3feef475..578838792 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -3,6 +3,18 @@

<%= t("account.show.title") %>

<%= form_for @account, as: :account, url: account_path do |f| %> + + <% if @account.errors.any? %> +
+

<%= pluralize(@account.errors.count, t("debates.form.error"), t("debates.form.errors")) %> <%= t("debates.form.not_saved") %>

+
    + <% @account.errors.full_messages.each do |message| %> +
  • <%= message %>
  • + <% end %> +
+
+ <% end %> +
<%= f.label :first_name, t("account.show.first_name_label") %> From fdfef95595328e46295b0e7d65cd9beb7f24ea3b Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Sat, 8 Aug 2015 13:21:46 +0200 Subject: [PATCH 4/6] Adds styles for account page and edit user --- app/assets/stylesheets/debates.scss | 125 ++++++++++++------- app/assets/stylesheets/variables.scss | 1 + app/views/account/show.html.erb | 5 +- app/views/devise/registrations/edit.html.erb | 58 +++++---- config/locales/devise_views.en.yml | 4 +- config/locales/devise_views.es.yml | 4 +- 6 files changed, 119 insertions(+), 78 deletions(-) diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/debates.scss index e139b94df..d8b84b1af 100644 --- a/app/assets/stylesheets/debates.scss +++ b/app/assets/stylesheets/debates.scss @@ -97,7 +97,49 @@ header { .button { color: white; font-family: inherit; - margin-top: $line-height*2; + margin-top: $line-height; + } + + .home-page { + .button { + color: white; + font-family: inherit; + margin-top: $line-height*2; + } + } + + .selected { + position: relative; + + &:before { + top: -14px; + left: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + border-top-color: #fff; + border-width: 8px; + margin-left: -8px; + } + } + + .language { + float: none; + text-align: center; + + @media (min-width: 480px) { + float: left; + } + } + + .external-links { + @extend .language; + + @media (min-width: 480px) { + float: right; + } } } @@ -106,13 +148,13 @@ header { } .top-bar { - background: white; - color: $header-color; + background: rgba(0,0,0,.5); + color: white; //$header-color; height: $line-height*4; max-width: 1170px !important; .name a { - color: black; + color: white; font-family: 'Lato'; font-size: rem-calc(36); font-weight: lighter; @@ -120,7 +162,7 @@ header { padding-left: 0; span { - color: $brand; + // color: $brand; font-size: rem-calc(24); font-weight: normal; } @@ -132,14 +174,29 @@ header { } .top-bar-section { + margin-right: $line-height; + + ul li > a { + font-size: rem-calc(14); + } + + ul li, ul li:hover:not(.has-form) > a { + background: none; + } li:not(.has-form) a:not(.button) { - background: white; - color: $brand; + background: none; + color: white; line-height: $line-height*4; + + &:hover { + background: none; + color: $link-hover; + } } li.active:not(.has-form) a:not(.button) { + background: none; height: $line-height*4; line-height: $line-height*4; } @@ -148,9 +205,13 @@ header { .top-links { color: white; font-size: rem-calc(14); - height: $line-height*2; + height: $line-height*3; padding: $line-height/2 0; + @media (min-width: 480px) { + height: $line-height*2; + } + a { color: white; } @@ -180,7 +241,7 @@ header { .icon-like { background: white; - border: 2px solid white; + border: 2px solid $votes-border; border-radius: rem-calc(3); color: $votes-neutral; display: inline-block; @@ -191,6 +252,7 @@ header { &:hover { background: $votes-like; + border-color: white; color: white; cursor: pointer; } @@ -202,7 +264,7 @@ header { .icon-unlike { background: white; - border: 2px solid white; + border: 2px solid $votes-border; border-radius: rem-calc(3); color: $votes-neutral; display: inline-block; @@ -213,6 +275,7 @@ header { &:hover { background: $votes-unlike; + border-color: white; color: white; cursor: pointer; } @@ -235,40 +298,10 @@ header { padding-left: rem-calc(8); vertical-align: top; } - - &.voted { - - .icon-like { - background: $votes-like; - color: white; - } - } - - &.no-voted { - - .icon-like { - opacity: .5; - } - } } .unlike { @extend .like; - - &.voted { - - .icon-unlike { - background: $votes-unlike; - color: white; - } - } - - &.no-voted { - - .icon-unlike { - opacity: .5; - } - } } .total-votes { @@ -347,6 +380,7 @@ header { } .debate-description { + color: $text-color; font-size: rem-calc(13); height: $line-height*6.5; line-height: $line-height; @@ -354,10 +388,6 @@ header { margin-top: $line-height; overflow: hidden; position: relative; - - a { - color: $text-color; - } } .truncate { @@ -588,6 +618,9 @@ header { } } + + + // 06. Comments // - - - - - - - - - - - - - - - - - - - - - - - - - @@ -815,11 +848,13 @@ form { } } + // 11. User account // - - - - - - - - - - - - - - - - - - - - - - - - - .account { background: white; + min-height: $line-height*23; padding-top: $line-height; @@ -827,7 +862,7 @@ form { margin-top: -(rem-calc(12)); } - .back { + .back, .icon-angle-left { @include back; } diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss index f9607af9c..72c357e7b 100644 --- a/app/assets/stylesheets/variables.scss +++ b/app/assets/stylesheets/variables.scss @@ -27,6 +27,7 @@ $comments-text: #3F4549; $header-color: #292B33; $link: #0077B9; +$link-hover: #2178BF; $tags-bg: #FAFAFA; $tags-border: #F0F0F0; diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index 578838792..0d2356ecf 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -39,8 +39,9 @@
<% end %> +
- <%= link_to t("account.show.change_credentials_link"), edit_user_registration_path %> - +
+ <%= link_to t("account.show.change_credentials_link"), edit_user_registration_path, class: 'button radius small secondary' %>
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 3216c927b..b670b6776 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,41 +1,45 @@ -
-
+
+ \ No newline at end of file diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml index 7675a204e..694abdf99 100644 --- a/config/locales/devise_views.en.yml +++ b/config/locales/devise_views.en.yml @@ -41,11 +41,11 @@ en: edit: "Edit" email_label: "Email" waiting_for: "Currently waiting confirmation for:" - leave_blank: "(leave blank if you don't want to change it)" + leave_blank: "Leave blank if you don't want to change it" password_label: "New password" password_confirmation_label: "Confirm new password" current_password_label: "Current password" - need_current: "(we need your current password to confirm your changes)" + need_current: "We need your current password to confirm your changes" update_submit: "Update" cancel_title: "Cancel my account" cancel_text: "Unhappy?" diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml index 63e3159e0..95d4e199c 100644 --- a/config/locales/devise_views.es.yml +++ b/config/locales/devise_views.es.yml @@ -41,11 +41,11 @@ es: edit: "Editar" email_label: "Email" waiting_for: "Esperando confirmación de:" - leave_blank: "(dejar en blanco si no deseas cambiarla)" + leave_blank: "Dejar en blanco si no deseas cambiarla" password_label: "Contraseña nueva" password_confirmation_label: "Confirmar contraseña nueva" current_password_label: "Contraseña actual" - need_current: "(necesitamos tu contraseña actual para confirmar los cambios)" + need_current: "Necesitamos tu contraseña actual para confirmar los cambios" update_submit: "Actualizar" cancel_title: "Cancelar cuenta" cancel_text: "¿Deseas borrar tu cuenta?" From 61463fc378630097447dfe1d5230809ff8cfccc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sat, 8 Aug 2015 13:53:15 +0200 Subject: [PATCH 5/6] removes unused i18n entries --- config/locales/devise_views.en.yml | 4 ---- config/locales/devise_views.es.yml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml index 694abdf99..ae778d00f 100644 --- a/config/locales/devise_views.en.yml +++ b/config/locales/devise_views.en.yml @@ -47,10 +47,6 @@ en: current_password_label: "Current password" need_current: "We need your current password to confirm your changes" update_submit: "Update" - cancel_title: "Cancel my account" - cancel_text: "Unhappy?" - cancel_link: "Cancel my account" - cancel_confirm: "Are you sure?" back_link: "Back" new: title: "Sign up" diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml index 95d4e199c..647dd3237 100644 --- a/config/locales/devise_views.es.yml +++ b/config/locales/devise_views.es.yml @@ -47,10 +47,6 @@ es: current_password_label: "Contraseña actual" need_current: "Necesitamos tu contraseña actual para confirmar los cambios" update_submit: "Actualizar" - cancel_title: "Cancelar cuenta" - cancel_text: "¿Deseas borrar tu cuenta?" - cancel_link: "Cancelar mi cuenta" - cancel_confirm: "¿Seguro?" back_link: "Atrás" new: title: "Registrarse" From fefe5a12bafed81535daaeab02b222ec5fc5e392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sat, 8 Aug 2015 14:04:55 +0200 Subject: [PATCH 6/6] adds spec for failed edition of user data --- spec/features/account_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/features/account_spec.rb b/spec/features/account_spec.rb index e622c83c1..174145a7f 100644 --- a/spec/features/account_spec.rb +++ b/spec/features/account_spec.rb @@ -15,6 +15,20 @@ feature 'Account' do expect(page).to have_selector("input[value='Colau']") end + scenario "Failed Edit" do + login_as(@user) + visit account_path + + fill_in 'account_first_name', with: '' + fill_in 'account_last_name', with: '' + fill_in 'account_nickname', with: '' + click_button 'Save changes' + + expect(page).to have_content "2 errors prohibited this debate from being saved" + expect(page).to have_content "First name can't be blank" + expect(page).to have_content "First name can't be blank" + end + scenario 'Edit' do login_as(@user) visit account_path