discourse-ai/test/javascripts
Keegan George d6beac48f8
DEV: Improve explain suggestion footnote replacement (#999)
Previously, when clicking add footnote on an explain suggestion it would replace the selected word by finding the first occurrence of the word. This results in issues when there are more than one occurrences of a word in a post. This is not trivial to solve, so this PR instead prevents incorrect text replacements by only allowing the replacement if it's unique. We use the same logic here that we use to determine if something can be fast edited.

In this PR we also update tests for post helper explain suggestions. For a while, we haven't had tests here due to streaming/timing issues, we've been skipping our system specs. In this PR, we add acceptance tests to handle this which gives us improved ability to publish message bus updates in the testing environment so that it can be better tested without issues.
2024-12-04 11:41:34 -08:00
..
acceptance DEV: Improve explain suggestion footnote replacement (#999) 2024-12-04 11:41:34 -08:00
fixtures DEV: Improve explain suggestion footnote replacement (#999) 2024-12-04 11:41:34 -08:00
integration/components DEV: Make indicator wave a reusable component (#807) 2024-09-18 09:53:54 -07:00
unit DEV: Update linting (#933) 2024-11-20 15:43:28 +01:00
.gitkeep Initial commit 2023-02-17 11:33:47 -03:00