diff --git a/e2e/charts.spec.ts b/e2e/charts.spec.ts index 31967c6..897e3d3 100644 --- a/e2e/charts.spec.ts +++ b/e2e/charts.spec.ts @@ -52,7 +52,8 @@ describe('charts drawn in the views', () => { test('a chart in a Word document is a picture in its line', async () => { const v = await viewer({ src: 'samples/sample.docx' }) await v.chooseFile(() => v.menu('Open…'), { name: 'chart.docx', mimeType: DOCX, buffer: await chartDocx() }) - const img = v.page.locator('.de-page-inner img[src^="blob:"]').first() + // the chart's picture, not the sample's (324 pt wide) still shown until chart.docx is read + const img = v.page.locator('.de-page-inner img[alt="Chart"][src^="blob:"]').first() await img.waitFor() await v.page.waitForFunction((el) => (el as HTMLImageElement).complete, await img.elementHandle()) expect(await img.evaluate(loaded)).toBe(true)