patch 8.2.1999: terminal popup test sometimes fails
Problem: Terminal popup test sometimes fails.
Solution: Wait for the popup to close.
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 846ec59..ee0e743 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -1249,8 +1249,8 @@
" must not have switched to another window
call assert_equal(winid, win_getid())
- call feedkeys("exit\<CR>", 'xt')
- sleep 50m
+ call StopShellInTerminal(termbuf)
+ call WaitFor({-> win_getid() != winid})
exe 'bwipe! ' .. newbuf
endfunc