From 6b9b7aced0d577077b8fbca55f6290deadcb009d Mon Sep 17 00:00:00 2001 From: Chase Southard Date: Sun, 17 Feb 2019 17:58:41 -0500 Subject: [PATCH 1/4] changes the text of the submit button updates the button to "Send Invitation" so that users have more context as to what the form is doing. --- app/views/partners/_form.html.erb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/partners/_form.html.erb b/app/views/partners/_form.html.erb index 2e7ef1340c..0721972205 100644 --- a/app/views/partners/_form.html.erb +++ b/app/views/partners/_form.html.erb @@ -9,7 +9,6 @@ <%= f.input_field :email, class: "form-control" %> <% end %> - <%= submit_button %> - <% end %> - - \ No newline at end of file + <%= submit_button({text: "Send Invitation"}) %> + <% end %> + From 58ba7f3e7af93b8ed054908e518b70b319b0d342 Mon Sep 17 00:00:00 2001 From: Chase Southard Date: Sun, 17 Feb 2019 18:08:10 -0500 Subject: [PATCH 2/4] changes the icon to use the envelope icon the envelope icon is used in other places like invite user form --- app/views/partners/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/partners/_form.html.erb b/app/views/partners/_form.html.erb index 0721972205..af1fc69cf2 100644 --- a/app/views/partners/_form.html.erb +++ b/app/views/partners/_form.html.erb @@ -9,6 +9,6 @@ <%= f.input_field :email, class: "form-control" %> <% end %> - <%= submit_button({text: "Send Invitation"}) %> + <%= submit_button({text: "Send Invitation", icon: "envelope"}) %> <% end %> From d2b303eae029d0470269f19a7691386e61071cbc Mon Sep 17 00:00:00 2001 From: Chase Southard Date: Sun, 17 Feb 2019 21:14:14 -0500 Subject: [PATCH 3/4] updates partner spec with proper button text --- spec/features/partner_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/features/partner_spec.rb b/spec/features/partner_spec.rb index 5de13b81e0..5911e978c8 100644 --- a/spec/features/partner_spec.rb +++ b/spec/features/partner_spec.rb @@ -22,14 +22,14 @@ visit url_prefix + "/partners/new" fill_in "Name", with: "Frank" fill_in "E-mail", with: "frank@frank.com" - click_button "Save" + click_button "Send Invitation" expect(page.find(".alert")).to have_content "added" end scenario "User creates a new partner with empty name" do visit url_prefix + "/partners/new" - click_button "Save" + click_button "Send Invitation" expect(page.find(".alert")).to have_content "didn't work" end @@ -38,7 +38,7 @@ partner = create(:partner, name: "Frank") visit url_prefix + "/partners/#{partner.id}/edit" fill_in "Name", with: "Franklin" - click_button "Save" + click_button "Save Invitation" expect(page.find(".alert")).to have_content "updated" partner.reload @@ -49,7 +49,7 @@ partner = create(:partner, name: "Frank") visit url_prefix + "/partners/#{partner.id}/edit" fill_in "Name", with: "" - click_button "Save" + click_button "Send Invitation" expect(page.find(".alert")).to have_content "didn't work" end From 02e4db8cd8d9478ec9c9e2e2ab2b5f1ccff59fa9 Mon Sep 17 00:00:00 2001 From: Chase Southard Date: Sun, 17 Feb 2019 21:42:34 -0500 Subject: [PATCH 4/4] guh. send not save. :facepalm: --- spec/features/partner_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/partner_spec.rb b/spec/features/partner_spec.rb index 5911e978c8..ee339fd62b 100644 --- a/spec/features/partner_spec.rb +++ b/spec/features/partner_spec.rb @@ -38,7 +38,7 @@ partner = create(:partner, name: "Frank") visit url_prefix + "/partners/#{partner.id}/edit" fill_in "Name", with: "Franklin" - click_button "Save Invitation" + click_button "Send Invitation" expect(page.find(".alert")).to have_content "updated" partner.reload