blob: e4c2488e8df82288dc6d69ec95da166514835ed8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# frozen_string_literal: true
module QA
RSpec.describe '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', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1358' 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).not_to have_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
|