Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9888d627
Commit
9888d627
authored
Feb 23, 2021
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add epic quick actions feature specs
parent
867b6236
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
ee/spec/features/epics/user_uses_quick_actions_spec.rb
ee/spec/features/epics/user_uses_quick_actions_spec.rb
+50
-0
No files found.
ee/spec/features/epics/user_uses_quick_actions_spec.rb
0 → 100644
View file @
9888d627
# frozen_string_literal: true
require
'spec_helper'
# Epics quick actions functionality are covered on unit test specs. These
# are added just to test frontend features at least once, before adding more
# specs to this file please take into account if there is any behaviour
# different from the current ones that needs to be tested.
RSpec
.
describe
'Epics > User uses quick actions'
,
:js
do
include
Spec
::
Support
::
Helpers
::
Features
::
NotesHelpers
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:epic_1
)
{
create
(
:epic
,
group:
group
)
}
before
do
stub_licensed_features
(
epics:
true
,
subepics:
true
)
group
.
add_reporter
(
user
)
sign_in
(
user
)
end
context
'on epic note'
do
it
'applies quick action'
do
epic_2
=
create
(
:epic
,
group:
group
)
visit
group_epic_path
(
group
,
epic_2
)
wait_for_requests
add_note
(
"new note
\n\n
/parent_epic
#{
epic_1
.
to_reference
}
"
)
wait_for_requests
expect
(
epic_2
.
reload
.
parent
).
to
eq
(
epic_1
)
expect
(
page
).
to
have_content
(
"added epic
#{
epic_1
.
to_reference
}
as parent epic"
)
end
end
context
'on epic form'
do
it
'applies quick action'
do
epic_title
=
'New epic with parent'
visit
new_group_epic_path
(
group
)
find
(
'#epic-title'
).
native
.
send_keys
(
epic_title
)
find
(
'#epic-description'
).
native
.
send_keys
(
"With parent
\n\n
/parent_epic
#{
epic_1
.
to_reference
}
"
)
click_button
'Create epic'
wait_for_requests
expect
(
group
.
epics
.
find_by_title
(
epic_title
).
parent
).
to
eq
(
epic_1
)
expect
(
page
).
to
have_content
(
"added epic
#{
epic_1
.
to_reference
}
as parent epic"
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment