Commit dc4e11e4 authored by Ramya Authappan's avatar Ramya Authappan Committed by Rémy Coutable

Promoting issue to epic

parent 01860413
......@@ -3,7 +3,7 @@
.issuable-info-container
.issuable-main-info
.issue-title.title
%span.issue-title-text
%span.issue-title-text.qa-epic-title-text
= link_to epic.title, epic_path(epic)
.issuable-info
%span.issuable-reference
......
......@@ -12,6 +12,10 @@ module QA
element :create_epic_button
end
view 'ee/app/views/groups/epics/_epic.html.haml' do
element :epic_title_text
end
def click_new_epic
click_element :new_epic_button
end
......@@ -23,6 +27,10 @@ module QA
def create_new_epic
click_element :create_epic_button
end
def click_first_epic
all_elements(:epic_title_text).first.click
end
end
end
end
......
# frozen_string_literal: true
module QA
context 'Plan', :smoke do
describe 'promote issue to epic' do
let(:issue_title) { "My Awesome Issue #{SecureRandom.hex(8)}" }
it 'user promotes issue to an epic' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials }
group = Resource::Group.fabricate!
project = Resource::Project.fabricate! do |project|
project.name = 'promote-issue-to-epic'
project.description = 'Project to promote issue to epic'
project.group = group
end
Resource::Issue.fabricate! do |issue|
issue.title = issue_title
issue.project = project
end
Page::Project::Issue::Show.perform do |show|
show.select_all_activities_filter
show.comment('/promote')
expect(show).to have_content("promoted to epic")
end
group.visit!
QA::EE::Page::Group::Menu.perform(&:go_to_group_epics)
QA::EE::Page::Group::Epic::Index.perform(&:click_first_epic)
expect(page).to have_content(issue_title)
expect(page).to have_content(/promoted from issue .* \(closed\)/)
end
end
end
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