Extract finding the tab for an editor into a method

And adjust the test to use it
Search for tabs on the paneView instead of workspace
Merge branch 'refactor-preview-tabs-view'