You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you execute a test, the test tree always scrolls to the currently executed test, which is great. But when the test turns from green to red, the test jumps to the top, but the test tree doesn't scroll to the top. Only after executing the test again, it scrolls to the top.
This might be that we call reveal() on the node before the tree is properly updated (re-sorted for statuses). Delaying the reveal until after the data is updated (or at least with a small delay/setImmediate) might fix it.
@HerrNiklasRaab actually, I'm struggling to repro this. I had a very long list of green tests in the second suite, an I caused on to fail. This moves the suite to the top of the list, but it also scrolled the tree up so that the newly-failed test (though not the suite - as that was still scrolled off the top) was still visible.
Can you still repro this? Can you capture a recording, or give more detailed that might help me reproduce it? Thanks!
This seems to be a race because the tree update is async (we tell VS Code it's changed, then it asks us for the new data on its own schedule) and we were revealing the tree node immediately. I can't find a great way to handle this, but adding a 100ms delay before trying to reveal the node seems to be reliable in my testing. If it turns out to be intermittent, I'll see if I can come up with something better.
Activity
DanTup commentedon Oct 23, 2020
This might be that we call
reveal()on the node before the tree is properly updated (re-sorted for statuses). Delaying the reveal until after the data is updated (or at least with a small delay/setImmediate) might fix it.DanTup commentedon Oct 23, 2020
@HerrNiklasRaab actually, I'm struggling to repro this. I had a very long list of green tests in the second suite, an I caused on to fail. This moves the suite to the top of the list, but it also scrolled the tree up so that the newly-failed test (though not the suite - as that was still scrolled off the top) was still visible.
Can you still repro this? Can you capture a recording, or give more detailed that might help me reproduce it? Thanks!
HerrNiklasRaab commentedon Oct 23, 2020
https://imgur.com/a/SZ4Nzlb
DanTup commentedon Oct 26, 2020
Thanks! I think I can repro. Doesn't seem to happen the test is very fast, but does if I add a delay.
DanTup commentedon Oct 26, 2020
This seems to be a race because the tree update is async (we tell VS Code it's changed, then it asks us for the new data on its own schedule) and we were revealing the tree node immediately. I can't find a great way to handle this, but adding a 100ms delay before trying to reveal the node seems to be reliable in my testing. If it turns out to be intermittent, I'll see if I can come up with something better.