Commit 4cc15fdb authored by Axel Garcia's avatar Axel Garcia Committed by Natalia Tepluhina

Edit epic creation docs

- Update screenshots
- Update instructions
- Fix links
parent 127db4b9
...@@ -14,42 +14,28 @@ to them. ...@@ -14,42 +14,28 @@ to them.
## Create an epic ## Create an epic
A paginated list of epics is available in each group from where you can create > - The New Epic form [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/211533) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.2.
a new epic. The list of epics includes also epics from all subgroups of the > - In [GitLab 13.7](https://gitlab.com/gitlab-org/gitlab/-/issues/229621) and later, the New Epic button on the Epics list opens the New Epic form.
selected group. From your group page:
### Create an epic from the epic list To create an epic in the group you're in:
To create an epic from the epic list, in a group: 1. Get to the New Epic form:
- From the **Epics** list in your group, select the **New Epic** button.
- From an epic in your group, select the **New Epic** button.
- From anywhere, in the top menu, select **New...** (**{plus-square}**) **> New epic**.
1. Go to **{epic}** **Epics**. ![New epic from an open epic](img/new_epic_from_groups_v13.7.png)
1. Select **New epic**.
1. Enter a descriptive title.
1. Select **Create epic**.
### Access the New Epic form 1. Fill in these fields:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/211533) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.2. - Title
- Description
- [Confidentiality checkbox](#make-an-epic-confidential)
- Labels
- Start date
- Due date
There are two ways to get to the New Epic form and create an epic in the group you're in: 1. Select **Create epic**. You are taken to view the newly created epic.
- From an epic in your group, select **New Epic**.
- From anywhere, in the top menu, select **plus** (**{plus-square}**) **> New epic**.
![New epic from an open epic](img/new_epic_from_groups_v13.2.png)
### Elements of the New Epic form
When you're creating a new epic, these are the fields you can fill in:
- Title
- Description
- Confidentiality checkbox
- Labels
- Start date
- Due date
![New epic form](img/new_epic_form_v13.2.png)
## Edit an epic ## Edit an epic
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- if @can_bulk_update - if @can_bulk_update
= render_if_exists 'shared/issuable/bulk_update_button', type: :epics = render_if_exists 'shared/issuable/bulk_update_button', type: :epics
- if can?(current_user, :create_epic, @group) - if can?(current_user, :create_epic, @group)
#epic-create-root{ data: { endpoint: request.url, 'align-right' => true } } = link_to _('New epic'), new_group_epic_path(@group), class: 'btn btn-success gl-button'
= render 'shared/epic/search_bar', type: :epics = render 'shared/epic/search_bar', type: :epics
......
- type = local_assigns.fetch(:type) - type = local_assigns.fetch(:type)
= button_tag _("Edit %{issuable}") % {issuable: type.to_s.humanize(capitalize: false)}, class: 'btn btn-default gl-mr-3 js-bulk-update-toggle' = button_tag _("Edit %{issuable}") % {issuable: type.to_s.humanize(capitalize: false)}, class: 'btn btn-default gl-button gl-mr-3 js-bulk-update-toggle'
---
title: New epic button in epic list redirects the user to the new epic page
merge_request: 37126
author:
type: changed
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'New Epic', :js do
let(:user) { create(:user) }
let(:group) { create(:group, :public) }
before do
stub_licensed_features(epics: true)
sign_in(user)
end
context 'empty epic list' do
context 'when user who is not a group member views the epic list' do
it 'does not show the create button' do
visit group_epics_path(group)
expect(page).not_to have_selector('.epic-create-dropdown .btn-success')
end
end
context 'when user with owner views the epic list' do
before do
group.add_owner(user)
visit group_epics_path(group)
end
it 'does show the create button' do
expect(page).to have_selector('.epic-create-dropdown .btn-success')
end
end
end
context 'has epics in list' do
let!(:epics) { create_list(:epic, 2, group: group) }
context 'when user who is not a group member views the epic list' do
before do
visit group_epics_path(group)
end
it 'does not show the create button' do
expect(page).not_to have_selector('.epic-create-dropdown .btn-success')
end
end
context 'when user with owner views the epic list' do
before do
group.add_owner(user)
visit group_epics_path(group)
end
it 'does show the create button' do
expect(page).to have_selector('.epic-create-dropdown .btn-success')
end
it 'can create epic' do
find('.epic-create-dropdown .btn-success').click
find('.epic-create-dropdown .dropdown-menu input[type="text"]').set('test epic title')
find('.epic-create-dropdown .dropdown-menu .btn-success').click
wait_for_requests
expect(find('.issuable-details h2.title')).to have_content('test epic title')
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