From 2bd532eb9ab6601d0303d5ddf72a52243999b7fa Mon Sep 17 00:00:00 2001 From: mikiher Date: Mon, 29 Apr 2024 11:16:49 +0300 Subject: [PATCH] Put book_placholder.jpg in browser cache --- client/components/cards/LazySeriesCard.cy.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/components/cards/LazySeriesCard.cy.js b/client/components/cards/LazySeriesCard.cy.js index 179ba6c8..2fb51e7c 100644 --- a/client/components/cards/LazySeriesCard.cy.js +++ b/client/components/cards/LazySeriesCard.cy.js @@ -39,7 +39,7 @@ describe('LazySeriesCard', () => { 'user/getUserCanUpdate': true, 'user/getUserMediaProgress': (id) => null, 'libraries/getLibraryProvider': () => 'audible.us', - 'globals/getLibraryItemCoverSrc': () => '/book_placeholder.jpg' + 'globals/getLibraryItemCoverSrc': () => 'https://my.server.com/book_placeholder.jpg' }, state: { libraries: { @@ -53,7 +53,10 @@ describe('LazySeriesCard', () => { } before(() => { - cy.intercept('GET', '/book_placeholder.jpg', { fixture: 'images/book_placeholder.jpg' }) + cy.intercept('GET', 'https://my.server.com/book_placeholder.jpg', { fixture: 'images/book_placeholder.jpg' }).as('bookCover') + cy.mount(LazySeriesCard, { propsData, stubs, mocks }) + cy.wait('@bookCover') + // Now the placeholder image is in the browser cache }) it('renders the component', () => {