| ... | @@ -5,8 +5,15 @@ module QA |
... | @@ -5,8 +5,15 @@ module QA |
|
|
describe 'Issue creation' do
|
|
describe 'Issue creation' do
|
|
|
let(:issue_title) { 'issue title' }
|
|
let(:issue_title) { 'issue title' }
|
|
|
|
|
|
|
|
|
before do
|
|
|
|
Runtime::Browser.visit(:gitlab, Page::Main::Login)
|
|
|
|
Page::Main::Login.perform(&:sign_in_using_credentials)
|
|
|
|
end
|
|
|
|
|
|
|
it 'user creates an issue' do
|
|
it 'user creates an issue' do
|
|
|
create_issue
|
|
Resource::Issue.fabricate_via_browser_ui! do |issue|
|
|
|
|
issue.title = issue_title
|
|
|
|
end
|
|
|
|
|
|
|
|
Page::Project::Menu.perform(&:click_issues)
|
|
Page::Project::Menu.perform(&:click_issues)
|
|
|
|
|
|
| ... | @@ -18,9 +25,15 @@ module QA |
... | @@ -18,9 +25,15 @@ module QA |
|
|
File.absolute_path(File.join('spec', 'fixtures', 'banana_sample.gif'))
|
|
File.absolute_path(File.join('spec', 'fixtures', 'banana_sample.gif'))
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
it 'user comments on an issue with an attachment' do
|
|
before do
|
|
|
create_issue
|
|
issue = Resource::Issue.fabricate_via_api! do |issue|
|
|
|
|
issue.title = issue_title
|
|
|
|
end
|
|
|
|
|
|
|
|
|
issue.visit!
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'user comments on an issue with an attachment' do
|
|
|
Page::Project::Issue::Show.perform do |show|
|
|
Page::Project::Issue::Show.perform do |show|
|
|
|
show.comment('See attached banana for scale', attachment: file_to_attach)
|
|
show.comment('See attached banana for scale', attachment: file_to_attach)
|
|
|
|
|
|
| ... | @@ -36,15 +49,6 @@ module QA |
... | @@ -36,15 +49,6 @@ module QA |
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
def create_issue
|
|
|
|
|
Runtime::Browser.visit(:gitlab, Page::Main::Login)
|
|
|
|
|
Page::Main::Login.perform(&:sign_in_using_credentials)
|
|
|
|
|
|
|
|
|
|
Resource::Issue.fabricate_via_browser_ui! do |issue|
|
|
|
|
|
issue.title = issue_title
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
end |
|
end |