|
20 | 20 | expect(page.find(:xpath, "//table/tbody/tr[1]/td[1]")).to have_content(@first.name) |
21 | 21 | expect(page.find(:xpath, "//table/tbody/tr[3]/td[1]")).to have_content(@third.name) |
22 | 22 | end |
23 | | - |
24 | | - it "allows the user to quick-create a new donation site only with required fields" do |
25 | | - visit subject |
26 | | - donation_site_name = "A Unique Donation Site Name" |
27 | | - donation_site_address = "1500 Remount Road, Front Royal, VA 22630" |
28 | | - |
29 | | - fill_in "donation_site_name", with: donation_site_name |
30 | | - fill_in "donation_site_address", with: donation_site_address |
31 | | - click_button "Create" |
32 | | - expect(page.find("tbody tr")).to have_content(donation_site_name) |
33 | | - expect(page.find("tbody tr")).to have_content(donation_site_address) |
34 | | - end |
35 | | - |
36 | | - it "allows the user to quick-create a new donation site with all fields including optional ones" do |
37 | | - visit subject |
38 | | - donation_site_name = "A Unique Donation Site Name" |
39 | | - donation_site_address = "1500 Remount Road, Front Royal, VA 22630" |
40 | | - donation_site_contact_name = "John Doe" |
41 | | - donation_site_phone = "123-456-7890" |
42 | | - donation_site_email = "[email protected]" |
43 | | - |
44 | | - fill_in "donation_site_name", with: donation_site_name |
45 | | - fill_in "donation_site_address", with: donation_site_address |
46 | | - fill_in "donation_site_contact_name", with: donation_site_contact_name |
47 | | - fill_in "donation_site_phone", with: donation_site_phone |
48 | | - fill_in "donation_site_email", with: donation_site_email |
49 | | - click_button "Create" |
50 | | - expect(page.find("tbody tr")).to have_content(donation_site_name) |
51 | | - expect(page.find("tbody tr")).to have_content(donation_site_address) |
52 | | - expect(page.find("tbody tr")).to have_content(donation_site_contact_name) |
53 | | - expect(page.find("tbody tr")).to have_content(donation_site_phone) |
54 | | - expect(page.find("tbody tr")).to have_content(donation_site_email) |
55 | | - end |
56 | 23 | end |
57 | 24 |
|
58 | 25 | context "When creating a new donation site" do |
|
0 commit comments