From c90dd515cf19538283dba660a89a122f28700d11 Mon Sep 17 00:00:00 2001 From: Celia Collins Date: Wed, 16 Oct 2024 15:05:14 +0100 Subject: [PATCH] Add sign up button --- app/views/pages/thank_you.html.erb | 2 +- app/views/users/new.html.erb | 3 ++- test/system/users_test.rb | 8 ++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/views/pages/thank_you.html.erb b/app/views/pages/thank_you.html.erb index 148273d..52c89f5 100644 --- a/app/views/pages/thank_you.html.erb +++ b/app/views/pages/thank_you.html.erb @@ -16,7 +16,7 @@
- <%= image_tag "grandchild.jpg" %> + <%= image_tag "grandchild.jpg", alt: "Grandfather playing with his grandchild" %>
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index b361295..b7e7e49 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -13,11 +13,12 @@

“A great guide and confidence builder knowing we were doing a lot right and then fantastic guidance in what we can do and apply to further develop our child."
- Ali's mum

+ <%= link_to "Sign up", "#sign-up-form", class: "btn bg-purple-300 float-end md:w-1/3 mt-4" %>
- <%= image_tag "children-playing.jpg" %> + <%= image_tag "children-playing.jpg", alt: "Father smiling at his young child" %>
diff --git a/test/system/users_test.rb b/test/system/users_test.rb index 510f993..af8a8bf 100644 --- a/test/system/users_test.rb +++ b/test/system/users_test.rb @@ -19,7 +19,9 @@ class UsersTest < ApplicationSystemTestCase message = "Welcome to our programme of weekly texts with fun activities! Here's a video to get you started: http://localhost:3000/m/123" stub_successful_twilio_call(message, User.new(phone_number: "+447444930200")) - click_on "Sign up" + within("#sign-up-form") do + click_on "Sign up" + end assert_text "Thank you for signing up!" @@ -40,7 +42,9 @@ class UsersTest < ApplicationSystemTestCase test "form shows errors" do visit new_user_path - click_on "Sign up" + within("#sign-up-form") do + click_on "Sign up" + end assert_field_has_errors("First name") assert_field_has_errors("Last name")