Skip to content

Commit

Permalink
Merge pull request #46 from nestauk/add-sign-up-button
Browse files Browse the repository at this point in the history
Add sign up button
  • Loading branch information
cdccollins authored Oct 16, 2024
2 parents 4f2d316 + c90dd51 commit 92f43ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/views/pages/thank_you.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>
</div>
<div class="block md:hidden">
<%= image_tag "grandchild.jpg" %>
<%= image_tag "grandchild.jpg", alt: "Grandfather playing with his grandchild" %>
</div>
</div>
</div>
3 changes: 2 additions & 1 deletion app/views/users/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
<p class="text-md text-lg l:text-xl text-white xl:w-5/6">
“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."<br>- Ali's mum
</p>
<%= link_to "Sign up", "#sign-up-form", class: "btn bg-purple-300 float-end md:w-1/3 mt-4" %>
</div>
</div>
</div>
<div class="block md:hidden">
<%= image_tag "children-playing.jpg" %>
<%= image_tag "children-playing.jpg", alt: "Father smiling at his young child" %>
</div>

<div class="px-3 py-6 md:py-24 md:px-28 bg-red-100 items-center">
Expand Down
8 changes: 6 additions & 2 deletions test/system/users_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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!"

Expand All @@ -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")
Expand Down

0 comments on commit 92f43ed

Please sign in to comment.