Skip to content

Commit

Permalink
refactor: clear up image code, add e2e-test
Browse files Browse the repository at this point in the history
  • Loading branch information
luhmann committed Mar 18, 2018
1 parent 3ce2c7a commit 2a1eedf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cypress/integration/home/search_beers_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ describe('Searching for beers', () => {
});

it('should display complete and correct information on a beer', () => {
cy
.get(sel('beer-card'))
.first()
.find(sel('beer-card-img'));

cy
.get(sel('beer-card'))
.first()
Expand Down
2 changes: 1 addition & 1 deletion src/Beer.re
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let make =
| None => ReasonReact.nullElement
| Some(img_url) =>
<div
className="bg-contain bg-top bg-no-repeat h-48 sm:h-auto beerImg-width"
className="bg-contain bg-top bg-no-repeat h-48 sm:h-auto beerImg-width test-beer-card-img"
style=(
ReactDOMRe.Style.make(~backgroundImage={j|url($img_url)|j}, ())
)
Expand Down

0 comments on commit 2a1eedf

Please sign in to comment.