Commit 6c8893cb authored by Walmyr Lima's avatar Walmyr Lima

Simplify a bunch of tests

In places where we are not using the issue title, let's use the
default one.

Also, let's visit the issue right after its fabrication in a shorter
way to reduce the code size.
parent d83fd708
......@@ -28,7 +28,6 @@ module QA
Flow::Project.add_member(project: project, username: user.username)
Resource::Issue.fabricate_via_api! do |issue|
issue.title = 'issue title'
issue.project = project
end.visit!
......
......@@ -8,9 +8,7 @@ module QA
before do
Flow::Login.sign_in
Resource::Issue.fabricate_via_api! do |issue|
issue.title = 'issue title'
end.visit!
Resource::Issue.fabricate_via_api!.visit!
Page::Project::Issue::Show.perform do |show|
show.select_all_activities_filter
......
......@@ -6,9 +6,7 @@ module QA
before do
Flow::Login.sign_in
Resource::Issue.fabricate_via_api! do |issue|
issue.title = 'issue title'
end.visit!
Resource::Issue.fabricate_via_api!.visit!
end
it 'user comments on an issue and edits the comment' do
......
......@@ -3,16 +3,12 @@
module QA
context 'Plan', :smoke do
describe 'Issue creation' do
let(:issue_title) { 'issue title' }
before do
Flow::Login.sign_in
end
it 'user creates an issue' do
issue = Resource::Issue.fabricate_via_browser_ui! do |issue|
issue.title = issue_title
end
issue = Resource::Issue.fabricate_via_browser_ui!
Page::Project::Menu.perform(&:click_issues)
......@@ -28,9 +24,7 @@ module QA
end
before do
Resource::Issue.fabricate_via_api! do |issue|
issue.title = issue_title
end.visit!
Resource::Issue.fabricate_via_api!.visit!
end
it 'user comments on an issue with an attachment' do
......
......@@ -3,14 +3,10 @@
module QA
context 'Plan' do
describe 'filter issue comments activities' do
let(:issue_title) { 'issue title' }
before do
Flow::Login.sign_in
Resource::Issue.fabricate_via_api! do |issue|
issue.title = issue_title
end.visit!
Resource::Issue.fabricate_via_api!.visit!
end
it 'user filters comments and activities in an issue' do
......
......@@ -16,7 +16,6 @@ module QA
project.add_member(@user)
Resource::Issue.fabricate_via_api! do |issue|
issue.title = 'issue to test mention'
issue.project = project
end.visit!
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment