From c7872bfa02e34eec0aec23267e180bf004d39d1e Mon Sep 17 00:00:00 2001 From: Lutz Helm Date: Thu, 15 Aug 2024 16:06:08 +0200 Subject: [PATCH 1/2] Include OpenSeadragon v5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d135a17d7..6198ff930 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "lodash": "^4.17.11", "manifesto.js": "^4.2.0", "normalize-url": "^4.5.0", - "openseadragon": "^2.4.2 || ^3.0.0 || 4.0.x || ^4.1.1", + "openseadragon": "^2.4.2 || ^3.0.0 || 4.0.x || ^4.1.1 || ^5.0.0", "prop-types": "^15.6.2", "rdndmb-html5-to-touch": "^8.0.0", "re-reselect": "^5.0.0", From 9091f04d8b4a8938c3801e5ba6b39e343c5db5ff Mon Sep 17 00:00:00 2001 From: Chris Beer Date: Wed, 30 Oct 2024 09:13:21 -0700 Subject: [PATCH 2/2] Update test stubbing to work with OSD 5.x --- __tests__/src/components/OpenSeadragonViewer.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/src/components/OpenSeadragonViewer.test.js b/__tests__/src/components/OpenSeadragonViewer.test.js index 464c1d4aa..b6f08fdda 100644 --- a/__tests__/src/components/OpenSeadragonViewer.test.js +++ b/__tests__/src/components/OpenSeadragonViewer.test.js @@ -172,9 +172,9 @@ describe('OpenSeadragonViewer', () => { }); it('calls addNonTileSource for every nonTiledImage and then zoomsToWorld', async () => { - const { component, rerender, viewer } = createWrapper({ nonTiledImages: [] }); + const { component, rerender, viewer } = createWrapper({ infoResponses: [], nonTiledImages: [] }); - const mockAddNonTiledImage = jest.spyOn(viewer, 'addSimpleImage'); + const mockAddNonTiledImage = jest.spyOn(viewer, 'addSimpleImage').mockImplementation(() => true); const mockFitBounds = jest.spyOn(viewer.viewport, 'fitBounds'); rerender(cloneElement(component, {