fix(context-actions): fix off by one context actions#124
Conversation
|
@cameronr When you have a chance, can you do a quick check/review on this. I was not seeing the context action on restore points anymore and I investigated. This is my attempt at fixing it. |
There was 2 off by one errors when adding contextual actions When adding them in snapshots When refreshing them after a part update A couple of test needed to be regenerated for it to work I added the possibility to regenerate a test snapshot by it's name or file-name
11a5015 to
1c136a0
Compare
|
Ah, I see the issue. When I added the extra newline at the end, I didn't account for that for actions. I didn't catch it with the replay tests because they needed to be regenerated for the newline so I missed that the actions were off after that change. I think there's also some inconsistency on whether actions should be 0 indexed or 1 indexed. according to If that all sounds good, I'll fix the root issue and clean up the indexing to be consistent. Also, the replay tool has a |
|
Sure If you want to fix the root cause I'm all for it. It was confusing indeed, and the -1 indexing is also confusing thanks for your help |
Caused by the double newline we keep at the end. Also, standardize on api-indexing (0 based line numbers) for actions.
Was still fighting with the automatic session fetching / rendering. I think it makes sense to just disable that because we want to control the renderer at a lower level.
|
Was finally able to push my changes after GH resolved it's issue. The main changes are here, with the underlying fix being in |
|
I guess I spoke too soon, the tests failed because GH is still having issues. I'll rerun the tests |
|
Thanks for the fixes :) |
There was 2 off by one errors when adding contextual actions
When adding them in snapshots
When refreshing them after a part update
A couple of test needed to be regenerated for it to work
I added the possibility to regenerate a test snapshot by it's name or file-name