Park BlockNoteEditorBrowserActions next to BlockNoteEditorInput in
spec/support/form_fields/primerized/. spec/support/**/*.rb is autoloaded
by rails_helper, so the spec file just `include`s the qualified module
name. Keeps raw-driver concerns (DOM Range selection, paste
ClipboardEvent dispatch, W3C-action Delete) out of the high-level page
object — that one stays focused on semantic actions like paste_links
and attach_file — and avoids the test-file fatigue of a 50-line helper
module inside the describe scope.
In 0.0.24 a callback was added that removes the whole search input from
the DOM / document when a blur event (e.g. clicking anywhere else)
occurs. This broke the capybara tests, since they somehow triggered that
blur and then the whole input was removed from the DOM before the tests
were finished testing it.
Therefore now all interaction of with the work package search input is
done via js whithout any interruptions that cause a blur event.
I am not happy about this solution and asked to relax that blur
requirement to e.g. only remove the search when the document / browser
tab is closed, but this was refused. So this is the only solution to
keep the tests in at all.
https://community.openproject.org/wp/69706
Narrow closest('a') result with instanceof HTMLAnchorElement for
type safety. Skip non-web protocols (mailto:, tel:, etc.) in
isExternalLinkCandidate to match body-level controller behavior.
Pass element reference to paste_links JS instead of global querySelector.
ProseMirror's internal DOMObserver re-parses and re-renders any node
whose attributes change, creating infinite loops when the body-level
ExternalLinksController writes target, rel, aria-describedby, or
rewrites href on links inside the editor.
Instead of modifying the DOM, a standalone ProseMirrorExternalLinksController
intercepts clicks on external links and routes them through
/external_redirect via window.open. The document model retains original
URLs, Yjs collaboration is unaffected, and no re-render loops occur.
TipTap's Link extension already renders target="_blank" and
rel="noopener noreferrer nofollow" from its mark schema defaults,
so those attributes are handled natively by ProseMirror.
Shared link utilities (isLinkExternal, shouldProcessLink,
buildRedirectUrl) are extracted into link-handling helpers so both
controllers use a single source of truth without inheritance coupling.
https://community.openproject.org/work_packages/70541
With capybara, you can not select elements within the shadow dom
directly. You always have to:
1. Select the element that hosts the shadow dom
2. Call `shadow_root` on this element
3. Select from there
Unfortunately, capybara's `within` does not work with the shadow dom,
so you have to do this every time.
Also, this only works with selenium, not with cuprite. Cuprite does
not yet support the shadow dom enough.
spec is spec/features/projects/project_custom_fields/overview_page/dialog/inputs_spec.rb:702
run is https://github.com/opf/openproject/actions/runs/19700308113/job/56434713171?pr=21163
When opening the options of the dropdown, the field is clicked. If unlucky, it can click on the "X" of an option already selected and remove it. When this happens, it does not open the dropdown (this explains why the previous run was flaky).
The default implementation in both Cuprite and Selenium is to click in
the middle of the element. I don't understand why we can't reproduce it
though.
Fix is to click the arrow directly.
spec is spec/features/projects/project_custom_fields/overview_page/dialog/inputs_spec.rb:702
run is https://github.com/opf/openproject/actions/runs/19696080834/job/56421276049?pr=21163
Not entirely sure what's going on, but on the screenshot the field looks
active, so it's clicked, but for some reason the options are not
visible.
Try to work around the issue by waiting for the options to be visible,
and click the input again if not. Check every 0.25 seconds and try for 3
seconds before giving up.
[#67403] Blocknote: upload attachments
# Ticket
https://community.openproject.org/wp/67403
# What are you trying to accomplish?
Allow to upload files as attachments to documents in blocknote, the new editor for documents.
spec is ./modules/reporting/spec/features/update_entries_spec.rb:72
job run is https://github.com/opf/openproject/actions/runs/14646323170/job/41135997810
It was failing when submitting the time logging modal before the work
package was loaded. As it was not loaded, it was empty, and as it was
empty, it was displaying an error "Work package is invalid" and the time
was not updated.
As the time was not updated, the spec was failing looking for "2.00
hours" (the new value) but only getting "5.00 hours" (the old value).
Fix is to wait for the autocompleter to be fully loaded before
proceeding with submit. This is done by waiting for `ng-spinner-loader`
to not be visible anymore.