stable

Clone or download

Read-only

CKeditor raises error in console in some cases

This is part of story #22226 edit test execution comments Note to reviewer: I don't know what is the problem. I just understand that error is raised when the CKeditor wants to create a snapshot on `setData("")` method. I don't know if it's a good fix (I think not), but I haven't any other one for the moment. I don't know why the error's raised, if its a bad implementation of CKEditor or not. You can find some information about method [setData]. Ckeditor does not give a definition of a snapshot, but after some researches, I understand that is like a "cache" in the editor. So, with the option `noSnapshot`, the editor will be updated, but its cache will not. It's not really a problem because the ckeditor and `execution.results` are linked by a an event (execution-service.js line 412). And at each times that `clearEditor` is called, `execution.results` is already empty. Anyway, you can find more information about snapshot with the method [getSnapshot]. The problem appears in 2 cases: 1) Have a test with a comment 2) With realtime 1) How to test: - Have a test with a comment - Refresh the page with "CTRL+MAJ+R" (not necessary but the cache is clean) - Click on [edit comment] - Clear the editor - Click on [Not Run] button => There is no error in the console 2) How to test: - Have Bob and Alice on the same test in 2 browsers - The test has no comment and status is "Not Run" - Alice add a comment and click on [Failed] button => The comment is loaded on Bob browser - Bob clicks on [Edit Comment] - Bob clears the test and click on [Not Run] button => There is no error in the console Anyway, I tried a lot of tests to be sure that the realtime still works, and comment editing too. Please, do the same. We can not set up some tests with Jest or Cypress, the only way to test it is manually. [setData] https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData [getSnapshot] https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSnapshot Change-Id: I345b1263a4df49d77c2d45e5dd9ea7df2b5aa5d4

Modified Files

Name
M plugins/testmanagement/scripts/testmanagement/src/execution-collection/execution-service.js +1 −1 Go to diff View file