Commit 1bf93ec5 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch '263408-improve-delete-snippet-test' into 'master'

Improve user_deletes_snippet_spec assertion

See merge request gitlab-org/gitlab!51020
parents c4de261c 6637894b
---
title: Improve delete snippet feature spec
merge_request: 51020
author: Lee Tickett @leetickett
type: other
...@@ -21,6 +21,8 @@ RSpec.describe 'Projects > Snippets > User deletes a snippet', :js do ...@@ -21,6 +21,8 @@ RSpec.describe 'Projects > Snippets > User deletes a snippet', :js do
click_button('Delete snippet') click_button('Delete snippet')
wait_for_requests wait_for_requests
expect(page).not_to have_content(snippet.title) # This assertion also confirms we did not end up on an error page
expect(page).to have_selector('#new_snippet_link')
expect(project.snippets.length).to eq(0)
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment