Skip to content

Commit

Permalink
feat(ebc): add ebc-tag
Browse files Browse the repository at this point in the history
  • Loading branch information
luhmann committed Mar 18, 2018
1 parent c28ed8a commit 9d36332
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cypress/integration/home/search_beers_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ describe('Searching for beers', () => {
.first()
.find(sel('beer-card-tags'))
.should('contain', 'ABV 6.1%')
.and('contain', 'IBU 45');
.and('contain', 'IBU 45')
.and('contain', 'EBC 219');

cy
.get(sel('beer-card'))
Expand Down
1 change: 1 addition & 0 deletions src/Api.re
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ let mapBeerResponse = beerResponse : list(Beer.brew) =>
description: beer##description,
abv: beer##abv,
ibu: beer##ibu,
ebc: beer##ebc,
image: beer##image_url,
foodPairing: beer##food_pairing
};
Expand Down
3 changes: 3 additions & 0 deletions src/Beer.re
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ let make =
<Tag>
...(ReasonReact.stringToElement("IBU " ++ string_of_int(ibu)))
</Tag>
<Tag>
...(ReasonReact.stringToElement("EBC " ++ string_of_int(ebc)))
</Tag>
</div>
<h3 className="mb-1">
(ReasonReact.stringToElement("Food Pairings"))
Expand Down
3 changes: 2 additions & 1 deletion src/BeerListContainer.re
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ let component = ReasonReact.statelessComponent("BeerListContainer");
let renderBeers = beers =>
beers
|> List.map(beer => {
let {id, name, tagline, description, ibu, abv, image, foodPairing}: Beer.brew = beer;
let {id, name, tagline, description, ibu, abv, ebc, image, foodPairing}: Beer.brew = beer;
<Beer
key=(string_of_int(id))
name
tagline
description
ibu
abv
ebc
image
foodPairing
/>;
Expand Down

0 comments on commit 9d36332

Please sign in to comment.