Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion e2e/charts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down