fix: render decoded ink coordinates
This commit is contained in:
@@ -70,6 +70,24 @@ const page: OneNotePageDto = {
|
||||
size: 12,
|
||||
layout: {},
|
||||
},
|
||||
{
|
||||
kind: 'ink',
|
||||
id: 'ink-1',
|
||||
strokes: [
|
||||
{
|
||||
points: [
|
||||
{ x: 10, y: 20 },
|
||||
{ x: 15, y: 25 },
|
||||
{ x: 30, y: 40 },
|
||||
],
|
||||
width: 2,
|
||||
color: 0xff0000,
|
||||
},
|
||||
],
|
||||
children: [],
|
||||
boundingBox: { x: 10, y: 20, width: 20, height: 20 },
|
||||
layout: {},
|
||||
},
|
||||
],
|
||||
diagnostics: [],
|
||||
};
|
||||
@@ -105,6 +123,13 @@ describe('PageReader structured content', () => {
|
||||
'https://example.com/'
|
||||
);
|
||||
expect(screen.getByRole('table')).toHaveTextContent('AB');
|
||||
expect(
|
||||
screen.getByRole('img', { name: '1 handwritten or drawn stroke' })
|
||||
).toHaveAttribute('viewBox', '-60 -50 160 160');
|
||||
expect(document.querySelector('.onenote-ink path')).toHaveAttribute(
|
||||
'd',
|
||||
'M 10 20 L 15 25 30 40'
|
||||
);
|
||||
await waitFor(() =>
|
||||
expect(
|
||||
screen.getByRole('img', { name: 'Embedded diagram' })
|
||||
|
||||
Reference in New Issue
Block a user