Commit ba837a8f authored by Mark Lapierre's avatar Mark Lapierre

Test public snippet

Public snippets can trigger recaptcha.
Try with a private snippet instead.

Private snippets can't be embedded, so remove that check.

Also unquarantine the test.
parent 69e1bd38
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
# Failure issue: https://gitlab.com/gitlab-org/quality/staging/issues/49 context 'Create', :smoke do
context 'Create', :smoke, :quarantine do
describe 'Snippet creation' do describe 'Snippet creation' do
it 'User creates a snippet' do it 'User creates a snippet' do
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
...@@ -13,7 +12,7 @@ module QA ...@@ -13,7 +12,7 @@ module QA
Resource::Snippet.fabricate_via_browser_ui! do |snippet| Resource::Snippet.fabricate_via_browser_ui! do |snippet|
snippet.title = 'Snippet title' snippet.title = 'Snippet title'
snippet.description = 'Snippet description' snippet.description = 'Snippet description'
snippet.visibility = 'Public' snippet.visibility = 'Private'
snippet.file_name = 'New snippet file name' snippet.file_name = 'New snippet file name'
snippet.file_content = 'Snippet file text' snippet.file_content = 'Snippet file text'
end end
...@@ -21,8 +20,7 @@ module QA ...@@ -21,8 +20,7 @@ module QA
Page::Dashboard::Snippet::Show.perform do |snippet| Page::Dashboard::Snippet::Show.perform do |snippet|
expect(snippet).to have_snippet_title('Snippet title') expect(snippet).to have_snippet_title('Snippet title')
expect(snippet).to have_snippet_description('Snippet description') expect(snippet).to have_snippet_description('Snippet description')
expect(snippet).to have_embed_type('Embed') expect(snippet).to have_visibility_type('Private')
expect(snippet).to have_visibility_type('Public')
expect(snippet).to have_file_name('New snippet file name') expect(snippet).to have_file_name('New snippet file name')
expect(snippet).to have_file_content('Snippet file text') expect(snippet).to have_file_content('Snippet file text')
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