diff --git a/src/themes/elife/eLifeDataProvider.ts b/src/themes/elife/eLifeDataProvider.ts index d1ddf4dc5..3f4eff11b 100644 --- a/src/themes/elife/eLifeDataProvider.ts +++ b/src/themes/elife/eLifeDataProvider.ts @@ -1,6 +1,6 @@ interface Response { ok: boolean - articleData: { pdf: string } + articleData: { pdf: string; figuresPdf: string } } export default { diff --git a/src/themes/elife/test/eifeDataProvider.test.ts b/src/themes/elife/test/eifeDataProvider.test.ts index 22477f6d5..83198114b 100644 --- a/src/themes/elife/test/eifeDataProvider.test.ts +++ b/src/themes/elife/test/eifeDataProvider.test.ts @@ -27,7 +27,20 @@ describe('eLife Data Provider ', () => { }) }) - test.todo('it exposes the URI of the figures PDF') + it('it exposes the URI of the figures PDF', async () => { + const fetchMock = (): Promise => + Promise.resolve({ + ok: true, + json: () => + Promise.resolve({ + figuresPdf: 'path-to-the-figures.pdf' + }) + }) + await expect(dataProvider.query('someId', fetchMock)).resolves.toEqual({ + articleData: { figuresPdf: 'path-to-the-figures.pdf' }, + ok: true + }) + }) }) describe('being given an invalid article id', () => {