Content
View differences
Updated by Judith Roth 4 months ago
The goal is to define a way of testing BlockNote and Hocuspocus functionality from a unit/integration test perspective.
Currently we face challenges with Hocuspocus, as we don't have it available for rails/capybara. P~~lus, we have a challenge with BlockNote now that it is running in a Shadow root. Capybara cannot traverse the **shadow borders** it seems.~~
So, for this ticket, the plan is:
* Figure out a way of setting up Hocuspocus on the test setup
* ~~Find a way to reliably test BlockNote inside the shadow dom~~ => <mention class="mention" data-id="70541" data-type="work_package" data-text="##70541">##70541</mention>
* Include unit tests to guarantee the base functionality of Hocuspocus and BlockNote
* ~~Review tests marked as pending -~~ [~~https://github.com/opf/openproject/blob/dev/modules/documents/spec/features/attachment\_upload\_spec.rb~~](https://github.com/opf/openproject/blob/dev/modules/documents/spec/features/attachment_upload_spec.rb) => <mention class="mention" data-id="70541" data-type="work_package" data-text="##70541">##70541</mention>
\---
**Goals**
* [ ] ~~Test that the editor is showing up in the list of connected people~~
\=> * There already is a test for that and it works without Hocuspocus
* [x] Test that changes in the document end up in the database when we go though Hocuspocus
hocuspocus
* [ ] Test that on readonly changes do not end up in the database
* [ ] Test token exchange
* [ ] Test what happens on connection loss (show meaningful error message to user)
* [ ] Test what happens on connection recovery (show editor again)
* <br>
**Out of scope**
* Test multiple editors working on the same document at once - this would need mutliple sessions of selenium at once
Currently we face challenges with Hocuspocus, as we don't have it available for rails/capybara. P~~lus, we have a challenge with BlockNote now that it is running in a Shadow root. Capybara cannot traverse the **shadow borders** it seems.~~
So, for this ticket, the plan is:
* Figure out a way of setting up Hocuspocus on the test setup
* ~~Find a way to reliably test BlockNote inside the shadow dom~~ => <mention class="mention" data-id="70541" data-type="work_package" data-text="##70541">##70541</mention>
* Include unit tests to guarantee the base functionality of Hocuspocus and BlockNote
* ~~Review tests marked as pending -~~ [~~https://github.com/opf/openproject/blob/dev/modules/documents/spec/features/attachment\_upload\_spec.rb~~](https://github.com/opf/openproject/blob/dev/modules/documents/spec/features/attachment_upload_spec.rb) => <mention class="mention" data-id="70541" data-type="work_package" data-text="##70541">##70541</mention>
\---
**Goals**
* [ ] ~~Test that the editor is showing up in the list of connected people~~
\=>
**Out of scope**
* Test multiple editors working on the same document at once - this would need mutliple sessions of selenium at once