Refactor TextEditorTest to wait until text editor is opened. Fixes: # 877
Ensure that delete shell is focused. Fixes #878