Get book placeholder image from fixture rather than from server

This commit is contained in:
mikiher 2024-04-19 09:49:19 +03:00
parent 129da51f76
commit 0498d8cb83
2 changed files with 5 additions and 1 deletions

View File

@ -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: {
@ -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 })

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB