fix and refactor SnippetDeleteView and add a test