diff --git a/__tests__/integration/mirador/annotations.test.js b/__tests__/integration/mirador/annotations.test.js index eb45ad3415032a8a2152fc2617daa106985d9c25..f8135a6fbd4be53d23fc12ccfd731b29066135a2 100644 --- a/__tests__/integration/mirador/annotations.test.js +++ b/__tests__/integration/mirador/annotations.test.js @@ -3,7 +3,7 @@ describe('Annotations in Mirador', () => { beforeAll(async () => { await page.goto('http://127.0.0.1:4488/__tests__/integration/mirador/'); - await expect(page).toMatchElement('.mirador-window', { polling: 'mutation', timeout: 5000 }); + await expect(page).toMatchElement('.mirador-window[aria-label="Window: Self-Portrait Dedicated to Paul Gauguin"]', { polling: 'mutation', timeout: 5000 }); }); it('stores annotations in state by canvasId', async () => { const annotations = await page.evaluate(() => ( @@ -25,7 +25,7 @@ describe('Annotations in Mirador', () => { await expect(page).toClick(`#${windowId} button[aria-label="Annotations"]`); await expect(page).toMatchElement(`#${windowId} h3`, { text: 'Annotations' }); - await expect(page).toMatchElement(`#${windowId} p`, { text: 'Showing 5 annotations' }); + await expect(page).toMatchElement(`#${windowId} p`, { polling: 'mutation', text: 'Showing 5 annotations', timeout: 2000 }); await expect(page).toMatchElement(`#${windowId} .mirador-companion-window-left.mirador-window-sidebar-annotation-panel ul li`, { count: 2 }); }); });