ni / nimble

The NI Nimble Design System
https://nimble.ni.dev
MIT License
29 stars 9 forks source link

RichTextEditorMentionListbox test intermittent with error No selection range exists #2219

Open rajsite opened 5 days ago

rajsite commented 5 days ago

🐛 Bug Report

The test RichTextEditorMentionListbox Dynamically update mention popup items based on configuration changes should show mention popup for multiple mention configuration elements FAILED is intermittent and fails with the error message:

InvalidStateError: Selection.collapseToEnd: No selection range exists thrown

💻 Repro or Code Sample

See build https://github.com/ni/nimble/actions/runs/9686770115/job/26729936486#step:17:411

💁 Possible Solution

Seems like it may be related to a similar sounding error from https://github.com/ni/nimble/pull/2200

rajsite commented 5 days ago

@vivinkrishna-ni could you create a corresponding AzDo issue to track this intermittent test failure? It seems like it may be similar to the type of failure covered in https://github.com/ni/nimble/pull/2200.

vivinkrishna-ni commented 5 days ago

Created an AzDo bug: Bug 2787273: Intermittent failures in Rich Text Editor for Mention support

Last time (in https://github.com/ni/nimble/pull/2200), it was evident that the editor was not focused at the time of committing the mention node and was failing in local with some conditions. This time, it is a rare occurrence where I ran tests in a loop for about a thousand times, ran the test with the test than ran before in the failed pipeline, and set a breakpoint at the line where the error was thrown in Tiptap. However, I still couldn't reproduce the same failure.