Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest testing not possible with CommentsRepository premium plugin #17421

Open
stefanseeger opened this issue Nov 7, 2024 · 0 comments · May be fixed by #17420
Open

Jest testing not possible with CommentsRepository premium plugin #17421

stefanseeger opened this issue Nov 7, 2024 · 0 comments · May be fixed by #17420
Labels
type:docs This issue reports a task related to documentation (e.g. an idea for a guide).

Comments

@stefanseeger
Copy link
Contributor

📝 Provide a description of requested docs changes

The jest related docs for angular, react and vue are not working when the premium plugin CommentsRepository is used

Error message

FrontEnd\node_modules\@ckeditor\ckeditor5-collaboration-core\dist\index.js:392
    const _0x27ffc6 = _0x20b54e['getClientRects']()['item'](0x0);
                                                           ^

TypeError: _0x20b54e.getClientRects(...).item is not a function
    at R (FrontEnd\node_modules\@ckeditor\ckeditor5-collaboration-core\dist\index.js:392:60)
    at r._getTargetForId (FrontEnd\node_modules\@ckeditor\ckeditor5-comments\dist\index.js:22:176593)     
    at d._target (FrontEnd\node_modules\@ckeditor\ckeditor5-comments\dist\index.js:22:178362)
    at d._getNormalizedTarget (FrontEnd\node_modules\@ckeditor\ckeditor5-comments\dist\index.js:22:54176) 
    at new d (FrontEnd\node_modules\@ckeditor\ckeditor5-comments\dist\index.js:22:52317)
    at o._attachCommentThread (FrontEnd\node_modules\@ckeditor\ckeditor5-comments\dist\index.js:22:137698)
    at ie.attachTo (FrontEnd\node_modules\@ckeditor\ckeditor5-comments\dist\index.js:22:154306)
    at FrontEnd\node_modules\@ckeditor\ckeditor5-comments\dist\index.js:22:178334
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Fix

Additional mocking for Element.prototype.getClientRects is needed

@stefanseeger stefanseeger added the type:docs This issue reports a task related to documentation (e.g. an idea for a guide). label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:docs This issue reports a task related to documentation (e.g. an idea for a guide).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant