Skip to content

Commit

Permalink
Get book placeholder image from fixture rather than from server
Browse files Browse the repository at this point in the history
  • Loading branch information
mikiher committed Apr 19, 2024
1 parent 129da51 commit 0498d8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/components/cards/LazySeriesCard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("LazySeriesCard", () => {
"user/getUserCanUpdate": true,
"user/getUserMediaProgress": (id) => null,
"libraries/getLibraryProvider": () => "audible.us",
"globals/getLibraryItemCoverSrc": () => "http://localhost:3333//book_placeholder.jpg"
"globals/getLibraryItemCoverSrc": () => "/book_placeholder.jpg"
},
state: {
libraries: {
Expand All @@ -52,6 +52,10 @@ describe("LazySeriesCard", () => {
}
}

before(() => {
cy.intercept("GET", "/book_placeholder.jpg", { fixture: "images/book_placeholder.jpg" })
})

it("renders the component", () => {
cy.mount(LazySeriesCard, { propsData, stubs, mocks })

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0498d8c

Please sign in to comment.