Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply for pets #2 #3

Merged
merged 7 commits into from
Jul 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update user stories
  • Loading branch information
chsweet committed Jul 18, 2021
commit 31853a5d25e732d8d51683597f7cd4eb926fa3a1
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ During your Check In, you should be prepared to review your database schema for

## Evaluation

Before your evaluation, choose 2 user stories to present in a small group. Try to pick user stories that you think will deliever the highest value in terms of feedback from the instructor and peers.
Before your evaluation, choose 2 user stories to present in a small group. Try to pick user stories that you think will deliever the highest value in terms of feedback from the instructor and peers.

During the evaluation, you will present your user story:

Expand All @@ -45,7 +45,7 @@ During the evaluation, you will present your user story:
## Deploy

```
[ ] done
[X] done

Deploy your application to Heroku

Expand All @@ -63,8 +63,8 @@ Use these guides: https://devcenter.heroku.com/articles/getting-started-with-rai
Visitors to the site will be able to create applications to adopt pets. An application has many pets. Pets can have many applications.

```
[ ] done

[X] done
User Story 3
Application Show Page

As a visitor
Expand All @@ -78,10 +78,10 @@ Then I can see the following:
```

```
[ ] done
[X] done

Starting an Application

User Story 4
As a visitor
When I visit the pet index page
Then I see a link to "Start an Application"
Expand All @@ -100,8 +100,8 @@ And I see an indicator that this application is "In Progress"
```

```
[ ] done

[X] done
User Story 5
Starting an Application, Form not Completed

As a visitor
Expand All @@ -113,8 +113,8 @@ And I see a message that I must fill in those fields.
```

```
[ ] done

[X] done
User Story 6
Searching for Pets for an Application

As a visitor
Expand All @@ -129,8 +129,8 @@ And under the search bar I see any Pet whose name matches my search
```

```
[ ] done

[X] done
User Story 7
Add a Pet to an Application

As a visitor
Expand All @@ -144,8 +144,8 @@ And I see the Pet I want to adopt listed on this application
```

```
[ ] done

[X] done
User Story 8
Submit an Application

As a visitor
Expand All @@ -162,8 +162,8 @@ And I do not see a section to add more pets to this application
```

```
[ ] done

[X] done
User Story 9
No Pets on an Application

As a visitor
Expand Down
14 changes: 11 additions & 3 deletions spec/features/applications/show_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@


@application_1 = Application.create!(name: 'Ashley', address: '1215 Perrine', city: 'Rawlins', state: 'WY', zip_code: 82301, description: 'I want a puppy', status: 'In Progress')
@application_2 = Application.create!(name: 'Sarah', address: '8734 Drive Dr', city: 'Denver', state: 'CO', zip_code: 80221, description: 'I love dogs!', status: 'In Progress')


PetApplication.create!(pet: @pet_2, application: @application_1)
PetApplication.create!(pet: @pet_3, application: @application_1)
Expand All @@ -28,21 +30,21 @@
find_link("#{@pet_3.name}")
expect(page).to have_content("Application Status: #{@application_1.status}")
end

#User story 3
it 'had link to pet show page from pet name' do
visit "/applications/#{@application_1.id}"

click_link "Lobster"

expect(current_path).to eq("/pets/#{@pet_2.id}")
end

#User story 6
it 'has a text box to filter results by keyword' do
visit "/applications/#{@application_1.id}"

expect(page).to have_button("Search")
end

#User story 6
it 'lists partial matches of search results' do
visit "/applications/#{@application_1.id}"

Expand All @@ -52,4 +54,10 @@
expect(current_path).to eq("/applications/#{@application_1.id}")
expect(@pet_1.name).to appear_before(@pet_3.name)
end
#User story 9
it 'does not display "Submit Application" button when no pets are on the application' do
visit "/applications/#{@application_2.id}"

expect(page).to_not have_button("Submit Application")
end
end