Skip to content
Snippets Groups Projects
Commit 0b658ff8 authored by Jack Reed's avatar Jack Reed Committed by Chris Beer
Browse files

Make flaky annotation tests a little bit more resiliant on CI

parent a464aa8d
No related branches found
No related tags found
No related merge requests found
......@@ -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 });
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment