From ee55a8918b19c8b9b76d744d69c61421214b8944 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Mon, 10 Jul 2023 22:41:36 -0400 Subject: [PATCH 1/3] Fixup broken credit card bills test --- app/views/credit_card_bills/show.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/credit_card_bills/show.html.erb b/app/views/credit_card_bills/show.html.erb index 18b1e77..ee82a91 100644 --- a/app/views/credit_card_bills/show.html.erb +++ b/app/views/credit_card_bills/show.html.erb @@ -6,10 +6,10 @@ <%= render @credit_card_bill %> - <%= link_to 'Edit this credit_card_bill', edit_credit_card_bill_path(@credit_card_bill), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> + <%= link_to 'Edit this credit card bill', edit_credit_card_bill_path(@credit_card_bill), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
- <%= button_to 'Destroy this credit_card_bill', credit_card_bill_path(@credit_card_bill), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %> + <%= button_to 'Destroy this credit card bill', credit_card_bill_path(@credit_card_bill), method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
- <%= link_to 'Back to credit_card_bills', credit_card_bills_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> + <%= link_to 'Back to credit card bills', credit_card_bills_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> -- 2.45.2 From 21f35f5e0b09b76916377881b314fa5022a05c0d Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Mon, 10 Jul 2023 22:43:18 -0400 Subject: [PATCH 2/3] file name --- test/system/{extra_bills_test.rb => credit_card_bills_test.rb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/system/{extra_bills_test.rb => credit_card_bills_test.rb} (100%) diff --git a/test/system/extra_bills_test.rb b/test/system/credit_card_bills_test.rb similarity index 100% rename from test/system/extra_bills_test.rb rename to test/system/credit_card_bills_test.rb -- 2.45.2 From b5e86539fc35031888ee03f7f05b4aca9efaa3bb Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Mon, 10 Jul 2023 23:04:36 -0400 Subject: [PATCH 3/3] Fix fill_in not working with option value --- test/fixtures/members.yml | 4 ++-- test/system/expenses_test.rb | 4 ++-- test/system/incomes_test.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/fixtures/members.yml b/test/fixtures/members.yml index 956805a..6630fc3 100644 --- a/test/fixtures/members.yml +++ b/test/fixtures/members.yml @@ -1,9 +1,9 @@ # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html one: - name: MyString + name: Member One pays: false two: - name: MyString + name: Member Two pays: false diff --git a/test/system/expenses_test.rb b/test/system/expenses_test.rb index 679a8ef..abb3fe9 100644 --- a/test/system/expenses_test.rb +++ b/test/system/expenses_test.rb @@ -18,7 +18,7 @@ class ExpensesTest < ApplicationSystemTestCase fill_in "Description", with: @expense.description check "Estimated" if @expense.estimated fill_in "Payment", with: @expense.payment - fill_in "Period", with: @expense.period + select @expense.period.capitalize, from: "Period" click_on "Create Expense" assert_text "Expense was successfully created" @@ -33,7 +33,7 @@ class ExpensesTest < ApplicationSystemTestCase fill_in "Description", with: @expense.description check "Estimated" if @expense.estimated fill_in "Payment", with: @expense.payment - fill_in "Period", with: @expense.period + select @expense.period.capitalize, from: "Period" click_on "Update Expense" assert_text "Expense was successfully updated" diff --git a/test/system/incomes_test.rb b/test/system/incomes_test.rb index bcce38d..ab77bf0 100644 --- a/test/system/incomes_test.rb +++ b/test/system/incomes_test.rb @@ -17,7 +17,7 @@ class IncomesTest < ApplicationSystemTestCase fill_in "Amount", with: @income.amount fill_in "Description", with: @income.description check "Included" if @income.included - fill_in "Member", with: @income.member_id + select @income.member.name, from: "Member" click_on "Create Income" assert_text "Income was successfully created" @@ -31,7 +31,7 @@ class IncomesTest < ApplicationSystemTestCase fill_in "Amount", with: @income.amount fill_in "Description", with: @income.description check "Included" if @income.included - fill_in "Member", with: @income.member_id + select @income.member.name, from: "Member" click_on "Update Income" assert_text "Income was successfully updated" -- 2.45.2