diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) | |
download | gitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb')
-rw-r--r-- | qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb index 451a7847f8b..d2b86904cd3 100644 --- a/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb @@ -1,27 +1,30 @@ # frozen_string_literal: true module QA - context 'Create', :smoke do + RSpec.describe 'Create', :smoke do describe 'Personal snippet creation' do it 'User creates a personal snippet' do Flow::Login.sign_in - Page::Main::Menu.perform(&:go_to_snippets) + Page::Main::Menu.perform do |menu| + menu.go_to_more_dropdown_option(:snippets_link) + end Resource::Snippet.fabricate_via_browser_ui! do |snippet| snippet.title = 'Snippet title' snippet.description = 'Snippet description' snippet.visibility = 'Private' - snippet.file_name = 'New snippet file name' - snippet.file_content = 'Snippet file text' + snippet.file_name = 'ruby_file.rb' + snippet.file_content = 'File.read("test.txt").split(/\n/)' end Page::Dashboard::Snippet::Show.perform do |snippet| expect(snippet).to have_snippet_title('Snippet title') expect(snippet).to have_snippet_description('Snippet description') expect(snippet).to have_visibility_type(/private/i) - expect(snippet).to have_file_name('New snippet file name') - expect(snippet).to have_file_content('Snippet file text') + expect(snippet).to have_file_name('ruby_file.rb') + expect(snippet).to have_file_content('File.read("test.txt").split(/\n/)') + expect(snippet).to have_syntax_highlighting('ruby') end end end |