Skip to content

Commit

Permalink
Cucumber Wording Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PratyushSharma14 committed Apr 2, 2024
1 parent 15788b6 commit 85faa63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions features/donations/quick_donation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion features/support/paths.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 85faa63

Please sign in to comment.