blob: 8fc4427bda77c51c71e389b6f2a9823ddc69f58a (
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
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
|