Owner can view offer#13
Open
boamatule wants to merge 19 commits into
Open
Conversation
adds step_definitions.
…missing step definitions to basic_steps, assertion_steps and object_creation_steps.
…sociation and factory bot for Offer. 2/9 tests green
…r already created listing. Adds step definition for finding 'Show listing' link within the right section, in basic_steps. 5/12 steps green
6/12 tests passing.
11/12 tests passing.
adds features test for the intervals. Test failing...
…how page for listing. Adds corresponding information in the show view. 16/16 steps green
…tes for Offer model. Adds unit test for validating FactoryBot. Adds validation in Offer model for presence of all attributes, meaning name, email, location, price. All unit tests green
…d show message for the owner. Adds if statement and message in show.haml for listing. 24/24 tests green
tochman
reviewed
May 10, 2019
| %h2 Offers | ||
| - if @listing.offers.any? | ||
| - @listing.offers.each do |offer| | ||
| .offer{id: dom_id(offer)} |
Member
There was a problem hiding this comment.
Are the elements below supposed to be within the `.offer? div? Check the indentation
Contributor
There was a problem hiding this comment.
Yes, they are supposed to be nested - and with current indentation they are not.. Changing the indentation now.
| %p= offer.email | ||
| %p= offer.location | ||
| %p #{offer.price} kr | ||
| %button= link_to "Accept offer", "#" |
Member
There was a problem hiding this comment.
You can't have a link in a button. Hängslen & livrem? 🤪
Contributor
There was a problem hiding this comment.
Ah yes :) Changed this to only be a link, to also be more consistent with index page and other links.
| | Felix | felix@craft.se | Gothenburg | 100 | Leif | | ||
| And I visit the landing page | ||
| And I should see "Leif" | ||
| And I should see "Show listing" within "Leif" section |
Member
There was a problem hiding this comment.
Please stop adding assertions to your background steps
… on a listing. Changes show.haml for listing to show correct information if no offers exists. Changed indentation for show page paragraphs to be correctly nested inside offers div. Tests 25/25 green
…nd listing_spec.rb. All unit tests green
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PT Story
Changes proposed in this PR:
What I have learned working on this feature: