Added tests for the preview view bugfixes.