diff options
Diffstat (limited to 'qa/qa/specs/features/browser_ui/3_create/snippet/create_project_snippet_spec.rb')
-rw-r--r-- | qa/qa/specs/features/browser_ui/3_create/snippet/create_project_snippet_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/create_project_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/create_project_snippet_spec.rb new file mode 100644 index 00000000000..8fc4427bda7 --- /dev/null +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/create_project_snippet_spec.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +module QA + context 'Create' do # to be converted to a smoke test once proved to be stable + describe 'Project snippet creation' do + it 'User creates a project snippet' do + Flow::Login.sign_in + + Resource::ProjectSnippet.fabricate_via_browser_ui! do |snippet| + snippet.title = 'Project snippet' + snippet.description = ' ' + snippet.visibility = 'Private' + snippet.file_name = 'markdown_file.md' + snippet.file_content = "### Snippet heading\n\n[Gitlab link](https://gitlab.com/)" + end + + Page::Dashboard::Snippet::Show.perform do |snippet| + expect(snippet).to have_snippet_title('Project snippet') + expect(snippet).to have_no_snippet_description + expect(snippet).to have_visibility_type(/private/i) + expect(snippet).to have_file_name('markdown_file.md') + expect(snippet).to have_file_content('Snippet heading') + expect(snippet).to have_file_content('Gitlab link') + expect(snippet).not_to have_file_content('###') + expect(snippet).not_to have_file_content('https://gitlab.com/') + end + end + end + end +end |