From 85faa638831662fd2a5fc1a11f4b442f8d76402a Mon Sep 17 00:00:00 2001 From: Pratyush Sharma Date: Mon, 1 Apr 2024 22:01:54 -0700 Subject: [PATCH] Cucumber Wording Fix --- features/donations/quick_donation.feature | 10 +++------- features/support/paths.rb | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/features/donations/quick_donation.feature b/features/donations/quick_donation.feature index d9955053f..036ec406b 100644 --- a/features/donations/quick_donation.feature +++ b/features/donations/quick_donation.feature @@ -9,11 +9,11 @@ Background: Given the following account codes exist: | name | code | description | donation_prompt | | Soda Fund | 0504 | The Soda Funds aims to put a Soda Fountain in Soda Hall | | + And I am logged in as customer "Tom Foolery" Scenario: donor logged in, page gets prepopulated with donor info Given a donation of $10 on 2009-12-01 from "Tom Foolery" to the "General Fund" - And I am logged in as customer "Tom Foolery" When I go to the quick donation page When I fill in "Donation amount" with "15" @@ -98,26 +98,22 @@ Scenario: admin logged in, records donation on behalf of patron And an email should be sent to customer "Joe Mallon" containing "$ 9.00 Donation to General Fund" Scenario: landing on quick donation page with valid account code - Given I am logged in as customer "Tom Foolery" When I visit the quick donation landing page for account code 0504 Then I should not see "Donate to" And I should see "Soda Fund" And I should see "The Soda Funds aims to put a Soda Fountain in Soda Hall Address" Scenario: landing on quick donation page with invalid account code - Given I am logged in as customer "Tom Foolery" When I visit the quick donation landing page for account code 0505 Then I should see "Invalid Fund ID" Scenario: landing on quick donation page with no account code - Given I am logged in as customer "Tom Foolery" When I go to the quick donation page Then I should not see "Donate to" - Then I should see "General Fund" - Then I should see "General Fund Address" + And I should see "General Fund" + And I should see "General Fund Address" Scenario: landing on quick donation page with valid account code and making quick donation - Given I am logged in as customer "Tom Foolery" When I go to the quick donation page When I fill in "Donation amount" with "15" And I press "Charge Donation to Credit Card" diff --git a/features/support/paths.rb b/features/support/paths.rb index 1921e2478..eb38f47ff 100644 --- a/features/support/paths.rb +++ b/features/support/paths.rb @@ -79,7 +79,7 @@ def path_to(page_name) when /the donation landing page coded for fund (.*)/i then donate_to_fund_path(AccountCode.find_by_code!($1)) when /the donation landing page coded for a nonexistent fund/i then donate_to_fund_path('999999') - when /the quick donation landing page for account code (.*)/i then '/donate/1?account_code_string=' + $1.to_s + when /the quick donation landing page for account code (.*)/i then '/donate/' + $1.to_s + '?account_code_string=' + $1.to_s when /the edit page for the "(.*)" vouchertype/ then edit_vouchertype_path(Vouchertype.find_by_name!($1))