- Paste content into VisualEditor
- It's annotated with ImportedDataAnnotation
- Paste different content on top of some of that existing content
- It's annotated with ImportedDataAnnotation again, with the prior annotation preserved via getBeforePasteAnnotationSet
Content can't have been imported from more than one source, so this shouldn't happen.
QA
- Copy content from a source that will trigger paste check (50+ characters, from a site we can't identify as a known editing platform)
- Paste it into visualeditor when paste check is enabled (ecenable=2)
- Observe that a paste check is shown
- Select the entire pasted content and paste the content again
- Observe that still only one paste check is shown. If multiples appear, this bug is not fixed.
(Pasting over the entire original content is important for testing, as you could wind up with multiple legitimate paste checks if you leave enough of the original, and it's difficult to distinguish this unless you've got debug=true and actually look at the data model.)